Skip to content
Inkbox

Inkbox

BlogContactDocs
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Webhooks

Webhooks let you receive HTTP POST callbacks for phone number events. Configure webhook URLs directly on your phone number via PATCH /numbers/{phone_number_id} — no separate webhook CRUD is needed.

Event types

EventDescription
phone.incoming_callAn inbound call hit a phone number configured for webhook call handling
text.receivedAn inbound SMS or MMS arrived on a phone number with text webhooks enabled

Configuring webhooks PATCH

PATCH /numbers/{phone_number_id}

To enable incoming-call webhooks, set incoming_call_action to "webhook" and provide an incoming_call_webhook_url on the phone number. To enable inbound text webhooks, set incoming_text_webhook_url.

Request body

FieldTypeDescription
incoming_call_actionstringSet to "webhook" to enable webhook callbacks for incoming calls
incoming_call_webhook_urlstringHTTPS endpoint to receive incoming-call webhook POSTs
incoming_text_webhook_urlstringHTTPS endpoint to receive inbound SMS/MMS webhook POSTs

Request example

JSONJSON

Code examples


Incoming call webhook

When a phone.incoming_call event fires, Inkbox sends a signed POST request to the configured webhook URL. Your endpoint must respond with an action instructing Inkbox how to handle the call:

JSONJSON

Response fields

FieldTypeDescription
actionstring"answer" to accept the call, "reject" to decline
client_websocket_urlstringWebSocket URL that Inkbox connects to for the call. Can carry text or audio, depending on how the connection is configured. Falls back to the phone number's configured client_websocket_url if omitted.

Incoming text webhook

When a text.received event fires, Inkbox sends a signed POST request to the configured incoming_text_webhook_url. This webhook is fire-and-forget: any response body is ignored.

Payload shape

The payload includes:

  • event_type: "text.received"
  • timestamp
  • data.text_message with the stored inbound SMS/MMS record

Verifying webhook signatures

Inkbox signs every webhook payload with your organization's signing key. Create or rotate your key via the Signing Keys guide. Three headers are included with each request:

HeaderDescription
X-Inkbox-Request-IDUnique request identifier
X-Inkbox-TimestampUnix timestamp (seconds)
X-Inkbox-Signaturesha256=<hex_digest> HMAC-SHA256 signature

The signature input is: {request_id}.{timestamp}.{raw_body}

To verify a webhook:

  1. Check the timestamp is within 300 seconds of the current time
  2. Reconstruct the signed message: {X-Inkbox-Request-ID}.{X-Inkbox-Timestamp}.{raw_body}
  3. Compute the HMAC-SHA256 using your organization's signing key
  4. Compare the hex digest with the sha256=... value from the header

Python verification example

PythonPython

Disabling webhooks

To stop receiving webhooks, update the phone number to remove the webhook URL and change the action:

JSONJSON

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Webhooks