VocalDocscontracts 1.65.0

Update a Trigger subscription

PATCH /v1/trigger-subscriptions/{subscription_id}

PropertyValue
Operationupdate_trigger_subscription
GroupTriggers
Scopeintegrations:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited integrations.trigger_subscription.update (mutation)
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Changes the subscription at the revision If-Match names, checked as a create is; the change applies to the next event (1.60.0).

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 PATCH "$VOCAL_API/v1/trigger-subscriptions/trs_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
subscription_idpathTriggerSubscriptionIdyesThe id of a Trigger subscription: trs_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
if-matchheaderstringyesThe revision the change was made against, quoted as the ETag returns it, or * to overwrite.

Request body

Content type application/json, required: TriggerSubscriptionUpdateRequest.

FieldTypeRequiredDescription
actionTriggerActionInputno
enabledbooleanno
filterZenExpression or nullno
namestringno
rate_limit_per_minuteintegerno

Responses

StatusContent typeShapeError codes
200application/jsonTriggerSubscription
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden, org_suspended
404application/jsonErrorEnvelopenot_found
409application/jsonErrorEnvelopeconnection_revoked
412application/jsonErrorEnveloperevision_mismatch
422application/jsonErrorEnvelopevalidation_failed, capability_not_available
428application/jsonErrorEnvelopeprecondition_required
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is TriggerSubscription.

FieldTypeRequiredDescription
actionTriggerActionyes
connection_idConnectionIdyes
connector_idConnectorIdyes
created_atTimestampyes
enabledbooleanyes
event_typeTriggerEventTypeNameyes
filterZenExpression or nullyesA ZEN expression over the event's typed fields; null acts on every event.
idTriggerSubscriptionIdyes
namestringyes
object"trigger_subscription"yes
organization_idOrganizationIdyes
previous_token_expires_atTimestamp or nullnoAfter a token rotation (1.61.0), when the previous token stops verifying, 24 hours later (a target); null otherwise, absent from an api before 1.61.0.
rate_limit_per_minuteintegeryes
revisionintegeryes
statusTriggerSubscriptionStatusyes
subscription_tokenstring (password) or null (password)yesThe token of the edge path /v1/triggers/{connector_id}/{subscription_token}, 32 random bytes in base64url: answered once by the create, null in every other answer.
token_hintstringyesThe last characters of the subscription token.
updated_atTimestampyes