VocalDocscontracts 1.65.0

Deliver an event to a Process instance

POST /v1/processes/{process_id}/events

PropertyValue
Operationcreate_process_event
GroupProcesses
Scopeprocesses:write
Route classcontrol
IdempotencyIdempotency-Key required: a retry with the same key replays the first answer
AuditAudited processes.event.deliver (mutation)
Released in1.62.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Records a Process event for one instance, source customer, and writes its event command, and answers 202 with the event matched (1.62.0); an instance not yet waiting for it gets it once it waits. A name the platform delivers is event_name_reserved and data above 32 KiB (a target) data_too_large (ProcessEventIssueCode); an instance that ended is process_not_active. The Idempotency-Key records a repeated delivery once.

Request

Set VOCAL_API to the base URL of your API and VOCAL_API_KEY to an API key with the processes:write scope (Authentication and keys). Replace each placeholder, such as agt_... or <name>, with your own value.

curl -X POST "$VOCAL_API/v1/processes/prc_.../events" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "name": "<name>" }'

Parameters

NameInTypeRequiredDescription
process_idpathProcessInstanceIdyesThe id of a Process instance: prc_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
idempotency-keyheaderstringyesA client-chosen key, kept 24 hours per Organization, environment and route. A replay returns the stored response.

Request body

Content type application/json, required: ProcessEventCreateRequest.

FieldTypeRequiredDescription
datamap of anynoA JSON object of at most 32 KiB (a target). Content.
nameWorkflowNameyesThe name a wait node of the instance lists.

Responses

StatusContent typeShapeError codes
202application/jsonProcessEvent
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeprocess_not_active, idempotency_in_progress, idempotency_key_reused
422application/jsonErrorEnvelopevalidation_failed
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 202 answer

The shape is ProcessEvent.

FieldTypeRequiredDescription
created_atTimestampyes
custom_event_idEventId or nullyesThe customer-emitted event it came from, through POST /v1/events; null otherwise.
dataobject or nullyesContent; null unless the read names include=content, and on every write.
idProcessEventIdyes
nameWorkflowNameyesThe name a wait node lists, such as payment.received.
object"process_event"yes
process_idsarray of ProcessInstanceIdyesThe instances it matched; empty when none.
sourceProcessEventSourceyes
statusProcessEventStatusyes
workflow_idWorkflowId or nullyesThe Process it was delivered to; null for one delivered to an instance by id.