Read a pre-call hook
GET /v1/pre-call-hooks/{hook_id}
Property Value Operation get_pre_call_hookGroup Pre-call hooks Scope hooks:readRoute class readIdempotency No Idempotency-Key Audit Not audited: A configuration read; a hook is not Call content and its secret is never answered. Released in 1.52.0 Phase 0 host Served (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 Node.js Python
curl "$VOCAL_API/v1/pre-call-hooks/pch_..." \
-H "Authorization: Bearer $VOCAL_API_KEY"const response = await fetch(`${process.env.VOCAL_API}/v1/pre-call-hooks/pch_...`, {
headers: {
Authorization: `Bearer ${process.env.VOCAL_API_KEY}`,
},
});
console.log(response.status, await response.text());import os
import requests
response = requests.get(
f"{os.environ['VOCAL_API']}/v1/pre-call-hooks/pch_...",
headers={
"Authorization": f"Bearer {os.environ['VOCAL_API_KEY']}",
},
)
print(response.status_code, response.text)
Parameters
Name In Type Required Description hook_idpath PreCallHookId yes The id of a pre-call hook: pch_ and the row's UUIDv7 in 26 Crockford base32 characters. Opaque and safe to log.
Responses
Fields of the 200 answer
The shape is PreCallHook .
Field Type Required Description allowed_agent_idsarray of AgentId yes Agents besides the routed one whose published versions a response may select; empty allows only versions of the routed Agent. consecutive_failuresinteger yes created_atTimestamp yes defaultPreCallHookDefault or nullyes directionsarray of PreCallHookDirection yes idPreCallHookId yes object"pre_call_hook"yes on_failurePreCallHookOnFailure yes phi_attested_atTimestamp or nullyes When an owner attested the endpoint for PHI; null before. phi_attested_byMemberId or nullyes previous_secret_expires_atTimestamp or nullyes previous_secret_hintstring or null yes revisioninteger yes scopePreCallHookScope yes secret_hintstring yes The last four characters of the current secret. statusPreCallHookStatus yes timeout_msinteger or null yes The deadline of a request; null for the default of each direction. updated_atTimestamp yes urlstring yes The endpoint.