Documentation · Workflows

Workflow endpoints

Manage workflow records. GET /api/v1/workflows/:id returns the full graph (credentials stripped). After create, build or update the graph with PUT /api/v1/workflows/:id.
GET/api/v1/workflows

List workflows

Returns a paginated list of workflows for the authenticated user. Supports optional search by name.

Query parameters

  • pagenumberoptional

    Page number (default: 1).

  • pageSizenumberoptional

    Items per page (default: 5, min: 1, max: 100).

  • searchstringoptional

    Optional name filter.

Example request

curl -X GET "https://agenticsline.com/api/v1/workflows?page=1&pageSize=10" \
  -H "Authorization: Bearer agt_your_api_key"

Example response

{
  "items": [
    {
      "id": "clx...",
      "name": "My workflow",
      "published": false,
      "status": "draft",
      "createdAt": "2026-07-24T08:00:00.000Z",
      "updatedAt": "2026-07-24T08:00:00.000Z"
    }
  ],
  "page": 1,
  "pageSize": 10,
  "totalCount": 1,
  "totalPages": 1,
  "hasNextPage": false,
  "hasPreviousPage": false
}
POST/api/v1/workflows201

Create workflow

Creates a new draft workflow shell. Replace the graph next with PUT /api/v1/workflows/:id.

Request body

  • namestringoptional

    Optional workflow name.

Example request

curl -X POST "https://agenticsline.com/api/v1/workflows" \
  -H "Authorization: Bearer agt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Lead enrichment" }'

Example response

{
  "id": "clx...",
  "name": "Lead enrichment",
  "published": false,
  "status": "draft",
  "createdAt": "2026-07-24T08:00:00.000Z",
  "updatedAt": "2026-07-24T08:00:00.000Z"
}
GET/api/v1/workflows/:id

Get workflow (full graph)

Fetches a workflow with its full node/edge graph. Credentials are never returned — each node may include data.credentialConfigured (boolean) so agents know a credential is attached in the dashboard. credentialId, tokens, and secrets are stripped.

Example request

curl -X GET "https://agenticsline.com/api/v1/workflows/clx..." \
  -H "Authorization: Bearer agt_your_api_key"

Example response

{
  "id": "clx...",
  "name": "Lead enrichment",
  "published": true,
  "status": "published",
  "createdAt": "2026-07-24T08:00:00.000Z",
  "updatedAt": "2026-07-24T09:00:00.000Z",
  "nodes": [
    {
      "id": "t1",
      "type": "MANUAL_TRIGGER",
      "position": { "x": 0, "y": 0 },
      "data": { "credentialConfigured": false }
    },
    {
      "id": "g1",
      "type": "GOOGLE_SHEET",
      "position": { "x": 280, "y": 0 },
      "data": {
        "variableName": "leads",
        "spreadsheetId": "1BxiM...",
        "sheetName": "Sheet1",
        "operation": "GET_ROWS",
        "credentialConfigured": true
      }
    }
  ],
  "edges": [
    {
      "id": "c1",
      "source": "t1",
      "target": "g1",
      "sourceHandle": "source-1",
      "targetHandle": "target-1"
    }
  ]
}
POST/api/v1/workflows/:id/copy201

Copy workflow

Duplicates an existing workflow. Optionally rename the copy via the request body.

Request body

  • namestringoptional

    Optional name for the copied workflow.

Example request

curl -X POST "https://agenticsline.com/api/v1/workflows/clx.../copy" \
  -H "Authorization: Bearer agt_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Lead enrichment (copy)" }'

Example response

{
  "id": "cly...",
  "name": "Lead enrichment (copy)",
  "published": false,
  "status": "draft",
  "createdAt": "2026-07-24T10:00:00.000Z",
  "updatedAt": "2026-07-24T10:00:00.000Z"
}
POST/api/v1/workflows/:id/publish

Publish workflow

Marks a workflow as published so it can be triggered in production.

Example request

curl -X POST "https://agenticsline.com/api/v1/workflows/clx.../publish" \
  -H "Authorization: Bearer agt_your_api_key"

Example response

{
  "id": "clx...",
  "name": "Lead enrichment",
  "published": true,
  "status": "published",
  "createdAt": "2026-07-24T08:00:00.000Z",
  "updatedAt": "2026-07-24T10:05:00.000Z"
}
POST/api/v1/workflows/:id/unpublish

Unpublish workflow

Reverts a workflow to draft status.

Example request

curl -X POST "https://agenticsline.com/api/v1/workflows/clx.../unpublish" \
  -H "Authorization: Bearer agt_your_api_key"

Example response

{
  "id": "clx...",
  "name": "Lead enrichment",
  "published": false,
  "status": "draft",
  "createdAt": "2026-07-24T08:00:00.000Z",
  "updatedAt": "2026-07-24T10:10:00.000Z"
}
We use cookies
We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.

By clicking "Accept", you agree to our use of cookies.

Learn more