Skip to main content
POST
/
api
/
chat
/
presence
/
:instance
Send presence
curl --request POST \
  --url https://api.example.com/api/chat/presence/:instance \
  --header 'Content-Type: application/json' \
  --header 'token: <token>' \
  --data '
{
  "number": "<string>",
  "state": "<string>",
  "duration": 123
}
'

Documentation Index

Fetch the complete documentation index at: https://docs.ryzeapi.cloud/llms.txt

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

Auth: TokenAccount or TokenInstanceRate-limit: Global (100/min) • Idempotent: yes (ephemeral) Emits a presence indicator (“typing…”, “recording audio…”, or pause) to a chat. Ideal to simulate realistic interaction before sending a message.

Examples

Typing for 5s

Shows the “typing…” indicator on the recipient’s chat and automatically dispatches pause after 5 seconds (thanks to duration: 5). Ideal to precede sending a text message.
curl -X POST "https://ryzeapi.cloud/api/chat/presence/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "state": "typing",
    "duration": 5
  }'

Recording audio

Displays “recording audio…” with state: "recording". Without duration, the indicator stays until WhatsApp expires it naturally (~5–10s) or until you send pause manually.
curl -X POST "https://ryzeapi.cloud/api/chat/presence/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "state": "recording"
  }'

Cancel indicator

With state: "pause", immediately ends any active “typing…” or “recording…” indicator on the chat. Useful when an automated flow ends before the planned duration.
curl -X POST "https://ryzeapi.cloud/api/chat/presence/$Instance_Name" \
  -H "token: $Token_Instance" \
  -H "Content-Type: application/json" \
  -d '{
    "number": "5511999999999",
    "state": "pause"
  }'

Success response

200 OK
{
  "success": true,
  "message": "Presence 'typing' sent successfully (will auto-pause after 5 seconds)",
  "chat_jid": "5511999999999@s.whatsapp.net",
  "state": "typing",
  "duration": 5
}

Path parameters

instance
string
required
Instance name.

Headers

token
string
required
TokenAccount or TokenInstance.

Request body

number
string
required
Phone number or JID of the chat.
state
string
required
typing / recording / pause / paused (case-insensitive).
duration
int
default:"0"
Seconds until auto-pause (0–60). When >0 and state is typing/recording, the API automatically sends pause after that interval. Ignored when pause/paused.

Accepted states

stateEffect
typing”typing…” on the recipient’s chat
recording”recording audio…”
pause / pausedCancels any current indicator

Notes

  • Presences are ephemeral, they are not persisted, and WhatsApp expires the indicator on the recipient’s phone in ~5–10s even without an explicit pause.
  • duration > 60 is truncated to 60 (internal cap).
  • In chats where the recipient disabled presence acknowledgments, the indicator may not appear.

Error responses

HTTPerror.messageWhen
400Invalid request bodyMalformed JSON.
400Number is requiredMissing field.
400State is required. Use 'typing', 'recording', or 'pause'Empty state.
400Invalid state. Use 'typing', 'recording', or 'pause'Outside the enum.
401Invalid token
404Instance not found
503Instance is not connected to WhatsAppNo active session.