Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.usetitan.app/llms.txt

Use this file to discover all available pages before exploring further.

The messages API provides a unified send endpoint that handles all WhatsApp message types through a single route. You specify the type field and include the corresponding type-specific fields. Additional endpoints let you react to messages, send typing indicators, mark messages as read, edit sent messages, delete messages, and star them.

Send a message

curl -X POST https://api.example.com/api/messages/send \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "session": "default",
    "chatId": "[email protected]",
    "type": "text",
    "text": "Hello from Titan!"
  }'
POST /api/messages/send Sends a message to any WhatsApp chat. The session and chatId fields are always required. The type field determines which additional fields are expected.

Common fields

session
string
required
Session name to send the message from.
chatId
string
required
Target chat JID. Individual: {number}@s.whatsapp.net. Group: {id}@g.us. Status: status@broadcast.
type
string
required
Message type. One of: text, image, file, voice, video, poll, location, contact.
quotedMessage
object
Quote an existing message to reply to it.
mentions
string[]
Array of JIDs to tag in the message. The mentioned JIDs must appear in the message text prefixed with @. Maximum 256 per message.
isForwarded
boolean
Mark the message as forwarded.

Type-specific fields

text
string
required
Text content of the message. Supports WhatsApp formatting (bold, italic, strikethrough, monospace).

Response

id
string
Message ID assigned by WhatsApp.
status
string
Delivery status: pending, sent, delivered, or read.
timestamp
string
ISO 8601 timestamp when WhatsApp accepted the message.
fromPhoneNumber
string
Phone number of the target chat (when available).
fromLid
string
LID of the target chat.
mediaId
string
Media record ID. Present when the message contained media.
{
  "data": {
    "id": "ABCDEF1234567890",
    "status": "sent",
    "timestamp": "2026-01-15T10:05:00Z",
    "fromPhoneNumber": "+5511999999999",
    "fromLid": "12345@lid"
  }
}

React to a message

curl -X POST https://api.example.com/api/sessions/default/messages/react \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "chatId": "[email protected]",
    "messageId": "ABCDEF1234567890",
    "reaction": "👍"
  }'
POST /api/sessions/{session}/messages/react Sends an emoji reaction to a message. Pass an empty string for reaction to remove an existing reaction.
session
string
required
Session name.
chatId
string
required
Chat JID containing the message.
messageId
string
required
ID of the message to react to.
reaction
string
required
Emoji to react with. Send an empty string "" to remove your existing reaction.

Send a typing indicator

curl -X POST https://api.example.com/api/sessions/default/messages/typing \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "chatId": "[email protected]",
    "state": "typing"
  }'
POST /api/sessions/{session}/messages/typing Sends a typing or recording state to a chat. This is a fire-and-forget operation — the API returns immediately without waiting for WhatsApp confirmation.
session
string
required
Session name.
chatId
string
required
Chat JID to send the typing state to.
state
string
required
Typing state: typing, recording, or paused.

Mark messages as seen

curl -X POST https://api.example.com/api/sessions/default/messages/seen \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "chatId": "[email protected]",
    "messageId": "ABCDEF1234567890"
  }'
POST /api/sessions/{session}/messages/seen Sends a read receipt for a message, marking it as seen. WhatsApp will show blue ticks to the sender.
session
string
required
Session name.
chatId
string
required
Chat JID containing the message.
messageId
string
required
ID of the message to mark as seen.

Edit a sent message

curl -X POST https://api.example.com/api/sessions/default/messages/ABCDEF1234567890/edit \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{"text": "Updated message text"}'
POST /api/sessions/{session}/messages/{messageId}/edit Edits the text of a previously sent message. Only text messages you sent can be edited. WhatsApp shows an “edited” label on the message.
session
string
required
Session name.
messageId
string
required
ID of the message to edit.
text
string
required
New text content for the message.

Delete a message

curl -X DELETE https://api.example.com/api/sessions/default/messages/ABCDEF1234567890 \
  -H "Authorization: Bearer titan_..."
DELETE /api/sessions/{session}/messages/{messageId} Deletes a message for everyone in the chat. Only messages you sent can be deleted.
session
string
required
Session name.
messageId
string
required
ID of the message to delete.

Star or unstar a message

curl -X POST https://api.example.com/api/sessions/default/messages/star \
  -H "Authorization: Bearer titan_..." \
  -H "Content-Type: application/json" \
  -d '{
    "chatId": "[email protected]",
    "messageId": "ABCDEF1234567890",
    "star": true,
    "fromMe": false
  }'
POST /api/sessions/{session}/messages/star Stars or unstars a message to bookmark it.
session
string
required
Session name.
chatId
string
required
Chat JID containing the message.
messageId
string
required
ID of the message to star or unstar.
star
boolean
true to star, false to unstar. Defaults to true.
fromMe
boolean
Whether the message was sent by the session account.
sender
string
JID of the message sender. Required for group messages not sent by the session account.