VocalDocscontracts 1.65.0

Replay a Trigger event's action

POST /v1/trigger-events/{trigger_event_id}/replay

PropertyValue
Operationreplay_trigger_event
GroupTriggers
Scopeintegrations:write
Route classcontrol
IdempotencyIdempotency-Key required: a retry with the same key replays the first answer
AuditAudited integrations.trigger_event.replay (mutation)
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Queues a trigger_event.replay job that runs the event's action again under its original id, and answers 202 with it and its Location (1.60.0; integrations-operations.md section 3). A replayed start_call returns the existing Call unless force is set, which needs an owner or admin (forbidden, owner_or_admin_required). A filtered event has no action to replay (validation_failed, trigger_event_not_replayable). Every replay writes an Audit event.

Request

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

curl -X POST "$VOCAL_API/v1/trigger-events/tev_.../replay" \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
trigger_event_idpathTriggerEventIdyesThe id of a Trigger event: tev_ 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: TriggerEventReplayRequest.

FieldTypeRequiredDescription
forcebooleannoStarts a new Call where the replayed start_call would return the existing one; an owner or admin only (owner_or_admin_required). False when omitted.

Responses

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

Fields of the 202 answer

The shape is Job.

FieldTypeRequiredDescription
created_atTimestampyes
created_byActorRefyes
errorJobError or nullyesWhy the job failed, a code and a message; null otherwise.
finished_atTimestamp or nullyes
has_result_filebooleanyesTrue when the result is a file, fetched through POST /v1/jobs/{job_id}/result-url.
idJobIdyes
object"job"yes
progressJobProgressyes
resourceJobResource or nullyes
resultJobResult or nullyesA small result inline once succeeded, typed by the job type (WebhookReplayJobResult for webhook.replay, from 1.53.0 KnowledgeEvaluationJobResult for knowledge.evaluation, from 1.55.0 PromptEvalRunJobResult for prompt.evaluation and agent.conversation_test, from 1.56.0 AnalysisJobResult for call.analyze); null before.
started_atTimestamp or nullyes
statusJobStatusyes
typeJobTypeyes