Live

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:

Request
curl https://api.dmwire.ai/v1/usage \
  -H "X-API-Key: $DMWIRE_API_KEY"
Response (HTTP 200, captured 2026-10-17)
{
  "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:

Request
curl https://api.dmwire.ai/v1/usage \
  -H "Authorization: Bearer $DMWIRE_API_KEY"
Response (HTTP 200, captured 2026-10-17)
{
  "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:

Request
curl https://api.dmwire.ai/v1/usage \
  -H "X-API-Key: dmw_live_this_key_does_not_exist"
Response (HTTP 401, captured 2026-10-17)
{
  "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.

Request
curl https://api.dmwire.ai/v1/messages/does-not-exist \
  -H "X-API-Key: $DMWIRE_API_KEY"
Response (HTTP 404, captured 2026-10-17)
{
  "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:

Request
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."}'
Response (HTTP 409, captured 2026-10-20)
{
  "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:

Request
curl "https://api.dmwire.ai/v1/messages?limit=5" \
  -H "X-API-Key: $DMWIRE_API_KEY"
Response (HTTP 200, captured 2026-10-17)
{
  "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

NameInTypeRequiredWhat it is
limitqueryinteger (default 50, max 100)no
directionquerystringno
account_idquerystringno
beforequerystringnoThe next_cursor of the previous page
chat_idquerystringnoOnly messages of this chat (list_chats).

Responses

  • 200 The messages, newest first
  • 400 Invalid 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)

FieldTypeRequiredWhat it is
account_idstringnoThe account to send from (see list_accounts). Optional when one account is connected.
toobjectyesOne of contact_id or the identity the account's channel uses.
to.contact_idstringno
to.phonestringnoWhatsApp, Telegram (an existing contact), SMS and WhatsApp Business.
to.emailstringnoEmail accounts.
to.instagram_idstringnoInstagram accounts (the person's Instagram-scoped id from an inbound message).
to.messenger_idstringnoMessenger accounts (the person's Page-scoped id from an inbound message).
to.telegram_user_idstringnoTelegram accounts (the person's Telegram user id from an inbound message).
to.telegram_usernamestringnoTelegram accounts (the person's @username, with or without the @; someone who already wrote to the account).
to.line_user_idstringnoLINE accounts (the person's LINE user id from an inbound message).
to.viber_user_idstringnoViber accounts (the person's Viber user id from an inbound message).
to.external_idstringnoCustom channel accounts (your own id for the person).
to.custom_channelstringnoCustom 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_urlstringnoLinkedIn accounts (the person's profile URL, from an inbound message or the contact block).
textstringyes
subjectstringnoEmail only; the subject line of the mail.
list_unsubscribestringnoEmail 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_urlstringnoAn https URL of an image, video, audio file or document to attach.
reply_tostringnoThe 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_inbooleannoSet 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

  • 202 Queued for delivery
  • 400 Invalid request
  • 403 Account suspended
  • 409 No 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)
  • 422 The contact cannot be messaged
  • 429 A 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)

FieldTypeRequiredWhat it is
account_idstringnoThe WhatsApp Business account to send from. Optional when one account is connected.
toobjectyes
to.contact_idstringno
to.phonestringno
templateobjectyes
template.namestringyesThe approved template's name.
template.languagestringnoThe template's language code, as approved.
template.variablesobjectnoPlaceholder values, a list in order or an object keyed by placeholder.
template.componentsarraynoOptional. Meta's own components array, sent as is instead of building it from variables.
opt_inbooleannoSet 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

  • 202 Queued for delivery
  • 400 Invalid template or recipient
  • 409 No connected account
  • 422 The account's channel has no templates, or the contact cannot be messaged
  • 429 A 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

NameInTypeRequiredWhat it is
cursorquerystringnoThe opaque cursor returned by the previous call.
account_idquerystringnoOnly messages received on this account.
chat_idquerystringnoOnly messages of this chat (list_chats).
timeout_squeryinteger (default 25, max 55)no

Responses

  • 200 New messages (possibly none) and the cursor for the next call
  • 400 Invalid cursor or timeout
  • 429 Too 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

NameInTypeRequiredWhat it is
idpathstringyes

Responses

  • 200 The message
  • 404 No 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

NameInTypeRequiredWhat it is
queryquerystringnoMatches the chat's name, username, number or group name.
account_idquerystringno
limitqueryinteger (default 50, max 100)no
typequerystringno

Responses

  • 200 The chats, most recently active first
  • 400 Invalid 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

NameInTypeRequiredWhat it is
queryquerystringnoMatches the chat's name, username, number or group name.
account_idquerystringno
limitqueryinteger (default 50, max 100)no

Responses

  • 200 The chats, most recently active first
  • 400 Invalid 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

NameInTypeRequiredWhat it is
queryquerystringnoMatches the chat's name, username, number or group name.
account_idquerystringno
limitqueryinteger (default 50, max 100)no

Responses

  • 200 The chats, most recently active first
  • 400 Invalid 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

NameInTypeRequiredWhat it is
chat_idpathstringyes

Request body (JSON)

FieldTypeRequiredWhat it is
account_idstringnoOptional; the chat must be on this account's channel.

Responses

  • 200 Marked
  • 400 Invalid chat_id
  • 404 No 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

NameInTypeRequiredWhat it is
queryquerystringyes
account_idquerystringno
chat_idquerystringno
limitqueryinteger (default 20, max 100)no

Responses

  • 200 The matching messages, newest first
  • 400 Invalid 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)

FieldTypeRequiredWhat it is
customDataobjectyes
customData.messageSidstringnoYour id for the message.
customData.fromIdstringnoThe sender's id on your side.
customData.toIdstringnoYour receiving id, if you have several.
customData.bodystringyesThe message text.
customData.mediaUrlstring or nullnoA public https URL of an attachment.
customData.mediaContentTypestring or nullnoThe attachment's MIME type.
customData.firstNamestring or nullno
customData.lastNamestring or nullno
customData.emailstring or nullno
messageTypestringno

Responses

  • 200 The message was accepted.
  • 400 customData is missing or a field is malformed.
  • 401 Missing 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

  • 200 The connected accounts
  • 404 This 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)

FieldTypeRequiredWhat it is
cookie_jarobjectyesThe 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.
countrystringyesTwo-letter country code of where this LinkedIn account is normally used (the dedicated IP is allocated there).
citystringnoOptional city, to place the IP closer to where the account is used.
country_confirmationkept | switchednoOnly after a 409 country_confirmation_required; kept keeps your pick, switched means you changed it.
browser_timezonestringnoThe IANA timezone of the browser the cookies came from, when known.
account_idstringnoReconnect this account (from list_accounts) instead of adding one.

Responses

  • 200 The sign-in started
  • 400 Unreadable cookies or a missing country
  • 403 The account cap is reached
  • 409 The 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

NameInTypeRequiredWhat it is
accountIdpathstringyesThe account id from connect_linkedin or list_accounts.

Responses

  • 200 The status
  • 404 No 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

NameInTypeRequiredWhat it is
accountIdpathstringyes

Request body (JSON)

FieldTypeRequiredWhat it is
codestringyes

Responses

  • 200 The code was accepted for checking
  • 400 Missing code
  • 404 No such LinkedIn account
  • 409 No 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

NameInTypeRequiredWhat it is
accountIdpathstringyes

Responses

  • 200 Disconnected
  • 404 No 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)

FieldTypeRequiredWhat it is
channel_access_tokenstringyesThe 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_secretstringyesThe Messaging API channel secret, used to verify inbound event signatures.
channel_idstringnoOptional numeric channel id. Informational only.

Responses

  • 200 The Official Account was connected.
  • 400 Missing or invalid fields, or the credentials could not be validated.
  • 401 Authentication required or invalid.
  • 403 The target account's plan does not include a channel tier.
  • 409 This 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

NameInTypeRequiredWhat it is
botUserIdpathstringyesThe connection's bot user id, as returned when connecting.

Responses

  • 200 The stored connection state.
  • 401 Authentication required or invalid.
  • 404 No 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

NameInTypeRequiredWhat it is
botUserIdpathstringyesThe connection's bot user id.

Responses

  • 200 The verification result.
  • 401 Authentication required or invalid.
  • 404 No connection with that id exists on the account.
  • 502 The 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

NameInTypeRequiredWhat it is
botUserIdpathstringyesThe connection's bot user id.

Responses

  • 200 The Official Account was disconnected.
  • 401 Authentication required or invalid.
  • 404 No 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)

FieldTypeRequiredWhat it is
auth_tokenstringyesThe bot's authentication token from the Viber admin panel.

Responses

  • 200 The bot was connected and its webhook registered.
  • 400 The token is missing, or Viber rejected it or the webhook check.
  • 401 Missing or invalid API key.
  • 403 The 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

NameInTypeRequiredWhat it is
botIdpathstringyesThe bot id returned when connecting.
livequerybooleannoRe-check the bot with Viber before answering.

Responses

  • 200 The connection state.
  • 404 No 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

NameInTypeRequiredWhat it is
botIdpathstringyesThe bot id.

Responses

  • 200 The verification result.
  • 404 No 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

NameInTypeRequiredWhat it is
botIdpathstringyesThe bot id.

Responses

  • 200 The bot was disconnected.
  • 404 No 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)

FieldTypeRequiredWhat it is
app_idstringyesYour Meta app's App ID.
app_secretstringyesYour Meta app's App Secret.
access_tokenstringyesA system user access token for the app with the whatsapp_business_messaging and whatsapp_business_management permissions.
waba_idstringyesThe WhatsApp Business Account ID.
phone_number_idstringnoOptional. The phone number ID to connect, when the account holds more than one number.

Responses

  • 200 The number is connected (status connected) or stored and waiting on Meta (status pending, with detail).
  • 400 A field is missing, Meta rejected the credentials (error_code invalid_credentials), or phone_number_id is not on the account.
  • 403 The account's plan or channel limit does not allow another connection.
  • 409 The 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

  • 200 Disconnected.
  • 404 No 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

  • 200 The number is connected.
  • 400 No credentials are stored yet; connect first.
  • 409 Meta 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

  • 200 The connection.
  • 404 No 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)

FieldTypeRequiredWhat it is
account_sidstringyesTwilio Account SID (starts with AC).
auth_tokenstringyesTwilio Auth Token of that account.
phone_numberstringyesThe Twilio number in international format, e.g. +447700900123.
a2p_registeredbooleannoYou confirm the number's A2P 10DLC registration. A +1 number may be refused without it.

Responses

  • 200 The number is connected.
  • 400 A field is missing or malformed, or a +1 number was sent without a2p_registered where it is required (error_code a2p_registration_required).
  • 403 Twilio rejected the credentials, or the account's plan or channel limit does not allow another connection.
  • 404 The number is not on that Twilio account.
  • 409 The 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

  • 200 Disconnected.
  • 404 No 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

  • 200 The connection.
  • 404 No 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)

FieldTypeRequiredWhat it is
usernamestringyesThe gateway username shown in the app.
passwordstringyesThe gateway password shown in the app.
phone_numberstringyesThe phone's own number in international format.
modecloud | localnocloud (default) uses the app's cloud relay; local reaches the phone at base_url.
base_urlstringnoThe gateway address for local mode or a self hosted relay. Must be a public https address.
signing_keystringnoOptional webhook signing key set in the app, used to verify incoming webhooks.

Responses

  • 200 The phone is connected.
  • 400 A field is missing or malformed.
  • 403 The gateway rejected the credentials, or the account's plan or channel limit does not allow another connection.
  • 409 The 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

  • 200 Disconnected.
  • 404 No 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

  • 200 The gateway state.
  • 404 No 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)

FieldTypeRequiredWhat it is
addressstringyesThe mailbox address. It is also the connection id.
passwordstringyesThe password or app password (used for SMTP too unless smtp_password is given).
providergmail | outlook | yahoo | icloud | fastmail | customnoServer preset. Defaults to custom.
display_namestringnoThe From name on mail you send.
usernamestringnoThe login, when it is not the address.
imap_hoststringno
imap_portintegerno
imap_securebooleanno
smtp_hoststringno
smtp_portintegerno
smtp_securebooleanno
smtp_usernamestringnoA separate SMTP login, when the outgoing server has its own.
smtp_passwordstringno

Responses

  • 200 The mailbox is connected.
  • 400 A field is missing or malformed, or the IMAP or SMTP check failed (the error names which).
  • 403 The 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

NameInTypeRequiredWhat it is
addresspathstringyesThe mailbox address.

Responses

  • 200 The mailbox state.
  • 404 No 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

NameInTypeRequiredWhat it is
addresspathstringyesThe mailbox address.

Responses

  • 200 Disconnected.
  • 404 No 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)

FieldTypeRequiredWhat it is
webhook_urlstringyesThe https URL to post outgoing messages to.

Responses

  • 200 The webhook is set.
  • 400 The URL is missing or was refused by the safety check.
  • 403 The 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

  • 200 Removed.
  • 404 No 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

  • 200 The webhook is set.
  • 404 No 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

  • 200 Consent URL and correlation token issued.
  • 401 Authentication required or invalid.
  • 404 Targeted 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

  • 200 Current connection status.
  • 401 Authentication required or invalid.
  • 404 Targeted 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

  • 200 Connectable pages.
  • 401 Authentication required or invalid.
  • 404 Targeted 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)

FieldTypeRequiredWhat it is
page_idstringyesThe id of the page to connect. Must be one of the pages returned by the status or pages endpoint.
instagramobject or nullnoOptional override of the Instagram Business account to link. When omitted, the Instagram account associated with the chosen page is used automatically.

Responses

  • 200 Page selected and channel connected.
  • 400 Missing or invalid request fields.
  • 401 Authentication required or invalid.
  • 404 Page not found in the connectable list, or targeted managed account not found.
  • 409 The 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

  • 200 Channel disconnected.
  • 401 Authentication required or invalid.
  • 404 Targeted 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)

FieldTypeRequiredWhat it is
phone_numberstringyesThe account phone number to connect, in E.164 format.
modecode | qrnoLogin method. 'code' sends a one-time login code to the account; 'qr' returns a login token and QR URL to display for scanning.
force_newbooleannoWhen true, discards any existing session and starts fresh.

Responses

  • 200 Session started.
  • 400 Invalid or missing request fields.
  • 403 This channel is not enabled for the account, or the plan lacks a channels tier.
  • 409 This 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe account phone number being connected, in E.164 format.

Request body (JSON)

FieldTypeRequiredWhat it is
codestringyesThe one-time login code received by the account.

Responses

  • 200 Code accepted.
  • 400 Missing or invalid login code.
  • 403 This 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe account phone number being connected, in E.164 format.

Request body (JSON)

FieldTypeRequiredWhat it is
passwordstringyesThe account's two-factor password.

Responses

  • 200 Password accepted.
  • 400 Missing or invalid password.
  • 403 This 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe account phone number, in E.164 format.

Responses

  • 200 Current connection status.
  • 404 No 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe account phone number to disconnect, in E.164 format.

Responses

  • 200 Channel removed.
  • 404 No 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)

FieldTypeRequiredWhat it is
ig_user_idstringyesThe 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_tokenstringyesThe Instagram user access token your own Meta app obtained for this account. Validated live against Instagram before it is stored.
expires_atstring or nullnoWhen the token expires, as an ISO-8601 date-time. Takes precedence over expires_in.
expires_innumber or nullnoSeconds until the token expires, as returned by Meta. Used when expires_at is omitted. With neither field, a 60-day lifetime is assumed.
usernamestringnoOptional account username. Only used when Instagram does not return one for the token.

Responses

  • 200 Token stored; the channel is connected.
  • 400 Missing 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.
  • 403 The caller is not allowed to edit integrations on this account.
  • 409 This 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

  • 200 Connection removed (or there was none).
  • 403 The 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)

FieldTypeRequiredWhat it is
phone_numberstringyesThe WhatsApp number to connect, in E.164 format (for example +15551230000).
link_methodqr | pairing_codenoHow 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_newbooleannoDiscard any existing session for this number and start a fresh pairing.
import_contactsbooleannoImport the device's existing contacts on first connection.
pause_ai_for_imported_contactsbooleannoWhen importing contacts, keep automated replies paused for them.
import_existing_chatsbooleannoImport existing chat history on first connection. Requires import_contacts to be true.
mark_imported_contacts_as_privatebooleannoWhen importing contacts, create them as private (no messages stored or sent for them). Incompatible with import_existing_chats.

Responses

  • 200 Pairing session started.
  • 400 Missing or invalid request fields.
  • 401 Authentication required or invalid.
  • 403 The account's plan does not include channel connections.
  • 404 The referenced account could not be found.
  • 409 This number is already connected.
  • 503 The 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe connected number in E.164 format.

Responses

  • 200 QR code returned.
  • 400 This number cannot be paired with WhatsApp Web.
  • 401 Authentication required or invalid.
  • 404 The connection was not found, or the QR code is not ready yet.
  • 410 The QR code expired. Restart the connection to generate a new one.
  • 503 The 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe connected number in E.164 format.

Responses

  • 200 Connection status returned.
  • 401 Authentication required or invalid.
  • 404 The connection was not found.
  • 502 The 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

NameInTypeRequiredWhat it is
phoneNumberpathstringyesThe connected number in E.164 format.

Responses

  • 200 Disconnected. status is "removed" when the number was deleted from the account.
  • 401 Authentication required or invalid.
  • 404 The 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

  • 200 The stored Meta app summary, or configured false
  • 401 Missing or invalid API key
  • 403 The 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)

FieldTypeRequiredWhat it is
app_idstringnoThe 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_secretstringnoThe Meta App Secret, between 16 and 128 characters. Stored encrypted and never returned. Part of the Facebook Login set.
config_idstringnoThe 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_idstringnoThe 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_secretstringnoThe 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

  • 200 The Meta app was verified and saved
  • 400 Neither credential set was supplied, a field is malformed, a set is incomplete, or Meta rejected the App ID and App Secret pair
  • 401 Missing or invalid API key
  • 403 The 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

  • 200 Removal completed
  • 401 Missing or invalid API key
  • 403 The 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

NameInTypeRequiredWhat it is
namequerystringnoExact template name to filter to.

Responses

  • 200 The account's templates
  • 400 No own Meta app (or embedded WhatsApp) connection is set up on this account
  • 401 Missing or invalid API key
  • 403 The caller's plan does not include WhatsApp templates
  • 500 Meta 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)

FieldTypeRequiredWhat it is
namestringyesTemplate name. Meta requires lowercase letters, digits, and underscores only.
languagestringyesMeta language code.
bodystringnoBody text. Use Meta's native {{1}}, {{2}}, … placeholder syntax. Required unless components is supplied.
variablesarraynoExample values for the body placeholders, index-aligned, used for Meta's review sample.
categoryMARKETING | UTILITY | AUTHENTICATIONnoDefaults to UTILITY when omitted.
add_security_recommendationbooleannoAUTHENTICATION only. Adds Meta's "do not share this code" line to the preset body. Defaults to true.
code_expiration_minutesintegernoAUTHENTICATION only. Shows "This code expires in N minutes" as the footer. Omitted means no expiry footer.
headerstringnoOptional plain-text header.
footerstringnoOptional footer text.
buttonsarrayno
componentsarraynoEscape 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

  • 201 The template was submitted to Meta for review
  • 400 A required field is missing or malformed, no own Meta app connection exists, or Meta rejected the template
  • 401 Missing or invalid API key
  • 403 The caller's plan does not include WhatsApp templates
  • 500 Meta 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

NameInTypeRequiredWhat it is
namepathstringyesThe template's Meta name.
hsm_idquerystringnoMeta's template id, to delete only that one localization instead of every language.

Responses

  • 200 The template was deleted (or Meta reported it was not deleted)
  • 400 The template name path parameter is missing, no own Meta app connection exists, or Meta rejected the deletion
  • 401 Missing or invalid API key
  • 403 The caller's plan does not include WhatsApp templates
  • 500 Meta 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

  • 200 Today'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

  • 200 The account's webhook subscriptions
  • 401 Missing or invalid credentials
  • 403 Webhooks 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)

FieldTypeRequiredWhat it is
urlstringyesHTTPS URL that will receive event payloads via POST.
subscribed_toarrayyesEvent types to subscribe to. Must contain at least one valid event name.
namestringnoOptional display name. Also usable as the webhookId path parameter. Defaults to a timestamped name.
retries_enabledbooleannoRetry failed deliveries (1m, 5m, 30m, 2h). Off by default. See the Retries section for the duplicate-delivery caveat.
enabledbooleannoAccount on/off switch for the subscription. Defaults to true (on). Pass false to create it switched off.
generate_signing_secretbooleannoWhen 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

  • 201 Subscription created
  • 400 Validation error (missing url, empty or invalid subscribed_to, or a URL that is not allowed)
  • 403 Webhooks 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

  • 200 The valid event types
  • 401 Missing or invalid credentials
  • 403 Webhooks 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Request body (JSON)

FieldTypeRequiredWhat it is
urlstringnoNew HTTPS delivery URL.
subscribed_toarraynoReplacement event list. Must contain at least one valid event name.
namestringnoNew display name.
retries_enabledbooleannoTurn delivery retries on or off for this subscription.
enabledbooleannoAccount 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

  • 200 Subscription updated
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 Subscription deleted
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Request body (JSON)

FieldTypeRequiredWhat it is
eventstringnoEvent type to simulate. Must be one of the values from GET /webhooks/events. Defaults to a delivery event.

Responses

  • 200 Test attempted, check the delivered flag for the outcome
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 The delivery-health record for the subscription's URL
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 Delivery re-enabled
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 The subscription's signing state
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 Signing secret generated or rotated
  • 403 Webhooks are not enabled for this account
  • 404 No 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

NameInTypeRequiredWhat it is
webhookIdpathstringyesThe subscription id (from the id field) or its exact name.

Responses

  • 200 Signing turned off
  • 403 Webhooks are not enabled for this account
  • 404 No subscription with that id or name exists on this account

Last checked against the live service on 2026-10-23.