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.

communication

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

  • API Key ID / API Secret Key: from the Sendblue dashboard.
  • Sender number: your Sendblue line in E.164 format.
  • Webhook secret: generate a long random token yourself (e.g. openssl rand -hex 32) and paste it here. It authenticates inbound webhooks — treat it like a password.

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_idsecret, required
    Sendblue API Key IDAPI Key ID from the Sendblue dashboard (sent as the sb-api-key-id header).
  • api_secret_keysecret, required
    Sendblue API Secret KeyAPI Secret Key from the Sendblue dashboard (sent as the sb-api-secret-key header).
  • from_numberstring, required
    Sender number (Sendblue line)Your Sendblue line in E.164 format, e.g. +15122164639. The bot sends from this number.
  • webhook_secretsecret, required
    Webhook 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_urlurl, optional
    API base URL (optional)Sendblue REST API base for send-message. Change it only if Sendblue specifies a different base.
  • api_v2_base_urlurl, optional
    API v2 base URL (optional)Sendblue base for the typing indicator (note: .com, not .co).
Show all 9 setup fields
  • allowliststring, optional
    Allowed numbers (optional)Comma-separated phone numbers (E.164, e.g. +491701234567) that may chat with the bot. Empty = everyone is allowed.
  • public_base_urlurl, optional
    Public 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_hoursstring, optional
    Answer 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
allowed/api/imessage
memory
readsnone
writesnone
graph
readsnone
writesnone
network
outboundapi.sendblue.coapi.sendblue.com
filesystem
scratchno

Dependencies and capabilities

Requires
chatAgent@^1

Versions

VersionCoreSizePublishedsha256Download
v0.6.1latest>=1.75.0 <2.0103.6 KB30 Nov 2026097ab9b57c9f….zip
v0.6.0>=1.75.0 <2.0124.3 KB30 Nov 2026ac1341f1f43b….zip