Skip to content

Start building

Jump toWorkflows
All endpoints

Workflows

Create workflows, save drafts, publish, bind connections and start runs.

get/v1/workflows

List workflows

Needs workflow.view

Recently changed first. Sorts by updated_at, created_at, name, latest_version, steps and last_run_at; q searches names, descriptions and the apps the steps use (gmail), or finds a pasted workflow ID. Filters, each repeatable: publication (live, staging, unpublished), valid (true, false), starts (manual, schedule, webhook, connector_event, widget_event, or mixed for several kinds), last_run (succeeded, failed, running, never), created_by and updated_by (usr_… or sa_…), plus the created and updated time ranges; facets count each of them.

Query parameters

  • workspace_idstring
  • publicationstring[]
  • validstring[]
  • startsstring[]
  • last_runstring[]
  • created_bystring[]
  • updated_bystring[]
  • limitinteger

    Rows per page, 1 to 200.

    Default50at least 1at most 200
  • cursorstring
  • qstring

    Search: rows whose name (or the list's other searchable text) contains this, any case.

    at most 200 characters
  • orderstring

    Sort field; a leading - sorts down. Each list names the fields it sorts by.

    at most 64 charactersmatches ^-?[a-z_]+$
  • includestring[]

    total_count (counted up to 10,000) and facets (a count per filter value).

    One oftotal_countfacets
  • created_afterstring

    Only rows created at or after this time (RFC 3339).

    date-time
  • created_beforestring

    Only rows created at or before this time (RFC 3339).

    date-time
  • updated_afterstring

    Only rows last changed at or after this time (RFC 3339).

    date-time
  • updated_beforestring

    Only rows last changed at or before this time (RFC 3339).

    date-time

Response200

  • objectstring
    list
  • dataWorkflow[]
    20 fields
    • idstring
    • objectstring
      workflow
    • aliasesmap<string, integer>
    • created_atstring
    • descriptionstring or null
    • draft_revisioninteger
    • draft_validboolean
    • latest_versioninteger or null
    • namestring
    • row_versioninteger
    • updated_atstring
    • workspace_idstring
    • appsstring[] or null
    • created_byActorRef or null

      Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

      5 fields
      • idstring or null
      • kindstring
        One ofuserapi_keyservice_accountworkloadend_usersystem
      • namestring or null
      • avatar_versionstring or null
      • emailstring or null
    • last_runWorkflowLastRun or null
      3 fields
      • idstring
      • atstring or null
      • statestring
    • publicationstring or null
      One oflivestagingunpublished
    • startsstring or null
    • stepsinteger or null
    • triggersWorkflowTriggerSummary[] or null
      3 fields
      • typestring or null
      • cronstring or null
      • timezonestring or null
    • updated_byActorRef or null

      Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

      5 fields
      • idstring or null
      • kindstring
        One ofuserapi_keyservice_accountworkloadend_usersystem
      • namestring or null
      • avatar_versionstring or null
      • emailstring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows?limit=20" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
      "object": "workflow",
      "aliases": {
        "live": 2
      },
      "apps": [
        "app"
      ],
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "description": "Reads new support email and drafts a reply.",
      "draft_revision": 2,
      "draft_valid": true,
      "last_run": {
        "id": "id",
        "at": "at",
        "state": "state"
      },
      "latest_version": 3,
      "name": "Support triage",
      "publication": "live",
      "row_version": 4,
      "starts": "starts",
      "steps": 2,
      "triggers": [
        {
          "cron": "0 9 * * 1-5",
          "timezone": "Europe/London",
          "type": "type"
        }
      ],
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/workflows

Create workflow

Needs workflow.edit

Request bodyWorkflowCreate

  • definitionobjectRequired

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

  • workspace_idstringRequired

Response201

  • idstring
  • objectstring
    workflow
  • aliasesmap<string, integer>
  • created_atstring
  • descriptionstring or null
  • draftWorkflowDraft
    6 fields
    • objectstring
      workflow_draft
    • definitionobject

      The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

    • draft_revisioninteger
    • issuesValidationIssue[]
      5 fields
      • codestring
      • messagestring
      • pathstring
      • severitystring
        One oferrorwarning
      • hintstring or null
    • validboolean
    • workflow_idstring
  • draft_revisioninteger
  • draft_validboolean
  • latest_versioninteger or null
  • namestring
  • row_versioninteger
  • updated_atstring
  • workspace_idstring
  • appsstring[] or null
  • created_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • last_runWorkflowLastRun or null
    3 fields
    • idstring
    • atstring or null
    • statestring
  • publicationstring or null
    One oflivestagingunpublished
  • startsstring or null
  • stepsinteger or null
  • triggersWorkflowTriggerSummary[] or null
    3 fields
    • typestring or null
    • cronstring or null
    • timezonestring or null
  • updated_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null

Status codes

  • 201Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/workflows" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h",
    "definition": {
      "schema": "mda.workflow/v1",
      "name": "New order alert",
      "spec": {
        "inputs": {
          "schema": {
            "type": "object",
            "properties": {
              "order_id": {
                "type": "string"
              }
            },
            "required": [
              "order_id"
            ]
          }
        },
        "triggers": [
          {
            "id": "incoming",
            "type": "webhook"
          }
        ],
        "entry": "note",
        "nodes": {
          "note": {
            "type": "set",
            "vars": {
              "order": "${inputs.order_id}"
            }
          },
          "done": {
            "type": "end",
            "output": {
              "order": "${vars.order}"
            }
          }
        },
        "edges": [
          {
            "from": "note",
            "to": "done"
          }
        ]
      }
    }
  }'
Response · 201
JSON
{
  "id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "object": "workflow",
  "aliases": {
    "live": 2
  },
  "apps": [
    "app"
  ],
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "description": "Reads new support email and drafts a reply.",
  "draft": {
    "object": "workflow_draft",
    "definition": {},
    "draft_revision": 2,
    "issues": [
      {
        "code": "code",
        "hint": "hint",
        "message": "Summarise today's open tickets.",
        "path": "path",
        "severity": "error"
      }
    ],
    "valid": true,
    "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k"
  },
  "draft_revision": 2,
  "draft_valid": true,
  "last_run": {
    "id": "id",
    "at": "at",
    "state": "state"
  },
  "latest_version": 3,
  "name": "Support triage",
  "publication": "live",
  "row_version": 4,
  "starts": "starts",
  "steps": 2,
  "triggers": [
    {
      "cron": "0 9 * * 1-5",
      "timezone": "Europe/London",
      "type": "type"
    }
  ],
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h"
}
get/v1/workflows/{workflow_id}

Get workflow

Needs workflow.view

Path parameters

  • workflow_idstringRequired

Response200

  • idstring
  • objectstring
    workflow
  • aliasesmap<string, integer>
  • created_atstring
  • descriptionstring or null
  • draft_revisioninteger
  • draft_validboolean
  • latest_versioninteger or null
  • namestring
  • row_versioninteger
  • updated_atstring
  • workspace_idstring
  • appsstring[] or null
  • created_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • last_runWorkflowLastRun or null
    3 fields
    • idstring
    • atstring or null
    • statestring
  • publicationstring or null
    One oflivestagingunpublished
  • startsstring or null
  • stepsinteger or null
  • triggersWorkflowTriggerSummary[] or null
    3 fields
    • typestring or null
    • cronstring or null
    • timezonestring or null
  • updated_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "object": "workflow",
  "aliases": {
    "live": 2
  },
  "apps": [
    "app"
  ],
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "description": "Reads new support email and drafts a reply.",
  "draft_revision": 2,
  "draft_valid": true,
  "last_run": {
    "id": "id",
    "at": "at",
    "state": "state"
  },
  "latest_version": 3,
  "name": "Support triage",
  "publication": "live",
  "row_version": 4,
  "starts": "starts",
  "steps": 2,
  "triggers": [
    {
      "cron": "0 9 * * 1-5",
      "timezone": "Europe/London",
      "type": "type"
    }
  ],
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h"
}
patch/v1/workflows/{workflow_id}

Patch workflow

Needs workflow.edit

Path parameters

  • workflow_idstringRequired

Headers

  • If-Matchstring

    The ETag you read. If the resource changed since, the write fails with 412.

Request bodyWorkflowPatch

  • descriptionstring or null
    at most 2000 characters
  • namestring or null
    at least 1 charactersat most 200 characters

Response200

  • idstring
  • objectstring
    workflow
  • aliasesmap<string, integer>
  • created_atstring
  • descriptionstring or null
  • draft_revisioninteger
  • draft_validboolean
  • latest_versioninteger or null
  • namestring
  • row_versioninteger
  • updated_atstring
  • workspace_idstring
  • appsstring[] or null
  • created_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • last_runWorkflowLastRun or null
    3 fields
    • idstring
    • atstring or null
    • statestring
  • publicationstring or null
    One oflivestagingunpublished
  • startsstring or null
  • stepsinteger or null
  • triggersWorkflowTriggerSummary[] or null
    3 fields
    • typestring or null
    • cronstring or null
    • timezonestring or null
  • updated_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PATCH "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Reads new support email and drafts a reply.",
    "name": "Support triage"
  }'
Response · 200
JSON
{
  "id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "object": "workflow",
  "aliases": {
    "live": 2
  },
  "apps": [
    "app"
  ],
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "description": "Reads new support email and drafts a reply.",
  "draft_revision": 2,
  "draft_valid": true,
  "last_run": {
    "id": "id",
    "at": "at",
    "state": "state"
  },
  "latest_version": 3,
  "name": "Support triage",
  "publication": "live",
  "row_version": 4,
  "starts": "starts",
  "steps": 2,
  "triggers": [
    {
      "cron": "0 9 * * 1-5",
      "timezone": "Europe/London",
      "type": "type"
    }
  ],
  "updated_at": "2026-11-10T09:30:00.000Z",
  "updated_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h"
}
delete/v1/workflows/{workflow_id}

Delete workflow

Needs workflow.edit

Path parameters

  • workflow_idstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X DELETE "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k" \
  -H "Authorization: Bearer $MDA_API_KEY"
get/v1/workflows/{workflow_id}/bindings

List workflow bindings

Needs workflow.view

Path parameters

  • workflow_idstringRequired

Response200

  • objectstring
    list
  • dataBinding[]
    8 fields
    • objectstring
      binding
    • aliasstring
      One ofdraftstaginglive
    • revisioninteger
    • slotstring
    • target_idstring
    • target_typestring
      One ofconnectionmcp_serverknowledge_baseagentworkflowcode_toola2a_agent
    • updated_atstring
    • target_aliasstring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/bindings" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "object": "binding",
      "alias": "live",
      "revision": 2,
      "slot": "crm",
      "target_alias": "target alias",
      "target_id": "target id",
      "target_type": "connection",
      "updated_at": "2026-11-10T09:30:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
get/v1/workflows/{workflow_id}/draft

Get workflow draft

Needs workflow.view

Path parameters

  • workflow_idstringRequired

Response200

  • objectstring
    workflow_draft
  • definitionobject

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

  • draft_revisioninteger
  • issuesValidationIssue[]
    5 fields
    • codestring
    • messagestring
    • pathstring
    • severitystring
      One oferrorwarning
    • hintstring or null
  • validboolean
  • workflow_idstring

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/draft" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "workflow_draft",
  "definition": {},
  "draft_revision": 2,
  "issues": [
    {
      "code": "code",
      "hint": "hint",
      "message": "Summarise today's open tickets.",
      "path": "path",
      "severity": "error"
    }
  ],
  "valid": true,
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k"
}
put/v1/workflows/{workflow_id}/draft

Put workflow draft

Needs workflow.edit

Path parameters

  • workflow_idstringRequired

Headers

  • If-Matchstring

    The ETag you read. If the resource changed since, the write fails with 412.

Request bodyDraftPut

  • definitionobjectRequired

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

Response200

  • objectstring
    workflow_draft
  • definitionobject

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

  • draft_revisioninteger
  • issuesValidationIssue[]
    5 fields
    • codestring
    • messagestring
    • pathstring
    • severitystring
      One oferrorwarning
    • hintstring or null
  • validboolean
  • workflow_idstring

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PUT "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/draft" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": {
      "schema": "mda.workflow/v1",
      "name": "New order alert",
      "spec": {
        "inputs": {
          "schema": {
            "type": "object",
            "properties": {
              "order_id": {
                "type": "string"
              }
            },
            "required": [
              "order_id"
            ]
          }
        },
        "triggers": [
          {
            "id": "incoming",
            "type": "webhook"
          }
        ],
        "entry": "note",
        "nodes": {
          "note": {
            "type": "set",
            "vars": {
              "order": "${inputs.order_id}"
            }
          },
          "done": {
            "type": "end",
            "output": {
              "order": "${vars.order}"
            }
          }
        },
        "edges": [
          {
            "from": "note",
            "to": "done"
          }
        ]
      }
    }
  }'
Response · 200
JSON
{
  "object": "workflow_draft",
  "definition": {},
  "draft_revision": 2,
  "issues": [
    {
      "code": "code",
      "hint": "hint",
      "message": "Summarise today's open tickets.",
      "path": "path",
      "severity": "error"
    }
  ],
  "valid": true,
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k"
}
post/v1/workflows/{workflow_id}/publish

Publish workflow

Needs workflow.publish

Stages 1 to 5. Stage 5: a workflow that uses connections is published only by someone who may use them.

Path parameters

  • workflow_idstringRequired

Request bodyPublishBody

  • aliasstring or null
    One oflivestaging

Response201

  • idstring
  • objectstring
    workflow_version
  • aliasesstring[]
  • content_hashstring
  • created_atstring
  • numberinteger
  • published_bystring
  • schema_versionstring
  • statusstring
    One ofpublishedarchived
  • workflow_idstring
  • workload_idstring

Status codes

  • 201Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/publish" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "live"
  }'
Response · 201
JSON
{
  "id": "wfv_01jcmxemhpq07bh8677tfsgx59",
  "object": "workflow_version",
  "aliases": [
    "aliase"
  ],
  "content_hash": "content hash",
  "created_at": "2026-11-10T09:30:00.000Z",
  "number": 3,
  "published_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "schema_version": "schema version",
  "status": "published",
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "workload_id": "workload id"
}
post/v1/workflows/{workflow_id}/runs

Start workflow run

Needs workflow.run

Commit the run and its event, then start the interpreter. A run of the draft is a builder's test and also needs workflow.edit.

Path parameters

  • workflow_idstringRequired

Headers

  • Idempotency-KeystringRequired

    A unique value for this run, sent again unchanged when you retry. Required.

Request bodyWorkflowRunCreate

  • inputobject

    Any JSON object.

  • targetstring
    One ofdraftstagingliveDefault"draft"

Response202

  • idstring
  • objectstring
    workflow_run
  • aliasstring
  • cancel_requestedboolean
  • created_atstring or null
  • draft_revisioninteger or null
  • ended_atstring or null
  • error_classstring or null
  • error_codestring or null
  • is_testboolean
  • row_versioninteger
  • started_atstring or null
  • statestring
    One ofqueuedrunningwaiting_approvalwaiting_inputwaiting_eventwaiting_timerblocked_on_keyblocked_on_connectioncompletedfailedcancelledstopped_by_limitfailed_to_start
  • state_reasonstring or null
  • total_stepsinteger
  • trigger_typestring
  • updated_atstring or null
  • versioninteger or null
  • workflow_idstring
  • workflow_version_idstring or null
  • workspace_idstring
  • created_byActorRef or null

    Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • stepsWorkflowStep[] or null
    15 fields
    • idstring
    • attemptsinteger
    • data_classstring
    • error_classstring or null
    • error_codestring or null
    • finished_atstring or null
    • iterationstring
    • node_idstring
    • node_typestring
    • portstring or null
    • started_atstring or null
    • statusstring
      One ofrunningwaitingcompletedfailedcancelledreusedmanual
    • child_run_idstring or null
    • child_run_kindstring or null
    • cost_micro_usdinteger
      Default0
  • total_cost_micro_usdinteger
    Default0

Status codes

  • 202Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/runs" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "order_id": "A-1001"
    },
    "target": "live"
  }'
Response · 202
JSON
{
  "id": "wfr_01jcvk7x45pq07bh867msccyhv",
  "object": "workflow_run",
  "alias": "live",
  "cancel_requested": true,
  "created_at": "2026-11-10T09:30:00.000Z",
  "created_by": {
    "kind": "user",
    "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
    "name": "Ada Lovelace",
    "email": "ada@example.com"
  },
  "draft_revision": 2,
  "ended_at": null,
  "error_class": "error class",
  "error_code": null,
  "is_test": false,
  "row_version": 4,
  "started_at": "2026-11-10T09:30:00.000Z",
  "state": "queued",
  "state_reason": null,
  "steps": [
    {
      "id": "id",
      "attempts": 2,
      "child_run_id": "run_01jcr77659p6hws1zjqkthay73",
      "child_run_kind": "child run kind",
      "cost_micro_usd": 0,
      "data_class": "data class",
      "error_class": "error class",
      "error_code": null,
      "finished_at": "2026-11-10T09:30:00.000Z",
      "iteration": "iteration",
      "node_id": "node id",
      "node_type": "node type",
      "port": "port",
      "started_at": "2026-11-10T09:30:00.000Z",
      "status": "running"
    }
  ],
  "total_cost_micro_usd": 0,
  "total_steps": 2,
  "trigger_type": "trigger type",
  "updated_at": "2026-11-10T09:30:00.000Z",
  "version": 3,
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "workflow_version_id": "wfv_01jcmxemhpq07bh8677tfsgx59",
  "workspace_id": "ws_01jccj30nr8ad7mx1yc5v9zx3h"
}
get/v1/workflows/{workflow_id}/triggers

List workflow triggers

Needs workflow.view

Every trigger of every alias, with its webhook URL or schedule. Rows appear when an alias points at a version.

Path parameters

  • workflow_idstringRequired

Response200

  • objectstring
    list
  • dataTrigger[]
    18 fields
    • idstring
    • objectstring
      trigger
    • aliasstring
    • created_atstring or null
    • cronstring or null
    • event_modestring
      One ofrealtest_only
    • has_secretboolean
    • healthstring
      One ofokfailing
    • keystring
    • last_event_atstring or null
    • statestring
      One ofactivepausedretired
    • timezonestring or null
    • typestring
      One ofwebhookscheduleconnector_eventwidget_eventmanualapi
    • urlstring or null
    • workflow_idstring
    • created_byActorRef or null

      Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

      5 fields
      • idstring or null
      • kindstring
        One ofuserapi_keyservice_accountworkloadend_usersystem
      • namestring or null
      • avatar_versionstring or null
      • emailstring or null
    • updated_atstring or null
    • updated_byActorRef or null

      Who created or last changed something, resolved to a name for display. system, workload (an automation) and end_user (a widget visitor) have no ID or name: the console words them. name is null for someone the directory no longer knows. id is what the lists' created_by/updated_by filters take. avatar_version is set for a person with a photo: it is at GET /v1/members/{id}/avatar?v=<avatar_version> while they are a member.

      5 fields
      • idstring or null
      • kindstring
        One ofuserapi_keyservice_accountworkloadend_usersystem
      • namestring or null
      • avatar_versionstring or null
      • emailstring or null
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/triggers" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "trg_01jcte7b16k06c684ac89xccgx",
      "object": "trigger",
      "alias": "live",
      "created_at": "2026-11-10T09:30:00.000Z",
      "created_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "cron": null,
      "event_mode": "real",
      "has_secret": true,
      "health": "ok",
      "key": "incoming",
      "last_event_at": "2026-11-10T09:30:00.000Z",
      "state": "active",
      "timezone": null,
      "type": "webhook",
      "updated_at": "2026-11-10T09:30:00.000Z",
      "updated_by": {
        "kind": "user",
        "id": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
        "name": "Ada Lovelace",
        "email": "ada@example.com"
      },
      "url": "https://api.mydeepagents.com/v1/in/k7m2p9qa/trg_01jcte7b16k06c684ac89xccgx",
      "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
post/v1/workflows/{workflow_id}/validate

Validate workflow

Needs workflow.view

Stages 1 and 2 as publish sees them, on the saved draft or on a document the canvas has not saved yet.

Path parameters

  • workflow_idstringRequired

Request bodyValidateBody

  • definitionobject or null

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

Response200

  • objectstring
    validation
  • issuesValidationIssue[]
    5 fields
    • codestring
    • messagestring
    • pathstring
    • severitystring
      One oferrorwarning
    • hintstring or null
  • validboolean

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X POST "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/validate" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "definition": {}
  }'
Response · 200
JSON
{
  "object": "validation",
  "issues": [
    {
      "code": "code",
      "hint": "hint",
      "message": "Summarise today's open tickets.",
      "path": "path",
      "severity": "error"
    }
  ],
  "valid": true
}
get/v1/workflows/{workflow_id}/versions

List workflow versions

Needs workflow.view

Path parameters

  • workflow_idstringRequired

Response200

  • objectstring
    list
  • dataWorkflowVersion[]
    11 fields
    • idstring
    • objectstring
      workflow_version
    • aliasesstring[]
    • content_hashstring
    • created_atstring
    • numberinteger
    • published_bystring
    • schema_versionstring
    • statusstring
      One ofpublishedarchived
    • workflow_idstring
    • workload_idstring
  • has_moreboolean
  • next_cursorstring or null
  • facetsmap<string, map<string, integer>> or null
  • peoplemap<string, ActorRef> or null
    5 fields
    • idstring or null
    • kindstring
      One ofuserapi_keyservice_accountworkloadend_usersystem
    • namestring or null
    • avatar_versionstring or null
    • emailstring or null
  • total_countinteger or null
  • total_count_exactboolean or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/versions" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "object": "list",
  "data": [
    {
      "id": "wfv_01jcmxemhpq07bh8677tfsgx59",
      "object": "workflow_version",
      "aliases": [
        "aliase"
      ],
      "content_hash": "content hash",
      "created_at": "2026-11-10T09:30:00.000Z",
      "number": 3,
      "published_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
      "schema_version": "schema version",
      "status": "published",
      "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
      "workload_id": "workload id"
    }
  ],
  "has_more": false,
  "next_cursor": null,
  "total_count": 1
}
put/v1/workflows/{workflow_id}/aliases/{alias}

Move workflow alias

Needs workflow.publish

Move an alias; rollback is the same call with an older version.

Path parameters

  • workflow_idstringRequired
  • aliasstringRequired
    One ofstaginglive

Request bodyAliasPut

  • versionintegerRequired
    at least 1

Response200

  • objectstring
    alias
  • aliasstring
    One ofstaginglive
  • previous_versioninteger or null
  • versioninteger
  • workflow_idstring

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PUT "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/aliases/live" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "version": 3
  }'
Response · 200
JSON
{
  "object": "alias",
  "alias": "live",
  "previous_version": 2,
  "version": 3,
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k"
}
get/v1/workflows/{workflow_id}/versions/{number}

Get workflow version

Needs workflow.view

Path parameters

  • workflow_idstringRequired
  • numberintegerRequired

Response200

  • idstring
  • objectstring
    workflow_version
  • aliasesstring[]
  • content_hashstring
  • created_atstring
  • definitionobject

    The whole definition document, as JSON. The request example shows a complete, minimal one; the draft endpoints return the same shape.

  • numberinteger
  • published_bystring
  • schema_versionstring
  • statusstring
    One ofpublishedarchived
  • workflow_idstring
  • workload_idstring

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/versions/3" \
  -H "Authorization: Bearer $MDA_API_KEY"
Response · 200
JSON
{
  "id": "wfv_01jcmxemhpq07bh8677tfsgx59",
  "object": "workflow_version",
  "aliases": [
    "aliase"
  ],
  "content_hash": "content hash",
  "created_at": "2026-11-10T09:30:00.000Z",
  "definition": {},
  "number": 3,
  "published_by": "usr_01jcf1j9wjxfrnhqda3mq7ejxn",
  "schema_version": "schema version",
  "status": "published",
  "workflow_id": "wf_01jctgae7hqqg3qxjfrgs9t89k",
  "workload_id": "workload id"
}
put/v1/workflows/{workflow_id}/bindings/{alias}/{slot}

Put workflow binding

Needs workflow.edit

Choose what fills a slot. An authorization event: it also needs connection.use for a connection or MCP server, agent.run for an agent.

Path parameters

  • workflow_idstringRequired
  • aliasstringRequired
    One ofdraftstaginglive
  • slotstringRequired

Request bodyWorkflowBindingPut

  • agent_aliasstring or null
    One ofdraftstaginglive
  • agent_idstring or null
  • connection_idstring or null
  • mcp_server_idstring or null

Response200

  • objectstring
    binding
  • aliasstring
    One ofdraftstaginglive
  • revisioninteger
  • slotstring
  • target_idstring
  • target_typestring
    One ofconnectionmcp_serverknowledge_baseagentworkflowcode_toola2a_agent
  • updated_atstring
  • target_aliasstring or null

Status codes

  • 200Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X PUT "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/bindings/live/crm" \
  -H "Authorization: Bearer $MDA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_alias": "draft",
    "agent_id": "agt_01jctdbahw9btk5p831xs974yq",
    "connection_id": "con_01jc9ekd74h6eg79ggg89yx7py",
    "mcp_server_id": "mcp_01jc832gmyrb97hnzx3h75bsfd"
  }'
Response · 200
JSON
{
  "object": "binding",
  "alias": "live",
  "revision": 2,
  "slot": "crm",
  "target_alias": "target alias",
  "target_id": "target id",
  "target_type": "connection",
  "updated_at": "2026-11-10T09:30:00.000Z"
}
delete/v1/workflows/{workflow_id}/bindings/{alias}/{slot}

Delete workflow binding

Needs workflow.edit

Path parameters

  • workflow_idstringRequired
  • aliasstringRequired
    One ofdraftstaginglive
  • slotstringRequired

Response204

Answers 204 with no body.

Status codes

  • 204Successful Response
  • 422The request is not valid: errors[] names each field.
  • 4XXThe request was refused: the problem says why.
  • 5XXThe API could not answer: the problem says why.
Request
curl -X DELETE "https://api.mydeepagents.com/v1/workflows/wf_01jctgae7hqqg3qxjfrgs9t89k/bindings/live/crm" \
  -H "Authorization: Bearer $MDA_API_KEY"

Build with us

Ready for your first call?

Early access is open. Tell us what you want your agents to do, and we will help you get your first key.