curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/messages/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "972521234567",
"type": "text"
}
'{
"success": true,
"messages": [
{
"_id": "6909177d962e17ab3033fa2a",
"chatChannelInfo": {
"name": "whatsapp",
"id": "972521234567",
"accountId": "972509876543"
},
"channelInfo": {
"id": "wamid.HBgMOTcyNTI3NzYwOTg5FQIAERgSRDI2RjUwMkFFQTNEQjE0MEVBAA=="
},
"direction": "outgoing",
"parent_chat": "67a87067aeed4dee1271cb4d",
"status": 0,
"statusHistory": [
{
"status": 0,
"timestamp": 1762203517914
}
],
"text": "Hey there!",
"timestamp": 1762203517914,
"type": "text",
"updatedAt": "2025-11-03T20:58:37.936Z"
}
]
}Send a Message by Recipient
Send a session message addressed by channel + account + recipient phone number, without knowing the chat ID. Omit the channel and account to send from your default channel account.
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/messages/send \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"to": "972521234567",
"type": "text"
}
'{
"success": true,
"messages": [
{
"_id": "6909177d962e17ab3033fa2a",
"chatChannelInfo": {
"name": "whatsapp",
"id": "972521234567",
"accountId": "972509876543"
},
"channelInfo": {
"id": "wamid.HBgMOTcyNTI3NzYwOTg5FQIAERgSRDI2RjUwMkFFQTNEQjE0MEVBAA=="
},
"direction": "outgoing",
"parent_chat": "67a87067aeed4dee1271cb4d",
"status": 0,
"statusHistory": [
{
"status": 0,
"timestamp": 1762203517914
}
],
"text": "Hey there!",
"timestamp": 1762203517914,
"type": "text",
"updatedAt": "2025-11-03T20:58:37.936Z"
}
]
}Send session message
Use this when you have the contact’s phone number but no chatId. Provide the recipient with three body (or query) parameters:
to(required) - the recipient contact ID. For phone-number channels any common format is accepted (0521234567,972521234567,+972 52-123-4567) and normalized; invalid numbers return 400. Max 255 characters.channel+from- the channel name and the channel account ID to send from (e.g. your WhatsApp number). Omit both to use your project’s default channel account (501 if no default account is configured).channelwithoutfromreturns 400;fromwithoutchannelis ignored.
POST /messages/send/{channel} (with from, to in body/query), POST /messages/send/{channel}/{accountId} (with to in body/query) and POST /messages/send/{channel}/{accountId}/{to}. When the recipient comes entirely from the path, lookup failures return 404 instead of the 400 returned for body/query parameters.
⚠ Session-window channels (WhatsApp, Messenger, Instagram): the chat must already exist - otherwise the request fails with Existing chat not found. Session message could be sent only to existing chat. For channels without a session window (e.g. SMS, email) the chat is created automatically.
All status values, type enums and the ID cheat sheet: Enums & Common Fields.Authorizations
API token generated in Texter: gear icon → Developers → API Tokens. When creating a token, assign it the scopes required by the endpoints you plan to call - each endpoint lists its required scopes.
Body
The message contents. type selects the message structure; each type has its own required fields. All types also accept the generic context and tmpSendId options
Recipient contact ID - the phone number for phone-based channels, in any common format
255Defines the message structure and required fields
text, media, buttons, list, contacts, location, special Channel name to send on. Omit together with from to use the default channel account
whatsapp, messenger, instagram, website_chat, email, sms Channel account ID to send from (e.g. your WhatsApp number). Requires channel
Reply to a specific message. Use the provider message ID (e.g. wamid...) from message.channelInfo.id
A custom client-side ID for tracking the message
The message text. Required for text, buttons and list. For text messages: up to 4096 characters; for buttons messages the WhatsApp limit drops to 640 characters
1Array of media items. Required for media. Each item needs mediaType plus either a public url (Texter downloads and stores the file) or a fileId of a file already stored in Texter. WhatsApp media limits enforced by the API: image image/jpeg/image/png up to 5 MB; video video/mp4/video/3gp up to 16 MB; audio audio/aac/audio/mp4/audio/mpeg/audio/amr/audio/ogg up to 16 MB; document any MIME type up to 100 MB; sticker image/webp up to 100 KB. Violations return 400
1 - 10 elementsShow child attributes
Show child attributes
Reply buttons. Required for buttons. Max 3 buttons (WhatsApp limit)
1 - 3 elementsShow child attributes
Show child attributes
List menu configuration. Required for list. WhatsApp limits enforced by the API: max 10 sections, max 10 rows per section, max 10 rows total across all sections
Show child attributes
Show child attributes
Contact cards to share. Required for contacts
1Show child attributes
Show child attributes
Location to share. Required for location
Show child attributes
Show child attributes
Channel-specific special message payload. Required for special. The object shape is defined by the channel provider and validated by the channel adapter - unsupported payloads return 400. May be combined with text
Optional free-form object stored on the message record (returned on the message as metadata). Not shown to the recipient
Response
A confirmation object containing the sent message(s). Field-by-field reference: The Message object