VocalDocscontracts 1.65.0

Update an event filter

PATCH /v1/event-filters/{filter_id}

PropertyValue
Operationupdate_event_filter
GroupEvents
Scopewebhooks:write
Route classcontrol
IdempotencyNo Idempotency-Key
AuditAudited webhooks.event_filter.update (mutation)
Released in1.52.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Replaces the named fields at the revision If-Match names (1.52.0); the next event the relay matches reads the new values, and an open stream connection keeps the values it read when it opened. Every issue is a detail of 422 validation_failed (EventFilterIssueCode): event_filter_empty when every selecting field is empty and event_filter_value_repeated for a value named twice.

Request

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

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

Parameters

NameInTypeRequiredDescription
filter_idpathEventFilterIdyesThe id of an event filter: evf_ 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: EventFilterUpdateRequest.

FieldTypeRequiredDescription
agent_idsarray of AgentIdnoEvents whose Call, or Agent version, belongs to one of these Agents.
environmentsarray of EnvironmentnoThe environments to match; empty matches both, as livemode stays in the envelope.
namestringno
phone_number_idsarray of PhoneNumberIdnoEvents of Calls on one of these Phone numbers.
tagsarray of CallTagnoEvents of Calls carrying any of these tags, which a pre-call hook sets.
trace_typesarray of TraceEventTypenoThe trace types a call.trace.ready keeps; empty keeps every one.

Responses

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

Fields of the 200 answer

The shape is EventFilter.

FieldTypeRequiredDescription
agent_idsarray of AgentIdyesEvents whose Call, or Agent version, belongs to one of these Agents.
created_atTimestampyes
environmentsarray of EnvironmentyesThe environments to match; empty matches both, as livemode stays in the envelope.
idEventFilterIdyes
namestringyes
object"event_filter"yes
phone_number_idsarray of PhoneNumberIdyesEvents of Calls on one of these Phone numbers.
revisionintegeryesCounts writes; returned as the ETag and required in If-Match.
tagsarray of CallTagyesEvents of Calls carrying any of these tags, which a pre-call hook sets.
trace_typesarray of TraceEventTypeyesThe trace types a call.trace.ready keeps; empty keeps every one.
updated_atTimestampyes