iMessage
@idaria/channel-imessageimessage
iMessage channel via the Sendblue REST API; routes iMessage chats to your agents. Users pick their agent with /agent <Name>; choices arrive as a numbered list answered by number.
Setup guide
Connect iMessage (Sendblue)
This channel uses Sendblue (sendblue.com) — a hosted iMessage relay with a REST API. You need a Sendblue account with a dedicated line (phone number).
1. Create a Sendblue account & get API keys
Sign up at Sendblue and copy the API Key ID and API Secret Key
from the dashboard (API settings). Note your Sendblue line number
(E.164, e.g. +15122164639).
2. Fill in the fields below
3. Register the webhook in the Sendblue dashboard
Set the receive webhook URL to:
https://<PUBLIC_BASE_URL>/api/imessage/webhook/<webhook_secret>
(replace <webhook_secret> with the exact token from step 2). If the
Sendblue dashboard offers a separate webhook secret field, put the
same token there too — the plugin also accepts the secret from a request
header.
4. Grant the public path
Sendblue and the people tapping an answer link have no idaria login, so
this plugin asks to serve /api/imessage without an operator session.
The install dialog asks for that grant; if you skipped it, open the
plugin page → Grants and grant /api/imessage. Until you do, every
route under it — the webhook included — is not reachable at all and
Sendblue's deliveries fail. The plugin authenticates each request itself
(webhook secret, single-use answer-link token).
5. Answer links (optional, currently inactive)
Answer links are only sent where idaria's decoration registry declares the choice affordance for iMessage. It does not yet, so a choice arrives as a numbered list answered by number and the link is not sent. The setting below takes effect once idaria declares it.
iMessage cannot render choice buttons. When you set Public base URL
(the public HTTPS origin of this idaria instance, e.g.
https://idaria.example.com), an answer with a choice card additionally
carries a link: it opens a selection page in the browser and the pick
flows back into the same iMessage
conversation. Leave the field empty to disable — choices then degrade to
the plain "reply with one of these" text as before. Answer link TTL
controls how long such a link stays answerable (hours, default 24).
⚠️ Open answer links live in memory inside this plugin instance. A restart or redeploy voids every outstanding link before its TTL, and running more than one middleware replica breaks links (a token minted on one replica is unknown to the others) and can process an inbound message twice. Run this channel on a single replica.
6. Sandbox note
On Sendblue's free/sandbox tier you share a line: recipients must have texted the line first / be verified contacts before the API can message them. A paid dedicated line has no such restriction.
7. Privacy note (read before enabling)
All message content transits Sendblue's infrastructure — both directions, including media. Sendblue is a third-party relay, not an Apple-sanctioned API. Enable this channel deliberately (opt-in), inform the people texting the line that a relay provider processes the content, and use the allowlist to keep the audience explicit.
⚠️ Note: Sendblue is an unofficial Apple iMessage relay — Apple offers no public iMessage API, so continuity depends on the provider. This connector is provider-swappable: only the thin REST client is Sendblue-specific.
Setup fields
The operator fills these in when installing the plugin.
- api_key_idSendblue API Key IDAPI Key ID from the Sendblue dashboard (sent as the sb-api-key-id header).
- api_secret_keySendblue API Secret KeyAPI Secret Key from the Sendblue dashboard (sent as the sb-api-secret-key header).
- from_numberSender number (Sendblue line)Your Sendblue line in E.164 format, e.g. +15122164639. The bot sends from this number.
- webhook_secretWebhook secretA long random token you generate yourself (e.g. openssl rand -hex 32). It must appear unchanged as the last path segment of the Sendblue webhook URL.
- api_base_urlAPI base URL (optional)Sendblue REST API base for send-message. Change it only if Sendblue specifies a different base.
- api_v2_base_urlAPI v2 base URL (optional)Sendblue base for the typing indicator (note: .com, not .co).
Show all 9 setup fields
- allowlistAllowed numbers (optional)Comma-separated phone numbers (E.164, e.g. +491701234567) that may chat with the bot. Empty = everyone is allowed.
- public_base_urlPublic base URL (optional)Public HTTPS origin of this idaria instance (e.g. https://idaria.example.com). Enables answer links for choice questions: the pick happens on a web page instead of a text reply. Empty = disabled.
- answer_link_ttl_hoursAnswer link TTL in hours (optional)How long an answer link stays answerable. Default: 24.
Permissions
This is everything the plugin is allowed to access once it is installed.
- public_paths
- /api/imessage
- memory
- none
- none
- graph
- none
- none
- network
- api.sendblue.coapi.sendblue.com
- filesystem
- no
Dependencies and capabilities
- chatAgent@^1