REST API reference
For scripts and your own software. Agents use the same operations through the MCP server.
Authentication
Every call takes your key in a header:
curl https://api.dmwire.ai/v1/usage \
-H "X-API-Key: $DMWIRE_API_KEY"{
"plan": "free",
"status": "active",
"day": "2026-10-17",
"sends": 0,
"sends_cap": 50,
"new_contacts": 0,
"new_contacts_cap": 10,
"accounts_total": 0,
"accounts_connected": 0,
"accounts_cap": 1
}Authorization: Bearer works the same way:
curl https://api.dmwire.ai/v1/usage \
-H "Authorization: Bearer $DMWIRE_API_KEY"{
"plan": "free",
"status": "active",
"day": "2026-10-17",
"sends": 0,
"sends_cap": 50,
"new_contacts": 0,
"new_contacts_cap": 10,
"accounts_total": 0,
"accounts_connected": 0,
"accounts_cap": 1
}A wrong key:
curl https://api.dmwire.ai/v1/usage \
-H "X-API-Key: dmw_live_this_key_does_not_exist"{
"success": false,
"error_code": 401,
"error": "Invalid API key"
}Errors
Refusals carry a machine readable error_code and a human error message. Daily limit refusals (HTTP 429) carry retry_after_s. The full list of send refusals is on Limits and account safety.
curl https://api.dmwire.ai/v1/messages/does-not-exist \
-H "X-API-Key: $DMWIRE_API_KEY"{
"error_code": "message_not_found",
"error": "Message not found"
}Sending a message
POST /messages answers 202 with the message id and status queued. Then follow it with GET /messages/{id} or the message.sent, message.delivered, message.read and message.failed webhooks. Run before any account was connected, it is refused like this:
curl \
-X POST https://api.dmwire.ai/v1/messages \
-H "X-API-Key: $DMWIRE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"to": {"phone": "+31612345678"}, "text": "Hi Ana, your order is ready for pickup."}'{
"error_code": "no_connected_account",
"error": "No connected account"
}Reading past messages
GET /messages lists the most recent messages on your accounts, sent and received, newest first; chat_id keeps it to one chat. GET /chats lists the chats themselves, GET /messages/search finds messages by their text, and POST /chats/{chat_id}/read marks a chat read. Agents get the same as list_messages, list_chats, search_messages and mark_read (MCP tools). A fresh account has no messages yet:
curl "https://api.dmwire.ai/v1/messages?limit=5" \
-H "X-API-Key: $DMWIRE_API_KEY"{
"messages": [],
"next_cursor": null
}All operations
The OpenAPI document itself is at https://api.dmwire.ai/v1/docs/openapi.yaml, ready for any OpenAPI tool.
Generated from the live OpenAPI document at api.dmwire.ai/v1/docs/openapi.yaml (version 1.0.0, read 2026-10-23). Base URL https://api.dmwire.ai/v1. Send your key in the X-API-Key header or as Authorization: Bearer.
Messages
GET/messages
List Recent Messages · MCP tool list_messages
The most recent messages on your accounts, sent and received, newest first (up to 100 per call, 50 by default). Filter by direction or account_id. When next_cursor is not null, pass it as before to read the next page. For waiting on NEW messages use wait_for_messages.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
limit | query | integer (default 50, max 100) | no | |
direction | query | string | no | |
account_id | query | string | no | |
before | query | string | no | The next_cursor of the previous page |
chat_id | query | string | no | Only messages of this chat (list_chats). |
Responses
200The messages, newest first400Invalid limit, direction or cursor
POST/messages
Send a Message · MCP tool send_message
Queues a text message (optionally with one media URL) from a connected account. Address the recipient by to.contact_id or by the channel's own identity: to.phone (international format) on WhatsApp, to.telegram_user_id or to.telegram_username (or to.phone of an existing contact) on Telegram, to.line_user_id on LINE, to.viber_user_id on Viber, to.phone on SMS, to.email on email, to.instagram_id on Instagram, to.messenger_id on Messenger, to.phone on WhatsApp Business, to.linkedin_url (the person's profile URL) on LinkedIn and to.external_id on a custom channel. account_id may be omitted when exactly one account is connected. On WhatsApp, SMS, Email, WhatsApp Business and Custom channel a new identity creates the contact. On Telegram, LINE, Viber, Instagram, Messenger and LinkedIn only someone who has written to the account can be messaged: anyone else answers 409 needs_inbound_first. Where the platform has a reply window (Instagram 24h, Messenger 24h and WhatsApp Business 24h) a send outside it answers 409 outside_window; on WhatsApp Business it carries template_required: true (send an approved template with send_template). subject and list_unsubscribe are used on email only; a mail to someone who never wrote always carries a List-Unsubscribe header, and one mailbox sends at most one email per 10 seconds. On SMS a contact who replied STOP cannot be messaged again, and a +1 Twilio number needs its A2P 10DLC registration confirmed when it is connected. On the custom channel to.custom_channel (plain text, up to 64 characters) sets the channel label your webhook receives as channel: a new contact, or one without a label, keeps it; a contact that already has a label keeps its own and the given one is used for this send only. Any other channel answers 400 invalid_custom_channel. reply_to quotes a message of the same chat where the channel supports quoted replies; when it cannot be quoted the text goes out unquoted and the answer carries reply_to_applied: false. Answers 202 with the message id; read get_message for the delivery status. Refusals carry error_code: no_connected_account (409), needs_inbound_first (409), outside_window (409), ambiguous_account (400), invalid_recipient (400), account_not_found (404), contact_not_found (404), contact_channel_mismatch (422), contact_do_not_disturb (422), contact_opted_out (422), a2p_unconfirmed (409), not_a_follower (409), mailbox_rate_limited (429), invalid_list_unsubscribe (400), invalid_custom_channel (400), contact_private (422), account_suspended (403), loop_guard (429), opener_burst (429), daily_send_cap (429), new_contact_cap (429). A 429 carries retry_after_s.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
account_id | string | no | The account to send from (see list_accounts). Optional when one account is connected. |
to | object | yes | One of contact_id or the identity the account's channel uses. |
to.contact_id | string | no | |
to.phone | string | no | WhatsApp, Telegram (an existing contact), SMS and WhatsApp Business. |
to.email | string | no | Email accounts. |
to.instagram_id | string | no | Instagram accounts (the person's Instagram-scoped id from an inbound message). |
to.messenger_id | string | no | Messenger accounts (the person's Page-scoped id from an inbound message). |
to.telegram_user_id | string | no | Telegram accounts (the person's Telegram user id from an inbound message). |
to.telegram_username | string | no | Telegram accounts (the person's @username, with or without the @; someone who already wrote to the account). |
to.line_user_id | string | no | LINE accounts (the person's LINE user id from an inbound message). |
to.viber_user_id | string | no | Viber accounts (the person's Viber user id from an inbound message). |
to.external_id | string | no | Custom channel accounts (your own id for the person). |
to.custom_channel | string | no | Custom channel accounts only, optional. The label your webhook receives as channel. A new contact, or one without a label, keeps it; a contact that already has one keeps its own and this label is used for this send only. Plain text, up to 64 characters; on any other channel the send answers 400 invalid_custom_channel. |
to.linkedin_url | string | no | LinkedIn accounts (the person's profile URL, from an inbound message or the contact block). |
text | string | yes | |
subject | string | no | Email only; the subject line of the mail. |
list_unsubscribe | string | no | Email only. One https URL or mailto address for the List-Unsubscribe header. A mail to someone who never wrote always carries one; without this field it is a mailto back to the sending mailbox. |
media_url | string | no | An https URL of an image, video, audio file or document to attach. |
reply_to | string | no | The id of a message in this chat to quote (WhatsApp, Telegram, Instagram, Messenger, LinkedIn). A message of another chat answers 404 message_not_found; where the channel or the message cannot be quoted the text is sent unquoted and the answer carries reply_to_applied false. |
opt_in | boolean | no | Set to true only when this person agreed to hear from you (they asked to be contacted, gave their number in a form, are a customer). Lets a first message to a new contact go past the free limit of 10 new contacts a day, up to 50 and never past the connected account's own daily ramp. Logged with the message. |
Responses
202Queued for delivery400Invalid request403Account suspended409No connected account, or the person has not written to the account first, or the platform's reply window has passed (template_required on WhatsApp Business)422The contact cannot be messaged429A daily cap, the loop guard, the burst guard or the LinkedIn 24 hour gap (linkedin_gap) was hit; retry after retry_after_s seconds
POST/messages/template
Send a WhatsApp Template · send_template, REST only (no MCP tool yet)
Queues an approved message template from a connected WhatsApp Business account. Use it to message someone for the first time, or more than 24 hours after they last wrote, when a normal send answers outside_window with template_required. Address the recipient as for send_message (to.phone or to.contact_id). variables fills the template's numbered placeholders in order ({{1}}, {{2}}, ...), or pass an object keyed by placeholder; a template with header or button placeholders also takes header_1 / button_1 style keys. The account, cap and burst rules of send_message apply. list_templates shows your templates and their approval status; create_template submits a new one to Meta. Refusals carry error_code: invalid_template (400), template_not_supported (422, the account's channel has no templates), plus the send_message codes.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
account_id | string | no | The WhatsApp Business account to send from. Optional when one account is connected. |
to | object | yes | |
to.contact_id | string | no | |
to.phone | string | no | |
template | object | yes | |
template.name | string | yes | The approved template's name. |
template.language | string | no | The template's language code, as approved. |
template.variables | object | no | Placeholder values, a list in order or an object keyed by placeholder. |
template.components | array | no | Optional. Meta's own components array, sent as is instead of building it from variables. |
opt_in | boolean | no | Set to true only when this person agreed to hear from you (they asked to be contacted, gave their number in a form, are a customer). Lets a first message to a new contact go past the free limit of 10 new contacts a day, up to 50 and never past the connected account's own daily ramp. Logged with the message. |
Responses
202Queued for delivery400Invalid template or recipient409No connected account422The account's channel has no templates, or the contact cannot be messaged429A daily cap, the loop guard or the burst guard was hit
GET/messages/wait
Wait for New Messages · MCP tool wait_for_messages
Long poll for incoming messages. Returns as soon as at least one message received after the cursor arrives (up to 50 per call, in the order they were received, so a message whose own timestamp is older still comes through), or an empty list when timeout_s passes. Always pass the returned cursor into the next call; without a cursor the wait starts from now. At most 2 waits may be open at once per account (429 wait_concurrency).
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
cursor | query | string | no | The opaque cursor returned by the previous call. |
account_id | query | string | no | Only messages received on this account. |
chat_id | query | string | no | Only messages of this chat (list_chats). |
timeout_s | query | integer (default 25, max 55) | no |
Responses
200New messages (possibly none) and the cursor for the next call400Invalid cursor or timeout429Too many concurrent waits
GET/messages/{id}
Get a Message · MCP tool get_message
Reads one message (sent or received) with its current status. Use it after send_message to see whether the message was sent, delivered, read or failed.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
id | path | string | yes |
Responses
200The message404No such message on this account
GET/chats
List Chats · MCP tool list_chats
Your chats, most recently active first: one per person and one per group. query matches the name, username, number or group name; type filters to user, group or channel chats; account_id narrows to that account's channel. Up to 100 per call, 50 by default. Use a chat_id with list_messages, wait_for_messages, search_messages and mark_read, or as to.contact_id in send_message.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
query | query | string | no | Matches the chat's name, username, number or group name. |
account_id | query | string | no | |
limit | query | integer (default 50, max 100) | no | |
type | query | string | no |
Responses
200The chats, most recently active first400Invalid query, type or limit
GET/chats/groups
List Groups · MCP tool list_groups
Your group chats, most recently active first (list_chats with type group).
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
query | query | string | no | Matches the chat's name, username, number or group name. |
account_id | query | string | no | |
limit | query | integer (default 50, max 100) | no |
Responses
200The chats, most recently active first400Invalid query, type or limit
GET/chats/channels
List Channels · MCP tool list_channels
Your channel chats (such as Telegram channels), most recently active first (list_chats with type channel).
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
query | query | string | no | Matches the chat's name, username, number or group name. |
account_id | query | string | no | |
limit | query | integer (default 50, max 100) | no |
Responses
200The chats, most recently active first400Invalid query, type or limit
POST/chats/{chat_id}/read
Mark a Chat as Read · MCP tool mark_read
Marks the chat as read: its unread count goes to 0 and, on WhatsApp, Telegram and LinkedIn, the other side gets your read receipt (receipt_sent true). On other channels only your own inbox is marked (receipt_sent false).
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
chat_id | path | string | yes |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
account_id | string | no | Optional; the chat must be on this account's channel. |
Responses
200Marked400Invalid chat_id404No such chat on this account (contact_not_found)
GET/messages/search
Search Messages · MCP tool search_messages
Messages (sent and received) whose text contains query, case-insensitive, newest first, from the last 365 days. Narrow with account_id or chat_id. Up to 100 per call, 20 by default.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
query | query | string | yes | |
account_id | query | string | no | |
chat_id | query | string | no | |
limit | query | integer (default 20, max 100) | no |
Responses
200The matching messages, newest first400Invalid query, limit or chat_id
POST/channels/custom/inbound
Push an incoming custom channel message · push_custom_channel_message, REST only (no MCP tool yet)
Stores one incoming message from your own transport. customData.fromId is the sender's id on your side (the contact's external id, which to.external_id addresses when you reply); the contact is created on the first message.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
customData | object | yes | |
customData.messageSid | string | no | Your id for the message. |
customData.fromId | string | no | The sender's id on your side. |
customData.toId | string | no | Your receiving id, if you have several. |
customData.body | string | yes | The message text. |
customData.mediaUrl | string or null | no | A public https URL of an attachment. |
customData.mediaContentType | string or null | no | The attachment's MIME type. |
customData.firstName | string or null | no | |
customData.lastName | string or null | no | |
customData.email | string or null | no | |
messageType | string | no |
Responses
200The message was accepted.400customData is missing or a field is malformed.401Missing or invalid API key.
Accounts
GET/accounts
List Connected Accounts · MCP tool list_accounts
Lists the accounts connected to your account on every channel. status is one of connected, connecting, disconnected or restricted. limits shows today's sends and new contacts against the caps; ramp_day is how far the account is into its warm-up ramp (null when the account has no ramp). channels lists the channels you can connect today and how each connects (connect_kind: qr, code, token, credentials, oauth or cookies).
Responses
200The connected accounts404This API is not enabled for the account
POST/channels/linkedin
Connect a LinkedIn account · connect_linkedin, REST only (no MCP tool yet)
Connects your own LinkedIn account from the cookies of a browser where you are signed in to LinkedIn: export the cookies for linkedin.com as JSON (a cookie export extension does this) and pass them as cookie_jar, with the two-letter country the account is normally used in. The answer is immediate; the sign-in runs in the background on a dedicated IP in that country. Poll get_linkedin_status until it says connected, or code_required when LinkedIn asks for a verification code (then submit_linkedin_code). A 409 country_confirmation_required means the sign-in looks like it comes from another country than the one you picked: call again with country_confirmation set to kept (your pick stands) or switched. The account is paced like a careful person; replies go only to people who wrote to the account.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
cookie_jar | object | yes | The cookies of a signed-in LinkedIn browser session, as the JSON a cookie export extension produces (an array of {name, value, domain, ...}), or that JSON as a string. |
country | string | yes | Two-letter country code of where this LinkedIn account is normally used (the dedicated IP is allocated there). |
city | string | no | Optional city, to place the IP closer to where the account is used. |
country_confirmation | kept | switched | no | Only after a 409 country_confirmation_required; kept keeps your pick, switched means you changed it. |
browser_timezone | string | no | The IANA timezone of the browser the cookies came from, when known. |
account_id | string | no | Reconnect this account (from list_accounts) instead of adding one. |
Responses
200The sign-in started400Unreadable cookies or a missing country403The account cap is reached409The country needs confirming (country_confirmation_required), or a sign-in for this account is already running
GET/channels/linkedin/{accountId}/status
Get a LinkedIn account's sign-in status · get_linkedin_status, REST only (no MCP tool yet)
The sign-in progress of a LinkedIn account: connecting (validating the cookies on its IP), code_required (LinkedIn asked for a verification code: submit_linkedin_code), connected, or failed with an error you can show the user. Poll every few seconds after connect_linkedin.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
accountId | path | string | yes | The account id from connect_linkedin or list_accounts. |
Responses
200The status404No such account
POST/channels/linkedin/{accountId}/verify-code
Submit the LinkedIn verification code · submit_linkedin_code, REST only (no MCP tool yet)
When get_linkedin_status says code_required, LinkedIn sent a verification code to the account's email or authenticator app. Submit it here, then keep polling the status.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
accountId | path | string | yes |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
code | string | yes |
Responses
200The code was accepted for checking400Missing code404No such LinkedIn account409No sign-in is waiting for a code
DELETE/channels/linkedin/{accountId}
Disconnect a LinkedIn account · disconnect_linkedin, REST only (no MCP tool yet)
Signs the account out on our side and removes it, with its dedicated IP. The LinkedIn account itself is untouched. Reading and sending on it stop.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
accountId | path | string | yes |
Responses
200Disconnected404No such account
POST/channels/line
Connect a LINE Official Account · connect_line, REST only (no MCP tool yet)
Validates the submitted channel secret and channel access token against the provider, then stores the connection and returns the resolved bot user id and the webhook URL to configure. The channel secret and access token are never returned in any response. Re-submitting the same Official Account's credentials updates the stored connection.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
channel_access_token | string | yes | The Official Account's long-lived Messaging API channel access token. Transmitted over TLS and stored to send and receive messages. The caller is responsible for rotating the token in the provider console and re-submitting it here if it is reissued. |
channel_secret | string | yes | The Messaging API channel secret, used to verify inbound event signatures. |
channel_id | string | no | Optional numeric channel id. Informational only. |
Responses
200The Official Account was connected.400Missing or invalid fields, or the credentials could not be validated.401Authentication required or invalid.403The target account's plan does not include a channel tier.409This Official Account is already connected to another account.
GET/channels/line/{botUserId}/status
Get LINE connection status · get_line_status, REST only (no MCP tool yet)
Returns the stored connection state for a connected Official Account. The status reflects the state captured at connect time; this channel has no live status endpoint. Credentials are never included.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botUserId | path | string | yes | The connection's bot user id, as returned when connecting. |
Responses
200The stored connection state.401Authentication required or invalid.404No connection with that id exists on the account.
POST/channels/line/{botUserId}/verify-webhook
Verify a LINE connection · verify_line_webhook, REST only (no MCP tool yet)
Re-validates the stored access token against the provider and refreshes the cached chat-mode flag. Useful after the customer finishes configuring the webhook URL in the provider console. Does not return credentials.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botUserId | path | string | yes | The connection's bot user id. |
Responses
200The verification result.401Authentication required or invalid.404No connection with that id exists on the account.502The messaging provider could not be reached to verify the connection.
DELETE/channels/line/{botUserId}
Disconnect a LINE Official Account · disconnect_line, REST only (no MCP tool yet)
Removes the connection and its inbound routing entry. After disconnecting, inbound events for this Official Account will no longer be processed.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botUserId | path | string | yes | The connection's bot user id. |
Responses
200The Official Account was disconnected.401Authentication required or invalid.404No connection with that id exists on the account.
POST/channels/viber
Connect a Viber bot · connect_viber, REST only (no MCP tool yet)
Validates the pasted bot auth token with Viber, stores the connection and registers the webhook on the bot itself, so there is no console step afterwards. The token is never returned. Only people subscribed to the bot can be messaged.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
auth_token | string | yes | The bot's authentication token from the Viber admin panel. |
Responses
200The bot was connected and its webhook registered.400The token is missing, or Viber rejected it or the webhook check.401Missing or invalid API key.403The account's plan or channel limit does not allow another connection.
GET/channels/viber/{botId}/status
Get Viber connection status · get_viber_status, REST only (no MCP tool yet)
Returns the stored state of a connected bot. Pass live=true to re-check the bot with Viber and refresh the webhook state. The token is never included.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botId | path | string | yes | The bot id returned when connecting. |
live | query | boolean | no | Re-check the bot with Viber before answering. |
Responses
200The connection state.404No Viber bot with that id is connected.
POST/channels/viber/{botId}/verify-webhook
Re-register the Viber webhook · verify_viber_webhook, REST only (no MCP tool yet)
Registers the webhook on the bot again with the stored token. Use it when status reports webhook_ok false.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botId | path | string | yes | The bot id. |
Responses
200The verification result.404No Viber bot with that id is connected.
DELETE/channels/viber/{botId}
Disconnect a Viber bot · disconnect_viber, REST only (no MCP tool yet)
Removes the connection and its inbound routing. Messages to the bot are no longer received.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
botId | path | string | yes | The bot id. |
Responses
200The bot was disconnected.404No Viber bot with that id is connected.
POST/channels/whatsapp-business
Connect a WhatsApp Business number on your own Meta app · connect_whatsapp_business, REST only (no MCP tool yet)
Connects a WhatsApp Cloud API number that runs on your own Meta app. Pass the app ID and app secret (App settings, Basic), a system user access token with the whatsapp_business_messaging and whatsapp_business_management permissions, and the WhatsApp Business Account ID. The credentials are checked with Meta, the app is subscribed to the account's webhook, and the number is registered and switched on in one call. When the WhatsApp Business Account holds several numbers, pass phone_number_id (a 409 phone_number_required lists them). When Meta has not confirmed everything yet the answer is status pending with a detail; finish the step it names, then call the verify endpoint. Meta bills your own WhatsApp Business Account for every message. The secret and the token are never returned.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
app_id | string | yes | Your Meta app's App ID. |
app_secret | string | yes | Your Meta app's App Secret. |
access_token | string | yes | A system user access token for the app with the whatsapp_business_messaging and whatsapp_business_management permissions. |
waba_id | string | yes | The WhatsApp Business Account ID. |
phone_number_id | string | no | Optional. The phone number ID to connect, when the account holds more than one number. |
Responses
200The number is connected (status connected) or stored and waiting on Meta (status pending, with detail).400A field is missing, Meta rejected the credentials (error_code invalid_credentials), or phone_number_id is not on the account.403The account's plan or channel limit does not allow another connection.409The WhatsApp Business Account holds several numbers (error_code phone_number_required, with phone_numbers) or none (no_phone_numbers).
DELETE/channels/whatsapp-business
Disconnect the WhatsApp Business number · disconnect_whatsapp_business, REST only (no MCP tool yet)
Switches the number off. The credentials stay stored, so the verify endpoint reconnects it without pasting them again. The number stays on your WhatsApp Business Account.
Responses
200Disconnected.404No WhatsApp Business number is connected.
POST/channels/whatsapp-business/verify
Finish or retry the WhatsApp Business connection · verify_whatsapp_business, REST only (no MCP tool yet)
Checks the stored number with Meta again, registers it when needed and switches it on. Use it after setting up the webhook by hand in your Meta app, when the connect answered status pending, or to reconnect after a disconnect.
Responses
200The number is connected.400No credentials are stored yet; connect first.409Meta did not confirm the number yet (error_code not_verified, with the reason).
GET/channels/whatsapp-business/status
Get the WhatsApp Business connection · get_whatsapp_business_status, REST only (no MCP tool yet)
The stored connection, the webhook setup values and the template approval summary. The app secret and the access token are shown by their last 4 characters only.
Responses
200The connection.404No WhatsApp Business number is connected.
POST/channels/sms/twilio
Connect your own Twilio number for SMS · connect_sms, REST only (no MCP tool yet)
Checks the Account SID and Auth Token with Twilio, finds the number on that Twilio account and points its incoming SMS webhook here. Your Twilio account pays for every message. A +1 (US or Canadian) number sends application SMS only once its A2P 10DLC registration is approved, so on such a number pass a2p_registered true once that is done in your Twilio console; a +1 number may be refused without it. The Auth Token is never returned.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
account_sid | string | yes | Twilio Account SID (starts with AC). |
auth_token | string | yes | Twilio Auth Token of that account. |
phone_number | string | yes | The Twilio number in international format, e.g. +447700900123. |
a2p_registered | boolean | no | You confirm the number's A2P 10DLC registration. A +1 number may be refused without it. |
Responses
200The number is connected.400A field is missing or malformed, or a +1 number was sent without a2p_registered where it is required (error_code a2p_registration_required).403Twilio rejected the credentials, or the account's plan or channel limit does not allow another connection.404The number is not on that Twilio account.409The number is already connected to another account.
DELETE/channels/sms/twilio
Disconnect your Twilio SMS number · disconnect_sms, REST only (no MCP tool yet)
Clears the number's webhooks at Twilio and removes the connection. The number stays on your Twilio account.
Responses
200Disconnected.404No Twilio SMS number is connected.
GET/channels/sms/twilio/status
Get Twilio SMS connection status · get_sms_status, REST only (no MCP tool yet)
Returns the connected number and whether its A2P registration was confirmed. Credentials are never included.
Responses
200The connection.404No Twilio SMS number is connected.
POST/channels/sms/android-gateway
Connect an Android phone as an SMS gateway · connect_android_sms, REST only (no MCP tool yet)
Connects an Android phone running the open source SMS Gateway for Android app, so SMS go out from that phone's own number and SIM plan. Pass the username and password the app shows (cloud mode by default). The connection is checked with the gateway, and the webhooks for incoming messages and delivery reports are registered on it for you; the answer carries the webhook URL that was registered. When a phone and a Twilio number are both connected, SMS go out from the phone. The password is never returned.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
username | string | yes | The gateway username shown in the app. |
password | string | yes | The gateway password shown in the app. |
phone_number | string | yes | The phone's own number in international format. |
mode | cloud | local | no | cloud (default) uses the app's cloud relay; local reaches the phone at base_url. |
base_url | string | no | The gateway address for local mode or a self hosted relay. Must be a public https address. |
signing_key | string | no | Optional webhook signing key set in the app, used to verify incoming webhooks. |
Responses
200The phone is connected.400A field is missing or malformed.403The gateway rejected the credentials, or the account's plan or channel limit does not allow another connection.409The number is already connected to another account.
DELETE/channels/sms/android-gateway
Disconnect the Android SMS gateway · disconnect_android_sms, REST only (no MCP tool yet)
Removes the webhooks from the gateway and the connection.
Responses
200Disconnected.404No Android SMS gateway is connected.
GET/channels/sms/android-gateway/status
Get Android SMS gateway status · get_android_sms_status, REST only (no MCP tool yet)
Checks the gateway now (credentials and when the phone was last seen) and returns the result.
Responses
200The gateway state.404No Android SMS gateway is connected.
POST/channels/email/imap
Connect your own mailbox · connect_email, REST only (no MCP tool yet)
Connects a mailbox you own over IMAP (receive) and SMTP (send) with its password or app password. Both servers are checked before anything is stored, mail that is already in the inbox is never imported, and new mail is picked up every couple of minutes. Pick a provider preset (gmail, outlook, yahoo, icloud, fastmail) or pass custom with your own hosts. Passwords are stored encrypted and never returned.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
address | string | yes | The mailbox address. It is also the connection id. |
password | string | yes | The password or app password (used for SMTP too unless smtp_password is given). |
provider | gmail | outlook | yahoo | icloud | fastmail | custom | no | Server preset. Defaults to custom. |
display_name | string | no | The From name on mail you send. |
username | string | no | The login, when it is not the address. |
imap_host | string | no | |
imap_port | integer | no | |
imap_secure | boolean | no | |
smtp_host | string | no | |
smtp_port | integer | no | |
smtp_secure | boolean | no | |
smtp_username | string | no | A separate SMTP login, when the outgoing server has its own. |
smtp_password | string | no |
Responses
200The mailbox is connected.400A field is missing or malformed, or the IMAP or SMTP check failed (the error names which).403The account's plan or channel limit does not allow another connection.
GET/channels/email/imap/{address}/status
Get mailbox status · get_email_status, REST only (no MCP tool yet)
Returns the stored state of a connected mailbox. restricted means the mailbox needs its login again.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
address | path | string | yes | The mailbox address. |
Responses
200The mailbox state.404No mailbox with that address is connected.
DELETE/channels/email/imap/{address}
Disconnect a mailbox · disconnect_email, REST only (no MCP tool yet)
Stops polling the mailbox and removes the connection. The mailbox itself is untouched.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
address | path | string | yes | The mailbox address. |
Responses
200Disconnected.404No mailbox with that address is connected.
PUT/channels/custom
Set the custom channel webhook · set_custom_channel_webhook, REST only (no MCP tool yet)
Sets the https URL each outgoing custom channel message is posted to, so your own transport delivers it. The URL must be public; private network addresses and this API's own hosts are refused. Push incoming messages with POST /channels/custom/inbound.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
webhook_url | string | yes | The https URL to post outgoing messages to. |
Responses
200The webhook is set.400The URL is missing or was refused by the safety check.403The account's channel limit does not allow another connection.
DELETE/channels/custom
Remove the custom channel webhook · disconnect_custom_channel, REST only (no MCP tool yet)
Removes the webhook. Outgoing custom channel messages stop.
Responses
200Removed.404No custom channel webhook is set.
GET/channels/custom/status
Get custom channel status · get_custom_channel_status, REST only (no MCP tool yet)
Returns the webhook outgoing custom channel messages are posted to.
Responses
200The webhook is set.404No custom channel webhook is set.
POST/channels/meta/connect
Start the Instagram & Messenger connection · connect_instagram_messenger, REST only (no MCP tool yet)
Begins the connection flow and returns a consent URL the end user must open in a browser, plus a one-time token correlating the attempt. No credentials are accepted here; authorization happens entirely in the browser and is stored server-side.
Responses
200Consent URL and correlation token issued.401Authentication required or invalid.404Targeted managed account not found.
GET/channels/meta/status
Poll the Instagram & Messenger connection status · get_instagram_messenger_status, REST only (no MCP tool yet)
Returns the current step of the connection flow, the connectable pages once they load, and the selected page. Credentials are never included.
Responses
200Current connection status.401Authentication required or invalid.404Targeted managed account not found.
GET/channels/meta/pages
List connectable pages · list_pages, REST only (no MCP tool yet)
Lists the pages available to connect after authorization completes, each stripped of any credential. Returns an empty list until pages have loaded.
Responses
200Connectable pages.401Authentication required or invalid.404Targeted managed account not found.
POST/channels/meta/select-page
Select the page to connect · select_page, REST only (no MCP tool yet)
Selects which page to connect for Instagram and Messenger. Supply only the page id; the page credential is resolved server-side and is never required from, nor returned to, the caller. Selecting a page connects both Instagram and Messenger for that page.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
page_id | string | yes | The id of the page to connect. Must be one of the pages returned by the status or pages endpoint. |
instagram | object or null | no | Optional override of the Instagram Business account to link. When omitted, the Instagram account associated with the chosen page is used automatically. |
Responses
200Page selected and channel connected.400Missing or invalid request fields.401Authentication required or invalid.404Page not found in the connectable list, or targeted managed account not found.409The page is already connected to another account.
DELETE/channels/meta
Disconnect Instagram & Messenger · disconnect_instagram_messenger, REST only (no MCP tool yet)
Disconnects Instagram and Messenger by clearing the selected page. Idempotent: succeeds even when no page is currently selected.
Responses
200Channel disconnected.401Authentication required or invalid.404Targeted managed account not found.
POST/channels/telegram/connect
Start a connection session · MCP tool connect_telegram
Begins a connection session for an account phone number. In code mode the connection service sends a one-time login code to the account and reports code_required; in qr mode it returns a login token and QR URL to display. Poll the status endpoint until the channel reports connected.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
phone_number | string | yes | The account phone number to connect, in E.164 format. |
mode | code | qr | no | Login method. 'code' sends a one-time login code to the account; 'qr' returns a login token and QR URL to display for scanning. |
force_new | boolean | no | When true, discards any existing session and starts fresh. |
Responses
200Session started.400Invalid or missing request fields.403This channel is not enabled for the account, or the plan lacks a channels tier.409This account is already connected elsewhere.
POST/channels/telegram/connect/{phoneNumber}/verify-code
Submit the login code · MCP tool submit_telegram_code
Submits the one-time login code for a pending session. On success the status becomes connected; when the account has two-factor enabled the status becomes password_required and the password must be submitted next.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The account phone number being connected, in E.164 format. |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
code | string | yes | The one-time login code received by the account. |
Responses
200Code accepted.400Missing or invalid login code.403This channel is not enabled for the account.
POST/channels/telegram/connect/{phoneNumber}/verify-password
Submit the two-factor password · MCP tool submit_telegram_password
Submits the two-factor password for a session that reported password_required. On success the status becomes connected and the channel is live.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The account phone number being connected, in E.164 format. |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
password | string | yes | The account's two-factor password. |
Responses
200Password accepted.400Missing or invalid password.403This channel is not enabled for the account.
GET/channels/telegram/connect/{phoneNumber}/status
Get live connection status · MCP tool get_telegram_status
Returns the live connection status for a session, polled from the connection service. Poll this until the status is connected or an error/disconnected status. Reports not_initialized when no session exists.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The account phone number, in E.164 format. |
Responses
200Current connection status.404No connection record exists for this phone number.
DELETE/channels/telegram/{phoneNumber}
Disconnect the channel · MCP tool disconnect_telegram
Tears down the connection session and removes the account record. Idempotent: the record is removed even when the connection service is unreachable, so repeated calls succeed.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The account phone number to disconnect, in E.164 format. |
Responses
200Channel removed.404No connection record exists for this phone number.
PUT/channels/instagram-login/token
Push an Instagram access token · push_instagram_token, REST only (no MCP tool yet)
Stores an Instagram access token your OWN Meta app already obtained, so the account is connected without a DMWire consent redirect. The token is checked live against Instagram, which must confirm it belongs to the ig_user_id you sent and that the account is a Professional (Business or Creator) one; the account is then subscribed to your app's webhooks. The response returns the webhook URL to configure in your Meta app. Pushing the same Instagram account again is the refresh path and simply replaces the stored token, expiry and username. Tokens are never refreshed for you, so push a fresh one before the recorded expiry passes.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
ig_user_id | string | yes | The numeric Instagram professional account ID the token belongs to. This is the user_id field from GET https://graph.instagram.com/v21.0/me?fields=user_id,username, the same id Instagram webhooks carry as entry.id. It is NOT the app-scoped id (the id field from /me), which differs per Meta app and is rejected. |
access_token | string | yes | The Instagram user access token your own Meta app obtained for this account. Validated live against Instagram before it is stored. |
expires_at | string or null | no | When the token expires, as an ISO-8601 date-time. Takes precedence over expires_in. |
expires_in | number or null | no | Seconds until the token expires, as returned by Meta. Used when expires_at is omitted. With neither field, a 60-day lifetime is assumed. |
username | string | no | Optional account username. Only used when Instagram does not return one for the token. |
Responses
200Token stored; the channel is connected.400Missing or invalid fields, a token Instagram rejected, an ig_user_id that does not match the token, or a webhook subscription your app could not complete.403The caller is not allowed to edit integrations on this account.409This Instagram account is already connected on another account, or on this one through the Facebook Page flow. Disconnect it there first.
DELETE/channels/instagram-login/token
Disconnect the pushed Instagram token · disconnect_instagram_token, REST only (no MCP tool yet)
Removes the stored Instagram credential and unsubscribes the account from your app's webhooks. Idempotent: an already dead or already removed connection still answers 200, with disconnected set to false when there was nothing to remove.
Responses
200Connection removed (or there was none).403The caller is not allowed to edit integrations on this account.
POST/channels/whatsapp-web/connections
Start a WhatsApp Web pairing session · MCP tool connect_whatsapp
Begins pairing a WhatsApp number by QR code. Creates or resets the connection and returns a session whose QR code you then fetch and have the end user scan. Poll the status endpoint until the connection reports connected.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
phone_number | string | yes | The WhatsApp number to connect, in E.164 format (for example +15551230000). |
link_method | qr | pairing_code | no | How the phone is linked. 'qr' (default) shows a QR code to scan; 'pairing_code' returns an 8-character code to type on the phone under Linked devices, Link with phone number instead. |
force_new | boolean | no | Discard any existing session for this number and start a fresh pairing. |
import_contacts | boolean | no | Import the device's existing contacts on first connection. |
pause_ai_for_imported_contacts | boolean | no | When importing contacts, keep automated replies paused for them. |
import_existing_chats | boolean | no | Import existing chat history on first connection. Requires import_contacts to be true. |
mark_imported_contacts_as_private | boolean | no | When importing contacts, create them as private (no messages stored or sent for them). Incompatible with import_existing_chats. |
Responses
200Pairing session started.400Missing or invalid request fields.401Authentication required or invalid.403The account's plan does not include channel connections.404The referenced account could not be found.409This number is already connected.503The connection service is temporarily at capacity.
GET/channels/whatsapp-web/connections/{phoneNumber}/qr
Get the pairing QR code · MCP tool get_whatsapp_qr
Returns the current QR code for a pairing session so it can be rendered for the end user to scan. The code is short-lived; poll this endpoint every 10 to 15 seconds until the status reports connected, and restart the connection if the code expires.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The connected number in E.164 format. |
Responses
200QR code returned.400This number cannot be paired with WhatsApp Web.401Authentication required or invalid.404The connection was not found, or the QR code is not ready yet.410The QR code expired. Restart the connection to generate a new one.503The QR service is temporarily unavailable.
GET/channels/whatsapp-web/connections/{phoneNumber}/status
Get the connection status · MCP tool get_whatsapp_status
Returns the live connection status for a pairing session. The terminal success state is connected (the service may also report open). Treat disconnected and not_initialized as terminal failure states. Poll this endpoint after the end user scans the QR code to confirm the connection.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The connected number in E.164 format. |
Responses
200Connection status returned.401Authentication required or invalid.404The connection was not found.502The connection service could not be reached.
DELETE/channels/whatsapp-web/connections/{phoneNumber}
Disconnect a WhatsApp Web connection · MCP tool disconnect_whatsapp
Disconnects the pairing session and removes the connection record. The operation is idempotent and always succeeds locally even if the connection service is unreachable.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
phoneNumber | path | string | yes | The connected number in E.164 format. |
Responses
200Disconnected. status is "removed" when the number was deleted from the account.401Authentication required or invalid.404The connection was not found.
GET/account-config/meta-app
Get Own Meta App Settings · get_meta_app, REST only (no MCP tool yet)
Returns the Meta app stored on this account, together with the callback URLs and verify token needed to finish the webhook setup inside that app. App secrets are never returned. When no own Meta app is stored, the answer is simply configured false.
Responses
200The stored Meta app summary, or configured false401Missing or invalid API key403The caller may not view integration settings on this account
PUT/account-config/meta-app
Save Own Meta App Settings · set_meta_app, REST only (no MCP tool yet)
Stores your own Meta app, so people connecting Instagram or Messenger see YOUR brand on the Facebook consent screen. The App ID and App Secret are checked against Meta before anything is stored, so a wrong pair fails immediately. Secrets are stored encrypted and are never returned. The answer contains the callback URLs and the verify token to enter in your app's webhook settings; the verify token is created on the first save and stays the same afterwards, so an existing subscription keeps working. Two credential sets share this setting and a save needs at least one of them: the Facebook Login set (app_id, app_secret, config_id) and the Instagram login pair (instagram_app_id, instagram_app_secret), which enables the Facebook-free Instagram token push lane on its own, so an Instagram-only integrator does not need the Facebook fields. Each set is sent complete or not at all, and a save always describes the whole setting: whichever set you leave out is removed from the stored settings.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
app_id | string | no | The numeric Meta App ID from your app's basic settings. Part of the Facebook Login set, which is sent complete or not at all. |
app_secret | string | no | The Meta App Secret, between 16 and 128 characters. Stored encrypted and never returned. Part of the Facebook Login set. |
config_id | string | no | The numeric Facebook Login for Business configuration ID created inside YOUR app. Configuration IDs belong to one app, so another app's ID cannot be reused. Part of the Facebook Login set. |
instagram_app_id | string | no | The numeric Instagram App ID from your app's "Instagram API with Instagram login" panel. This is not the Facebook App ID. Must be sent together with instagram_app_secret, or both left out. |
instagram_app_secret | string | no | The Instagram App Secret that belongs with instagram_app_id, between 16 and 128 characters. Stored encrypted and never returned. Unlike the Facebook pair it is not checked against Meta when saved. |
Responses
200The Meta app was verified and saved400Neither credential set was supplied, a field is malformed, a set is incomplete, or Meta rejected the App ID and App Secret pair401Missing or invalid API key403The caller may not edit integration settings on this account
DELETE/account-config/meta-app
Remove Own Meta App Settings · remove_meta_app, REST only (no MCP tool yet)
Removes the own Meta app from this account. New Instagram and Messenger connections then need an app saved again. Existing connections keep working, but messages will no longer arrive on the per-account callback URLs, so remove the webhook subscription in your Meta app as well. The call succeeds even when nothing was stored; removed then reports false.
Responses
200Removal completed401Missing or invalid API key403The caller may not edit integration settings on this account
Templates
GET/meta-templates
List Meta Cloud API Templates · list_templates, REST only (no MCP tool yet)
Lists the account's WhatsApp templates from its own WABA, with the freshest known approval status. A live Graph listing is merged with any newer status the account's inbound webhook has already observed, so a just-approved template is never shown as pending.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
name | query | string | no | Exact template name to filter to. |
Responses
200The account's templates400No own Meta app (or embedded WhatsApp) connection is set up on this account401Missing or invalid API key403The caller's plan does not include WhatsApp templates500Meta could not be reached, or refused the request
POST/meta-templates
Create Meta Cloud API Template · create_template, REST only (no MCP tool yet)
Creates a WhatsApp template on the account's own WABA and submits it for Meta review. Nothing is stored on our side; the returned id and status come straight from Meta.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
name | string | yes | Template name. Meta requires lowercase letters, digits, and underscores only. |
language | string | yes | Meta language code. |
body | string | no | Body text. Use Meta's native {{1}}, {{2}}, … placeholder syntax. Required unless components is supplied. |
variables | array | no | Example values for the body placeholders, index-aligned, used for Meta's review sample. |
category | MARKETING | UTILITY | AUTHENTICATION | no | Defaults to UTILITY when omitted. |
add_security_recommendation | boolean | no | AUTHENTICATION only. Adds Meta's "do not share this code" line to the preset body. Defaults to true. |
code_expiration_minutes | integer | no | AUTHENTICATION only. Shows "This code expires in N minutes" as the footer. Omitted means no expiry footer. |
header | string | no | Optional plain-text header. |
footer | string | no | Optional footer text. |
buttons | array | no | |
components | array | no | Escape hatch: a fully-formed Meta components array, for template shapes the simplified fields above cannot express (e.g. media headers). When present it replaces body/header/footer/buttons entirely. |
Responses
201The template was submitted to Meta for review400A required field is missing or malformed, no own Meta app connection exists, or Meta rejected the template401Missing or invalid API key403The caller's plan does not include WhatsApp templates500Meta could not be reached, or refused the request
DELETE/meta-templates/{name}
Delete Meta Cloud API Template · delete_template, REST only (no MCP tool yet)
Deletes a template from the account's own WABA by its Meta name. Without hsm_id, Meta removes EVERY language of that template name; pass Meta's template id as hsm_id to delete just one localization.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
name | path | string | yes | The template's Meta name. |
hsm_id | query | string | no | Meta's template id, to delete only that one localization instead of every language. |
Responses
200The template was deleted (or Meta reported it was not deleted)400The template name path parameter is missing, no own Meta app connection exists, or Meta rejected the deletion401Missing or invalid API key403The caller's plan does not include WhatsApp templates500Meta could not be reached, or refused the request
Usage
GET/usage
Get Today's Usage · MCP tool get_usage
Today's sends and new contacts (UTC day) against the plan caps.
Responses
200Today's usage
Webhooks
GET/webhooks
List Webhook Subscriptions · MCP tool list_webhooks
Returns every webhook subscription configured on the account, including the events each one listens to. The returned id (or the exact name) can be used as the webhookId path parameter in the other webhook endpoints.
Responses
200The account's webhook subscriptions401Missing or invalid credentials403Webhooks are not enabled for this account
POST/webhooks
Create Webhook Subscription · MCP tool create_webhook
Creates a new webhook subscription. The URL must use HTTPS and be publicly reachable. The subscribed_to array selects which event types are delivered to the URL, use GET /webhooks/events to discover the valid values. Optionally pass a name so the subscription can be addressed by a stable identifier later.
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | yes | HTTPS URL that will receive event payloads via POST. |
subscribed_to | array | yes | Event types to subscribe to. Must contain at least one valid event name. |
name | string | no | Optional display name. Also usable as the webhookId path parameter. Defaults to a timestamped name. |
retries_enabled | boolean | no | Retry failed deliveries (1m, 5m, 30m, 2h). Off by default. See the Retries section for the duplicate-delivery caveat. |
enabled | boolean | no | Account on/off switch for the subscription. Defaults to true (on). Pass false to create it switched off. |
generate_signing_secret | boolean | no | When true, an HMAC signing secret is minted for the new subscription (turning signing on) and returned once as a top-level signing_secret field in the response. Store it then, it is never returned in full again by create/list/update; only GET /webhooks/{webhookId}/signing-secret exposes it afterwards. You can also turn signing on later via POST /webhooks/{webhookId}/signing-secret. |
Responses
201Subscription created400Validation error (missing url, empty or invalid subscribed_to, or a URL that is not allowed)403Webhooks are not enabled for this account
GET/webhooks/events
List Subscribable Event Types · MCP tool list_webhook_events
Returns the full list of event types that webhook subscriptions can listen to. Use these exact strings in the subscribed_to field when creating or updating a subscription. The events are (message.received, message.sent, message.delivered, message.read, message.failed, account.connected, account.disconnected, account.restricted, account.limit_reached), plus a descriptions map; subscribing to an event outside the account's set returns 400.
Responses
200The valid event types401Missing or invalid credentials403Webhooks are not enabled for this account
PUT/webhooks/{webhookId}
Update Webhook Subscription · MCP tool update_webhook
Updates an existing webhook subscription. Provide at least one of url, subscribed_to or name; omitted fields keep their current values. When the URL changes, delivery for the new URL is automatically re-enabled so a previously failing endpoint gets a fresh start.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
url | string | no | New HTTPS delivery URL. |
subscribed_to | array | no | Replacement event list. Must contain at least one valid event name. |
name | string | no | New display name. |
retries_enabled | boolean | no | Turn delivery retries on or off for this subscription. |
enabled | boolean | no | Account on/off switch. Set false to switch the subscription off (suppress delivery), true to switch it back on. Signing is managed separately via the signing-secret routes, not here. |
Responses
200Subscription updated403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
DELETE/webhooks/{webhookId}
Delete Webhook Subscription · MCP tool delete_webhook
Removes a webhook subscription so its URL stops receiving event payloads. Delivery-health counters for the URL are reset, so re-adding the same URL later starts with a clean record.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200Subscription deleted403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
POST/webhooks/{webhookId}/test
Send Test Payload · MCP tool test_webhook
Sends a sample payload to the subscription's URL so you can verify your receiver end-to-end. Optionally pass an event to control which event type the sample payload simulates. Test deliveries never affect the subscription's health counters. The response reports whether the delivery succeeded; a failed test returns delivered:false together with the failure details instead of an error status.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Request body (JSON)
| Field | Type | Required | What it is |
|---|---|---|---|
event | string | no | Event type to simulate. Must be one of the values from GET /webhooks/events. Defaults to a delivery event. |
Responses
200Test attempted, check the delivered flag for the outcome403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
GET/webhooks/{webhookId}/health
Get Webhook Delivery Health · MCP tool get_webhook_health
Returns the delivery-health record for the subscription's URL: how many deliveries have succeeded and failed, whether delivery is currently paused after repeated failures, and the details of the most recent failure. Returns health:null when no deliveries have been attempted yet.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200The delivery-health record for the subscription's URL403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
POST/webhooks/{webhookId}/reenable
Re-enable Webhook Delivery · MCP tool reenable_webhook
Resumes delivery for a webhook whose URL was paused automatically after repeated failures. Resets the paused flag and failure counters. No delivery attempt is made, use the test endpoint afterwards to confirm the receiver is healthy again.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200Delivery re-enabled403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
GET/webhooks/{webhookId}/signing-secret
Read Webhook Signing Secret · MCP tool get_webhook_signing_secret
Returns the subscription's HMAC signing secret so you can configure signature verification on your receiver. The secret is symmetric, we hold the same value your endpoint needs, so it is readable rather than write-once. When signing is off, signing_enabled is false and signing_secret is null. Signed deliveries carry an `X-Webhook-Signature` header (`v1=<hex>`), an HMAC-SHA256 of `<X-Webhook-Timestamp>.<raw request body>` keyed with this secret. Verify against the raw body, reject stale timestamps, and compare in constant time.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200The subscription's signing state403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
POST/webhooks/{webhookId}/signing-secret
Generate or Rotate Webhook Signing Secret · MCP tool rotate_webhook_signing_secret
Mints a new signing secret for the subscription, or replaces the existing one. Creating a secret is how signing is turned on. The new secret is returned in the response. Rotation is a hard cutover, not a grace period: the very next delivery is signed with the new secret only. When rotating a live endpoint, accept both the old and new secret briefly so deliveries in flight during the change still verify.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200Signing secret generated or rotated403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
DELETE/webhooks/{webhookId}/signing-secret
Turn Off Webhook Signing · MCP tool turn_off_webhook_signing
Removes the subscription's signing secret, turning signing off. Subsequent deliveries carry no signature headers, exactly as the webhook behaved before signing was enabled.
Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
webhookId | path | string | yes | The subscription id (from the id field) or its exact name. |
Responses
200Signing turned off403Webhooks are not enabled for this account404No subscription with that id or name exists on this account
Last checked against the live service on 2026-10-23.