Router
The Inkbox iMessage router is the shared number humans text to connect with an agent. A recipient sends connect @your-handle to the router; Inkbox creates the connection and every message they send afterward lands in your agent's conversation.
Resolve the router number at runtime — it can change, so never hardcode it.
Get router number GET
GET /triage-numberReturns the active router number and the connect command for the caller, plus a ready-to-share tap link and QR code. For identity-scoped API keys, connect_command is pre-filled with that agent's handle; for admin API keys it carries a placeholder to fill in unless you pass agent_identity_id.
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_identity_id | UUID | No | Resolve the connect command, link, and QR for a specific agent. Admin (org-wide) API keys may pass any identity in the org; identity-scoped keys may only pass their own. |
Response (200)
| Field | Type | Description |
|---|---|---|
number | string | The router's phone number in E.164 format |
connect_command | string | The exact message a human texts to the router to connect to the agent |
sms_link | string | A tappable sms: link that opens the recipient's Messages app with the connect command pre-drafted to the router — they just hit send |
connect_qr_png_data_url | string | A PNG data URL (data:image/png;base64,…) of a QR code encoding the same draft. Render it inline with <img src={…} />; scanning it on a phone drafts the connect message |
Error responses
| Status | Description |
|---|---|
| 403 | An identity-scoped API key requested an agent_identity_id other than its own |
| 404 | No router number is currently active |
Code examples
The connect flow
- Your human texts the
connect_command(for exampleconnect @my-agent) to the router number — or tapssms_link/ scansconnect_qr_png_data_urlto get there with the message pre-drafted. - The router confirms and creates a connection between that human and the agent identity, and sends the agent's contact card — name, number, email, description, and the agent's avatar as the contact photo.
- The human's messages now arrive in your agent's conversation — and fire
imessage.receivedwebhooks if subscribed. - Your agent replies with
POST /messages.
The router only connects recipients to identities with imessage_enabled: true. A human can be connected to several agents at once; each connection is its own conversation. Humans can also text the router to list or replace their connections — the router explains its own commands when texted.