Appearance
Lookup hook (optional, synchronous)
If the consumer has a lookup_url, Calloop calls it before ringing anyone for an inbound call. It isn't called for a call your billing account refuses: that call ends as BILLING_REFUSED straight away.
POST <lookup_url>
Content-Type: application/json
X-Calloop-Signature: t=…,v1=…json
{
"tenant_ref": "biz-123",
"channel": "WHATSAPP",
"channel_address": "+442079460000",
"customer": { "address": "+447700900123", "address_type": "E164", "name": "WhatsApp profile name" }
}The signature is computed as for events, with the same webhook secret (a consumer with a lookup_url gets one even without a webhook url). Redirects are not followed. Reply 2xx within 1.5 seconds with any of:
json
{
"customer_name": "Jane Doe",
"external_ref": "contact-991",
"consumer_metadata": { "crm_contact_id": 991 },
"action": "reject"
}| Field | Effect |
|---|---|
customer_name | Replaces the customer's name, if a string |
external_ref | Stored on the call, truncated to 191 characters |
consumer_metadata | Stored on the call, if an object |
action: "reject" | Declines the call: it ends as REJECTED (terminatedBy: SYSTEM) without ringing anyone |
Anything else is ignored. A timeout, an error or a non-2xx answer is ignored too — the call continues without the enrichment.