Skip to main content
Version: Latest

Sending Messages — Overview

All message-sending endpoints follow the same base structure, regardless of the channel. Understanding this structure makes it easier to work with multiple channels at the same time.

Base structure​

{
"from": "<channel-uuid-or-channel-specific-id>",
"to": "<recipient-identifier>",
"content": { "text": "Hello!" }
}
FieldTypeRequiredDescription
fromstring✅Sender Application Channel: UUID (always works), or the channel-specific alternate when supported — see from field. Web Chatt: UUID or configured display name.
tostring✅Recipient identifier (varies by channel)
contentobject✅The message content (see types below)

from field (sender channel)​

For all six supported channels, from selects which Application Channel sends the message. You may pass:

  1. Application channel UUID — always accepted (shown in Hub as Application Channel ID).
  2. Alternate identifier — must match the channel configuration for your Application (Hub shows copyable values on the channel details screen):
ChannelAlternate from
TelegramBot username (botUsername), with or without a leading @
WhatsAppBusiness phone number (phoneNumber), with or without a leading +
InstagramInstagram username (username), with or without a leading @
MessengerFacebook Page username, Page ID (pageId), or configured account id when used
SMSTwilio sender number (phoneNumber) or Brazilian SMS display name
Web ChattConfigured display name (case-insensitive)

Aliases must belong to the API-key application. Use the UUID when a name is ambiguous or unavailable. The widget public key is not a send identifier. The Web Chatt send operation is included in the API reference.

Discover available channels​

Use the application's API key to discover configured channels and copy each returned from value:

curl 'https://app.chatt2.me/v1/integration/application/channels?offset=0&limit=20' \
-H 'x-api-key: YOUR_APPLICATION_API_KEY'
{
"data": [
{
"id": "e690cc45-4abe-4f83-8373-01e7026797ad",
"channelType": "WEB_CHATT2ME",
"name": "Website support",
"from": "Website support",
"isSandbox": false,
"keyword": null
}
],
"pagination": { "offset": 0, "limit": 20, "total": 1, "totalPages": 1 }
}

offset is a zero-based page index, not a row offset: the second page is ?offset=1&limit=20 (rows 21–40). The default limit is 20, maximum 50, minimum 1; offset must be nonnegative. Invalid pagination returns HTTP 400 with the common API error body. Completed sandboxes return their keyword as from; incomplete setup is not listed. Use the channel discovery reference for the complete response.

Endpoints by channel​

Sandbox sends reuse the WhatsApp, Instagram, and Messenger endpoints below. See Sandbox.

ChannelEndpoint
WhatsAppPOST /v1/communication/whatsapp/message
InstagramPOST /v1/communication/instagram/message
MessengerPOST /v1/communication/messenger/message
TelegramPOST /v1/communication/telegram/message
SMSPOST /v1/communication/sms/message
Web ChattPOST /v1/communication/web-chatt2me/message

to field format by channel​

The format of to varies by channel. See to field formats in Concepts & Architecture for the complete reference.

Response status​

Successful message submissions normally return a Hub messageId and a submission status:

{
"messageId": "9307b9ab-5fab-4151-b7c2-b00c2a8a6e8e",
"status": "sent"
}
StatusChannelsMeaning
sentTelegram, Instagram, SMS, Web Chatt; control actions on supported channelsThe send/control call succeeded; this is not proof that the recipient read or received a new message
enqueuedWhatsApp, Messenger, and all three sandboxesSubmission accepted; delivery can still fail later
errorAllThe send result failed; inspect available errorMessage and errorCode

Typing actions create no message and return messageId: "". WhatsApp mark-seen returns the existing target's Hub ID; Web Chatt mark-seen returns an empty ID. Instagram/Messenger mark-seen is forwarded as a provider control action but persisted through the ordinary outbound path, returning a new Hub ID (sent for Instagram, enqueued for Messenger); it is not a new user-visible text message. Offline Web Chatt messages can remain pending even when the send response says sent.

Validation, authentication, application scope, media checks, quota, or credit failures can instead return a non-2xx HTTP response with statusCode, code, message, hint, and optional errors; they are not send-result objects. A provider submission failure caught by a live send can return HTTP 200 with status: "error". Check both the HTTP status and the body. See Troubleshooting and the operation's documented errors.

Delivery/read updates arrive as eventType: "message_status" through the configured webhook subscriptions. Use webhook payload.message.id for inbound message IDs; messageId belongs to a send response. A provider's own ID is a separate identifier.

Sessions, Agent ownership, and billing​

An ordinary public API send participates in the conversation lifecycle. When a matching Agent session is active or awaiting_human, sending transfers it to transferred, stopping Agent inference for that session. A successful request can create or reuse a session; receiving a message is not the only way a session appears. Coordinate API replies with the session/queue workflow to avoid taking over an Agent conversation unintentionally.

For Instagram, Messenger, Telegram, and Web Chatt, a normal outbound can authorize and finalize the session charge if that session has not already been charged. WhatsApp and SMS use their applicable message/template pricing; SMS still has a technical Agent session. Technical session duration is not permission to send under a provider's policy. Credit authorization can reject the request before provider submission; check the HTTP error and the organization's wallet in Hub. See Application wallet history.

Typing and WhatsApp/Web Chatt mark-seen take their control paths before ordinary session/billing logic. Instagram/Messenger mark-seen uses the ordinary outbound session/charge path. Sandboxes use their shared message quota, rather than ordinary live-channel charging. Instagram comment automation has the separate behavior described in its channel guide.

Content types​

The content field determines the type of message sent. The available types are:

TypeMain fieldDescription
TexttextSimple text message
ImageimageUrlImage with optional caption
VideovideoUrlVideo with optional caption
AudioaudioUrlAudio file
DocumentdocumentUrlFile (PDF, DOCX, etc.)
StickerstickerUrlSticker
LocationlocationGeographic coordinates
Contactcontact / contactsOne or multiple vCard contacts
InteractiveinteractiveButtons, list, CTA URL, location request
TemplatetemplateMeta-approved template (WhatsApp)
ReactionreactionReact to an existing message
Mark as seenmarkSeenMark message as read
Is typingisTypingShow typing indicator
Payment RequestpaymentRequestCharge via PIX, Boleto, or Link
Order StatusorderStatusOrder status update

See availability of each type per channel in Content Types. To send media with a caption, include text alongside the media field and check the caption support matrix: Telegram supports image/video/audio/document captions; WhatsApp supports image/video/document captions; Web Chatt supports image/video/document captions (documents require widget v1.3.3 or later). Instagram and Messenger do not support media captions.

Next steps​