Open or pause the entries of a workflow
PUT /workflows/{uuid}/entry_state
/workflows/{uuid}/entry_stateOpens or pauses the entries of a published workflow, all of them or those of one trigger of its published version (trigger_uuid), and answers it as get_workflow reads it (entries_open and triggers[].entry_state). It publishes nothing. entries_open (the whole workflow) and each triggers[].entry_state (open or paused) are independent: without trigger_uuid it acts only on the whole workflow and does NOT reopen a trigger that was paused one by one; reopen that one with its trigger_uuid. It does not change draft_version.
When to use: To stop new records from entering while those already inside finish, for example before replacing a trigger or after a campaign ends; or to stop one trigger only; and to open them again.
When not to use: To also stop the executions already inside, use pause_workflow. To remove a trigger for good, remove it from the draft with update_workflow and publish.
Side effects: paused: no new record enters through those entries, what is already inside goes on to the end, and the events that arrive meanwhile are not kept for later (reopening does not replay them). open: new events enter again from now on. Pausing the entries of the whole workflow prevails over each trigger. Pausing entries does not free a slot of the plan limit of automations (pause_workflow does), and it does not need a responsible who can act; opening does. Repeating the current state changes nothing.
Permissions: Requires the automations.manage capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the workflow. Get it from list_workflows.
uuidThe updated Workflow resource
TypeScript Definitions
Use the request body type in TypeScript.
Workflows of the new automation engine in the public API (F7, task B4; writes since the plan «flujos en la API pública», T7 and T8). It
reads them (list_workflows, get_workflow), creates them and saves their draft (create_workflow, update_workflow) and runs
their lifecycle (publish_workflow, pause_workflow, resume_workflow, set_workflow_entry_state, delete_workflow), so that an
external client or an AI, through the public MCP, can build, publish and run a workflow end to end; the review of the draft is
{@see WorkflowValidationResource}. Each provider or processor checks its capability before the use case
({@see \App\Application\Automation\ApiWorkflowAccess}: automations.read to read, automations.work to create and save,
automations.manage for the lifecycle, as in the internal API), because API Platform evaluates security after the provider; the
rules, the visibility, CRM in the plan, the plan limit of automations and the audit (origin api) are those of the CoreBundle use
cases the internal API and Maia run (Service\App\Automation\Workflows).
The list gives the summary (with the execution counts); get_workflow the whole workflow with its draft (definition, the format 3
document as stored, in camelCase like the internal API: it is a declarative document, not API fields), the triggers of the published
version, the versions and the responsible. Creating and saving answer the same workflow plus validation (the review of the saved
draft) and neither publishes nor starts anything. Publishing has no confirmation step (decision of Sergio: an external API does not
treat an AI differently): its side effects are explained in its description, as in automation_activate. The lifecycle operations
answer the workflow as get_workflow reads it, and delete_workflow nothing (204). A workflow that the account does not have is 404
workflow_not_found.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X PUT "https://api.easymailing.com/workflows/3f6c2a1e-8b4d-4c7a-9e10-5d2b7a9c4e61/entry_state" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "entry_state": "open", "trigger_uuid": "43e2987b-434b-472d-969b-3472dba75b7d" }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "title": "string", "status": "draft", "published_revision": 0, "unpublished_changes": true, "trigger_catalog_ids": [ "string" ], "entries_open": true, "paused_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "updated_by": "deea00dc-b6b6-4412-a483-26ac61e1f6fe", "draft_version": 1, "definition": {}, "triggers": [ { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "entry_state": "open", "published_since_revision": 1 } ], "versions": [ { "revision": 1, "published_at": "2019-08-24T14:15:22Z", "published_by": "9ac9eee7-2153-423d-b22d-04e12679154a", "node_count": 0 } ], "resuming": true, "responsible": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "name": "string", "email": "string", "can_act": true }}