Skip to content
Inkbox

Inkbox

BlogContactDocs
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Webhooks

Webhooks let you receive HTTP POST callbacks the moment a connected human messages or tapbacks your agent, and as your agent's outbound messages move through their delivery lifecycle. iMessage events are delivered via the Webhook Subscriptions API — attach a subscription to the agent identity with the subset of imessage.* events you want.

The agent identity is the subscription owner (rather than a mailbox or phone number) because iMessage conversations ride a shared pool of lines that aren't org resources — the identity is the stable thing the events belong to.

Event types

EventDescription
imessage.receivedA connected human sent your agent a message
imessage.reaction_receivedA connected human tapbacked one of the thread's messages
imessage.sentAn outbound message from your agent was accepted for delivery
imessage.deliveredAn outbound message reached the recipient's device
imessage.delivery_failedAn outbound message failed to deliver — the payload carries the error fields

Inbound traffic rejected by a contact-rule block or by default-block in whitelist mode emits no webhooks. Blocked messages are stored, and admin API keys or the Inkbox Console can audit them with is_blocked=true. Fan-out also pauses while the identity is paused or has imessage_enabled: false. Tapback removals do not fire an event; the next message read simply no longer includes the removed tapback.

Subscribing

Subscribe to any subset — add imessage.sent, imessage.delivered, and imessage.delivery_failed to the same subscription to track outbound delivery. See Webhook Subscriptions for listing, updating, and deleting subscriptions, and Signing keys for verifying that deliveries came from Inkbox.

Payload envelope

Every delivery POSTs a JSON envelope:

FieldTypeDescription
event_typestringOne of the five imessage.* event types
timestampstring (ISO 8601)When the event occurred
dataobjectThe event payload — see below

data carries exactly one of message (for imessage.received and the delivery-lifecycle events) or reaction (for imessage.reaction_received), plus peer-resolution lists:

FieldTypeDescription
data.messageobject | nullThe stored message on imessage.received, imessage.sent, imessage.delivered, and imessage.delivery_failed; null on reaction events
data.reactionobject | nullThe stored reaction on imessage.reaction_received; null on message events
data.contactsarrayContact matches for the human's number, visible to the receiving identity. Always present, possibly empty — each entry has id and name
data.agent_identitiesarrayIdentity matches when the human's number belongs to another active agent identity in your org. Always present, possibly empty — each entry has id, agent_handle, and display_name

imessage.received

JSONJSON

The message shape matches the Message object, with one difference: webhook payloads carry no is_blocked field, because blocked messages never reach the webhook at all.

imessage.reaction_received

JSONJSON

reaction can be any of the classic six or "custom" with the literal emoji in custom_emoji. Remember the replacement rule: a new tapback from the same human on the same message replaces their previous one, so treat the latest event as the current state for that sender.

Delivery lifecycle events

Outbound messages fire an event on each message-level status transition: imessage.sent when the message is accepted for delivery, then imessage.delivered when it reaches the recipient's device, or imessage.delivery_failed if delivery fails. Only outbound messages produce these events, and only when the message as a whole changes status — per-recipient bookkeeping that doesn't move the message's own status does not fire.

The three payloads share one shape and differ only in event_type, the message's status, and the error fields:

JSONJSON

On imessage.sent the message arrives with status: "sent", on imessage.delivered with status: "delivered", both with the error fields null. On imessage.delivery_failed the message's status is "declined" or "error" and the error fields describe what went wrong.

Delivery semantics

  • Deliveries are fire-and-forget HTTP POSTs; your response status is logged but does not affect message processing. Respond 2xx quickly and process asynchronously.
  • Each subscription on the identity receives its own POST per event, independently.
  • Verify deliveries with your signing key before trusting the payload.

Additional resources

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

Y CombinatorBacked by Y Combinator
Webhooks