Skip to main content

Workflows API

In the paths, the resource is named workflows, in English. The interface calls them flujos (workflows); the API says workflows.

Base path: /builder/v1/workflows. Same authentication and conventions as the Agents API: Authorization: Bearer <token>, attributes in camelCase, dates in ISO 8601 UTC, {"data": ..., "meta": ...} envelope.

Resource model​

ResourceDescription
WorkflowDefinition (name, description) and status: draft, published, paused, needs_attention, archived.
GraphNodes and connections of the draft. The catalog of node types is obtained from GET /workflows/node-types (Nodes and components).
ReleaseEach publication creates a numbered version with its manifest; deployment indicates which one is active.
ConnectionInput or output channel: webhook, WhatsApp, internal input or output. A webhook has a URL, a token and events.
RunRun with status (queued, running, paused, completed, failed, cancelled), origin (manual, webhook, scheduled, channel), trace, events, activity and analytics.
Thread / recordConversation with its messages (thread) and run record with its exchanges (record).
TemplatePrebuilt workflow that you instantiate as your own.

Operations​

Definition and lifecycle​

Method and pathWhat it does
GET /workflows, POST /workflowsList and create.
GET, PATCH, DELETE /workflows/{id}Read, edit the draft, delete. GET /workflows/{id}/delete-impact indicates what is affected before deleting (agents that use it as a tool).
POST /workflows/{id}/validateValidates the graph without publishing: unconnected nodes, incomplete channels.
POST /workflows/{id}/publishPublishes: creates a release and activates it.
POST /workflows/{id}/pause, /resumePause and resume the published version.
POST /workflows/{id}/archive, /restoreArchive and restore. POST /workflows/batch/archive archives several.
POST /workflows/{id}/cloneCopies the draft as a new workflow.
GET /workflows/{id}/export, POST /workflows/importExport and import the definition (to move workflows between Clients or to version them).
POST /workflows/{id}/previewRuns the draft with a test input without recording it as a run.

Versions​

Method and pathWhat it does
GET /workflows/{id}/releasesPublished versions.
GET /workflows/{id}/releases/{releaseId}, /manifest, /runtime-statusDetail of a version, its manifest and whether it is loaded in the runtime.
GET /workflows/{id}/deployments, POST .../{deploymentId}/activateSee which version is active and go back to an earlier one.

Channels and webhooks​

Method and pathWhat it does
GET, PUT /workflows/{id}/connectionsRead and configure the channels (webhook, WhatsApp, internal).
GET, POST /workflows/{id}/webhooks, GET /.../{webhookId}Inbound webhooks of the workflow.
POST /workflows/{id}/webhooks/{webhookId}/regenerate-tokenNew token; the previous one stops working.
GET /workflows/{id}/webhooks/{webhookId}/events, /events/{eventId}Calls received by the webhook and their result.
GET /workflows/{id}/webhook-credentials, POST .../inbound/regenerateCredentials of the inbound webhook.
GET, POST, DELETE /workflows/{id}/webhook-credentials/outbound[/{id}]Credentials that the workflow uses when it calls external systems (the Solicitud HTTP, or HTTP request, node).

Runs​

Method and pathWhat it does
GET /workflows/{id}/runs, GET /workflows/runs/summariesList runs (filters by origin, period and result) and summaries per workflow.
GET /workflows/{id}/runs/{runId}Detail: status, origin, input and output payload.
GET .../runs/{runId}/trace, /events, /activity, /analyticsTrace (nodes, tools, models, errors), events, timeline and metrics of that run.
POST .../runs/{runId}/cancel, /stopCancel while queued or stop while in progress.
POST .../runs/{runId}/resolve-waitResolve a Revisión humana (Human review): approve or reject the fields and continue.

Conversations and records​

Method and pathWhat it does
GET /workflows/{id}/threads, GET .../threads/{threadId}, GET .../messagesConversations of the workflow and their messages. POST /workflows/threads/batch reads several.
GET, POST, DELETE .../threads/{threadId}/operator-state[/release]Take and release control of a conversation (human operator), where the installation allows it.
GET /workflows/{id}/records, /records/{recordId}, /records/{recordId}/exchangesRun records (what you see in the Registros, or Logs, tab) and their exchanges.
GET .../records/filters, /records/participantsValues available for filtering and list of participants.
POST .../records/threads/{threadId}/nudgeResend a reminder to the participant of a conversation.

Metrics, testing and templates​

Method and pathWhat it does
GET /workflows/{id}/analytics, /analytics/summary, /analytics/runsWhat the Resumen (Summary) tab shows: runs, median and p95 duration, tokens, cost for the month, runs per day.
GET /workflows/{id}/activityRecent activity of the workflow.
GET, POST /workflows/{id}/test-agentThe internal test agent of Probar flujo (Test workflow).
GET, POST /workflows/{id}/teams, /teams/{teamId}Private teams of the workflow.
GET /workflows/templates, /templates/{templateId}, POST .../instantiateTemplates, and creating a workflow from one.
POST /workflows/expression/previewEvaluate a Condición (Condition) expression against a sample JSON before saving it.

Trigger a published workflow by webhook​

curl -X POST "<URL del webhook>" \
-H "Authorization: Bearer <token del canal>" \
-H "Content-Type: application/json" \
-d '{"text": "..."}'

The response includes the output of the Enviar resultado (Send result) node and the identifier of the run. With Modo asíncrono (Async mode) on the channel, the response is 202 with the identifier, and you query the result at GET /workflows/{id}/runs/{runId}.

Errors​

HTTPcodeWhen
400invalid_bodyInvalid graph or configuration; the message names the node.
404workflow_not_foundIt does not exist, is not yours, or was deleted.
409unpublished_changesThe operation requires publishing first.
422channel_incompleteA channel is not configured; check the Canales (Channels) tab.

Exact paths and schemas in your installation's OpenAPI: /builder/v1/openapi.json.