Documentation

Workflows REST API

Manage workflows with API key authentication. Create keys in Settings. Agents load node types from the API, build graphs without credentials, then users attach secrets in the dashboard.

Authentication

All /api/v1 routes require a Bearer token. Generate an API key from Settings (keys use the agt_ prefix):

Authorization: Bearer agt_your_api_key

Missing or invalid keys return 401 Unauthorized.

Credentials

Credentials are never exposed through this API. Agents must not send credentialId, API keys, or tokens. If present on graph write, credentialId is stripped. On GET /api/v1/workflows/:id, credential ids and secrets are omitted; each node may include data.credentialConfigured (boolean) only.

  • Create and manage credentials in the dashboard (Credentials / node dialogs).
  • After an agent builds a graph, open the workflow and attach the required credential type shown in the node catalog.
  • Then publish when the workflow is ready to run.

Agent build flow

  1. GET /api/v1/node-types — learn available nodes and data fields
  2. POST /api/v1/workflows — create a draft
  3. PUT /api/v1/workflows/:id — replace the full graph (no credentials)
  4. GET /api/v1/workflows/:id — read back the graph (credentials stripped; credentialConfigured only)
  5. User attaches credentials in the UI
  6. Optional: POST /api/v1/workflows/:id/publish
# 1) Catalog
curl -H "Authorization: Bearer agt_..." \
  https://agenticsline.com/api/v1/node-types

# 2) Create
curl -X POST -H "Authorization: Bearer agt_..." \
  -H "Content-Type: application/json" \
  -d '{"name":"Agent built flow"}' \
  https://agenticsline.com/api/v1/workflows

# 3) Replace graph (omit credentialId)
curl -X PUT -H "Authorization: Bearer agt_..." \
  -H "Content-Type: application/json" \
  -d '{"nodes":[...],"edges":[...]}' \
  https://agenticsline.com/api/v1/workflows/WORKFLOW_ID

# 4) Read graph (no secrets)
curl -H "Authorization: Bearer agt_..." \
  https://agenticsline.com/api/v1/workflows/WORKFLOW_ID

Errors

Error responses are JSON with an error code and a human-readable message.

{
  "error": "NOT_FOUND",
  "message": "Workflow not found"
}
  • 401 — Missing or invalid API key
  • 400 — Invalid body, graph, or node type
  • 404 — Workflow not found
  • 500 — Unexpected server error

Workflow object

Successful workflow responses return:

{
  "id": "string",
  "name": "string",
  "published": true,
  "status": "published" | "draft",
  "createdAt": "ISO-8601 timestamp",
  "updatedAt": "ISO-8601 timestamp"
}
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