Run Record Action
POST/api/automation/record-actions/:workflow/run
Run a record-action workflow on one record, a selection of records, or every record matching a filter.
Required scope:
settings:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Requires workflows.run, view permission on the resource, and a role allowed by the workflow. The workflow must be published, be a record action, and be bound to the resource sent.
Body
resource(required) - One ofsupplier,product,sales_order,purchase_order,customer. Must match the workflow's resource.scope(required) -idsorfilter.ids(required whenscope=ids) - array of distinct record ids, at least 1 and at most the workflow'smax_records.filters(required, may be empty, whenscope=filter) - the same filter keys the resource's list endpoint accepts (e.g.search,archived, column filters such asname.contains, or afilter_groupstree). Runs on up to 10,000 matching records; archived suppliers and customers are excluded unless the filter mentionsarchived.inputs(optional object) - values for the workflow's declared inputs (seeinputs[]in List Record Actions). Validated against the inputs saved on the workflow: number -> numeric, boolean -> boolean, date -> date, select -> one of its options (an array when it allows several), text -> string up to 2000 chars. Required inputs must be present; omitted inputs with a literal default take that default. A value that is still an unresolved{{ ... }}expression counts as missing, so a required input left that way returns 422. Undeclared keys are dropped.
Responses
- 201 - one record (
scope=idswith a single id): the run was created and queued. Returnsexecutions[]with itsid,statusand pageurl. - 202 - several records or a filter: a background job starts the runs. Returns
tracked_job_id(follow it with the tracked job log endpoints in the Administration collection) and, forscope=ids,executions_count. Records over the hourly run limit are skipped and counted in the job summary. - 403 - missing permission or role.
- 404 - the workflow, or the single record, does not exist.
- 409 - this workflow is already running on that record;
execution_idis the in-flight run. - 422 - validation errors, or the workflow changed (unpublished or no longer a record action) or runs on a different resource.
- 423 - automation is turned off for the account.
- 429 - rate limited: more than 60 run requests a minute for the account, or more than 1,000 record-action runs of this workflow in an hour. The body and the
Retry-Afterheader give the seconds to wait.
Request
Responses
- 201
- 202
- 401
- 403
- 404
- 409
- 422
- 423
- 429
Created
Response Headers
Content-Type
Accepted
Response Headers
Content-Type
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden
Response Headers
Content-Type
Not Found
Response Headers
Content-Type
Conflict
Response Headers
Content-Type
Unprocessable Entity
Response Headers
Content-Type
Locked
Response Headers
Content-Type
Too Many Requests
Response Headers
Content-Type
Retry-After