Skip to content
Inkbox

Inkbox

DocsPricingBlogContact
GuidesAPI ReferenceChangelog

Ctrl K

GuidesAPI ReferenceChangelog

Jump to

iMessage API

API-first iMessage for AI agents. Use the shared Inkbox iMessage router or attach a dedicated number, then read and send messages, use tapbacks, read receipts, typing indicators, and media, and subscribe to events via webhooks.

API base URL:

https://inkbox.ai/api/v1/imessage

Quick start

Create an account and get your API key from the Inkbox console:

Get API key

All API requests require authentication using an API key:

X-API-Key: YOUR_API_KEY

Three things to know before your first call:

  • iMessage is opt-in per identity. Set imessage_enabled: true when creating or updating an identity.
  • The number type defines what the identity can do. An outbound number can start new conversations. An inbound number can reply in existing conversations. The shared service dynamically assigns a number when someone connects to your agent.
  • Shared and inbound conversations start with the human. Recipients connect to a shared identity by texting connect @your-handle to the router number. A dedicated outbound number can start a new conversation.
  • Group chats require a dedicated outbound number. Use the existing send endpoint with 2-8 E.164 recipients, then keep the returned conversation_id as the canonical group key. Creation is asynchronous, and conversation reads report group_creation_status as creating, not_created, or ready. Existing lists exclude groups unless include_groups=true.

Dedicated numbers

Dedicated numbers belong to your organization and can be attached to an iMessage-enabled identity. The type field is the capability source:

TypeCapability
dedicated_outboundOutbound: Can start new 1:1 conversations and group chats.
dedicated_inboundInbound: Can reply in existing conversations.
Shared serviceShared: Dynamically assigned when someone connects to your agent.

List dedicated numbers GET

GET /numbers

Returns every dedicated iMessage number owned by the caller's organization, including numbers that are not attached to an identity.

Response (200)

JSONJSON
FieldTypeDescription
idUUIDDedicated-number identifier
numberstringiMessage number in E.164 format
typestringdedicated_inbound or dedicated_outbound; this field defines the number's capabilities
statusstringactive; existing numbers may return paused as a read-only compatibility value. This field cannot be set through number or identity update requests.
agent_identity_idUUID | nullAttached identity ID, or null when unattached
agent_handlestring | nullAttached identity handle, or null when unattached
bashbash

Claim a dedicated number POST

POST /numbers

Claims one unattached dedicated number for the organization. Use an admin API key, or manage dedicated numbers from the Inkbox Console.

The request requires a stable key in the Idempotency-Key header:

Idempotency-Key: <unique stable key>

Request body

JSONJSON

type may be dedicated_inbound or dedicated_outbound.

Response (201)

Returns one unattached dedicated-number object with the same schema as the list endpoint:

JSONJSON

Idempotency

  • Retry the same logical claim with the same key to receive its original result.
  • Reusing the key with different input returns 409.
  • Generate a new key only for a genuinely new claim.
bashbash

Error responses

StatusDescription
402Your organization's quota does not permit another number. Review billing in the Inkbox Console or contact support@inkbox.ai.
403This operation requires an admin API key or the Inkbox Console.
409The Idempotency-Key was already used with incompatible input. Use the original input, or use a new key for a genuinely new claim.
422The request is invalid, including when Idempotency-Key is missing or type is not a supported dedicated-number type.
503Inventory is temporarily unavailable. Honor Retry-After: brief contention may return 5 seconds, while depletion may return 3600 seconds. The response may say that a number is expected within 24 hours.

Attach or detach an organization-owned number through PATCH /api/v1/identities/{agent_handle}. Detaching does not release the number; there is no customer-facing number-release endpoint.

Router

Get router number

GET

The active router number and the command humans text to connect

/api/v1/imessage/triage-number

Messaging capability

Messages

Dedicated outbound group chats use these same message and conversation routes; there is no separate group-send endpoint.

Conversations

Tapbacks

Contact rules

Per-identity allow and block rules interpreted against the identity's iMessage filter_mode (blacklist by default, whitelist on demand). Rules stay scoped to the agent identity whether it uses the shared service or a dedicated number. See the Contact rules reference and the iMessage guide for semantics.

List contact rules

GET

List allow/block rules for an agent identity

/api/v1/imessage/identities/{agent_handle}/contact-rules

Create contact rule

POST

Add an allow or block rule (E.164 exact match)

/api/v1/imessage/identities/{agent_handle}/contact-rules

Get contact rule

GET

Fetch a single rule by ID

/api/v1/imessage/identities/{agent_handle}/contact-rules/{rule_id}

Update contact rule

PATCH

Change a rule's action (admin-only)

/api/v1/imessage/identities/{agent_handle}/contact-rules/{rule_id}

Delete contact rule

DELETE

Delete a rule (admin-only)

/api/v1/imessage/identities/{agent_handle}/contact-rules/{rule_id}

List org iMessage contact rules

GET

Org-wide aggregate list across every identity (admin-only)

/api/v1/imessage/contact-rules

Webhooks

Inbound events (imessage.received, imessage.reaction_received) and outbound delivery-lifecycle events (imessage.sent, imessage.delivered, imessage.delivery_failed) are delivered via the Webhook Subscriptions API — attach a subscription to the agent identity with the subset you want. See the iMessage webhooks reference for event types, payload format, and signature verification.

Filtering by date

Date filtering applies to two list endpoints — List messages (GET /messages) and List conversations (GET /conversations). These accept three optional query parameters that filter results by when each record was created (created_at, stored in UTC); other iMessage list endpoints (such as list connections and list contact rules) do not support them. All three are optional and fully backwards-compatible — omit them and the endpoint behaves exactly as before, with no filtering applied.

ParameterTypeDefaultDescription
start_datetimestringInclusive lower bound. A bare date (2026-07-01) starts at 00:00 of that day; a datetime with a Z or offset is used as an exact instant
end_datetimestringUpper bound, inclusive. A bare date (2026-07-06) covers the whole day; a datetime with a Z or offset is an exact instant, and records created at exactly that instant are included
tzstringUTCIANA time zone (e.g. America/New_York) used to interpret zone-less values. Defaults to UTC
  • A bare date in end_datetime is inclusive of the entire day — end_datetime=2026-07-06 returns records through the last moment of the 6th.
  • A datetime with an explicit Z or offset (2026-07-06T15:30:00Z, 2026-07-06T11:30:00-04:00) is an exact instant; tz is ignored for that value.
  • A naive datetime (2026-07-01T12:00:00) is interpreted in tz (UTC when tz is omitted).
  • Supply only one side for an open-ended range. Ordering, pagination, and all other filters are unchanged.
  • Invalid input returns 422: start_datetime after end_datetime, an unparseable date, or an unknown time zone.

A bare-date range (interpreted in UTC):

?start_datetime=2026-07-01&end_datetime=2026-07-06

Interpret those bare dates in a specific zone:

?start_datetime=2026-07-01&end_datetime=2026-07-06&tz=America/New_York

Filter from an exact instant (tz ignored):

?start_datetime=2026-07-06T15:30:00Z

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
iMessage API