For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
  • API Reference
      • GETList Workflows
      • POSTCreate Workflow
      • GETGet Workflow
      • PUTUpdate Workflow
      • DELDelete Workflow
      • PATCHPatch Workflow
      • GETList Workflow Uploads
      • POSTPreview Run
      • GETRuns Summary
      • GETGet Run Steps
      • GETGet Run Overview
      • GETGet Run Data
      • GETDownload Run
      • GETDownload Run Node
      • POSTDuplicate Workflow
  • Python SDK
    • Install
    • Usage
    • Errors
  • CLI
    • Overview
LogoLogo
API Referenceworkflows

Get Workflow

GET
/api/v1/workflows/:workflow_id
GET
/api/v1/workflows/:workflow_id
$curl https://api.onepin.ai/api/v1/workflows/workflow_id \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json"
1{
2 "data": {
3 "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
4 "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
5 "name": "Monthly Sales Report Workflow",
6 "definition": {
7 "steps": [
8 {
9 "id": "step1",
10 "type": "data_fetch",
11 "params": {
12 "source": "sales_database",
13 "query": "SELECT * FROM sales WHERE month = CURRENT_MONTH"
14 }
15 },
16 {
17 "id": "step2",
18 "type": "data_transform",
19 "params": {
20 "script": "aggregate_sales.py"
21 }
22 },
23 {
24 "id": "step3",
25 "type": "email_send",
26 "params": {
27 "recipients": [
28 "sales-team@example.com"
29 ],
30 "subject": "Monthly Sales Report",
31 "body": "Please find attached the sales report for this month."
32 }
33 }
34 ],
35 "triggers": [
36 {
37 "type": "schedule",
38 "cron": "0 8 1 * *"
39 }
40 ]
41 },
42 "created_at": "2024-01-15T09:30:00Z",
43 "updated_at": "2024-04-10T14:45:00Z",
44 "description": "Automates the generation and distribution of monthly sales reports.",
45 "runs_count": 27,
46 "last_run_at": "2024-04-01T08:00:00Z",
47 "last_run_status": "completed"
48 },
49 "meta": {
50 "request_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
51 "timestamp": "2024-04-10T15:00:00Z"
52 }
53}
Fetch a workflow by id.
Was this page helpful?
Previous

Update Workflow

Next
Built with

Authentication

AuthorizationBearer
Clerk JWT token
OR
AuthorizationBearer

Onepin live API key (op_live_...). Test and public keys are reserved in Phase 1.

Path parameters

workflow_idstringRequiredformat: "uuid"

Headers

X-Workspace-Idstring or nullOptional

Response

Successful Response
dataobject
metaobject

Errors

422
Unprocessable Entity Error