VocalDocscontracts 1.65.0

Update a notification rule

PATCH /v1/notification-rules/{notification_rule_id}

PropertyValue
Operationupdate_notification_rule
GroupNotification rules
Scopemessages:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited channels.notification_rule.update (mutation)
Released in1.60.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Changes the rule at the revision If-Match names, checked as a create is (1.60.0).

Request

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

curl -X PATCH "$VOCAL_API/v1/notification-rules/ntr_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY" \
  -H 'If-Match: "1"' \
  -H "Content-Type: application/json" \
  -d '{}'

Parameters

NameInTypeRequiredDescription
notification_rule_idpathNotificationRuleIdyesThe id of a notification rule: ntr_ 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: NotificationRuleUpdateRequest.

FieldTypeRequiredDescription
enabledbooleanno
event_typesarray of NotificationEventTypeno
filterstring or nullno
fixed_argumentsNotificationArgumentsInputno
namestringno
templatestringno

Responses

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

Fields of the 200 answer

The shape is NotificationRule.

FieldTypeRequiredDescription
connection_idConnectionIdyes
created_atTimestampyes
enabledbooleanyes
event_typesarray of NotificationEventTypeyesThe record event types it delivers (RECORD_EVENT_TYPES).
filterstring or nullyesA ZEN expression over the event envelope; null delivers every event.
fixed_argumentsNotificationArgumentsyesEvery argument but the text, fixed at save, such as the destination channel.
idNotificationRuleIdyes
namestringyes
object"notification_rule"yes
organization_idOrganizationIdyes
revisionintegeryes
templatestringyesThe text in the closed template language of prompt-manager.md section 3, over the event envelope's fields; in PHI mode the envelope carries identifiers only.
toolUpstreamToolNameyesA notify tool of the Connection's Connector.
updated_atTimestampyes