curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/messages/send/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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"
}
]
}{
"error": "media[1]: File caption is unsupported for document media type!",
"success": false
}{
"error": "Chat not found",
"success": false
}Send a Message to Chat
Send a session message to an existing chat. Messages can include text, media (image, video, document, audio), interactive buttons, list menus, contact cards and locations.
curl --request POST \
--url https://{projectID}.texterchat.com/server/api/v2/messages/send/{chatId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"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"
}
]
}{
"error": "media[1]: File caption is unsupported for document media type!",
"success": false
}{
"error": "Chat not found",
"success": false
}Send session message
⚠ Important: session messages are subject to WhatsApp’s 24-hour window. If the contact has not sent a message in the last 24 hours, WhatsApp blocks session messages and the request fails. In that case, you can only send a Template Message.
Session messages can only be sent to existing chats - sending to a chat that doesn’t exist returns an error.
Don’t have a chatId? Use Send a Message by Recipient to address the recipient by channel + account + phone number directly.
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.
Path Parameters
The unique identifier of the chat. You can obtain this value by using the Search Chats endpoint with the contact's phone number. Must be a 24-character hex string (MongoDB ObjectId)
^[a-f0-9]{24}$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
Defines the message structure and required fields
text, media, buttons, list, contacts, location, special 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