Skip to main content
POST
Required token scopes: 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

Authorization
string
header
required

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

chatId
string
required

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)

Pattern: ^[a-f0-9]{24}$

Body

application/json

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

type
enum<string>
required

Defines the message structure and required fields

Available options:
text,
media,
buttons,
list,
contacts,
location,
special
context
string

Reply to a specific message. Use the provider message ID (e.g. wamid...) from message.channelInfo.id

tmpSendId
string

A custom client-side ID for tracking the message

text
string

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

Minimum string length: 1
media
object[]

Array 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

Required array length: 1 - 10 elements
buttons
object[]

Reply buttons. Required for buttons. Max 3 buttons (WhatsApp limit)

Required array length: 1 - 3 elements
list
object

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

contacts
object[]

Contact cards to share. Required for contacts

Minimum array length: 1
location
object

Location to share. Required for location

special
object

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

metadata
object

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

success
boolean
Example:

true

messages
object[]