VocalDocscontracts 1.65.0

Read a pre-call hook

GET /v1/pre-call-hooks/{hook_id}

PropertyValue
Operationget_pre_call_hook
GroupPre-call hooks
Scopehooks:read
Route classread
IdempotencyNo Idempotency-Key
AuditNot audited: A configuration read; a hook is not Call content and its secret is never answered.
Released in1.52.0
Phase 0 hostServed (the hosted api pins 1.65.0)

Request

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

curl "$VOCAL_API/v1/pre-call-hooks/pch_..." \
  -H "Authorization: Bearer $VOCAL_API_KEY"

Parameters

NameInTypeRequiredDescription
hook_idpathPreCallHookIdyesThe id of a pre-call hook: pch_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.

Responses

StatusContent typeShapeError codes
200application/jsonPreCallHook
400application/jsonErrorEnvelopeinvalid_request
401application/jsonErrorEnvelopeunauthenticated
403application/jsonErrorEnvelopeforbidden
404application/jsonErrorEnvelopenot_found
429application/jsonErrorEnveloperate_limited
500application/jsonErrorEnvelopeinternal_error

Fields of the 200 answer

The shape is PreCallHook.

FieldTypeRequiredDescription
allowed_agent_idsarray of AgentIdyesAgents besides the routed one whose published versions a response may select; empty allows only versions of the routed Agent.
consecutive_failuresintegeryes
created_atTimestampyes
defaultPreCallHookDefault or nullyes
directionsarray of PreCallHookDirectionyes
idPreCallHookIdyes
object"pre_call_hook"yes
on_failurePreCallHookOnFailureyes
phi_attested_atTimestamp or nullyesWhen an owner attested the endpoint for PHI; null before.
phi_attested_byMemberId or nullyes
previous_secret_expires_atTimestamp or nullyes
previous_secret_hintstring or nullyes
revisionintegeryes
scopePreCallHookScopeyes
secret_hintstringyesThe last four characters of the current secret.
statusPreCallHookStatusyes
timeout_msinteger or nullyesThe deadline of a request; null for the default of each direction.
updated_atTimestampyes
urlstringyesThe endpoint.