wapi.
Guides

Session activity

Presence, identity, usernames, and the paper trail a session leaves.

Is it connected?

curl https://api.wapi.crafter.run/api/status -H "Authorization: Bearer $KEY"
{ "success": true, "data": { "status": "connected" } }

The states you will see are need_scan (waiting for a QR to be scanned), connecting, connected and disconnected. Only connected will accept a send; everything else answers 409, which is why anything automated should poll this rather than assume.

No session id in the path — the key already said which session you mean. See Authentication.

Who am I?

curl https://api.wapi.crafter.run/api/user -H "Authorization: Bearer $KEY"
{ "success": true, "data": { "id": "51999888777@s.whatsapp.net", "lid": "…@lid", "name": "Ada" } }

The identity field is id, not jid — worth stating because reading the wrong one gives you undefined for a perfectly healthy session rather than an error.

Typing indicators

curl -X POST https://api.wapi.crafter.run/api/send-presence-update \
  -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' \
  -d '{"jid":"+51999888777","type":"composing"}'

type is one of unavailable, available, composing, recording, paused.

This is fire-and-forget. WhatsApp acknowledges nothing, so a 200 means the frame left — not that anybody saw it. There is no way to find out whether it was displayed.

Usernames

curl https://api.wapi.crafter.run/api/fetch-username/+51999888777 -H "Authorization: Bearer $KEY"

Returns { "username": null } for most accounts, inside a 200. Absence is a success: most people have not set one, and WhatsApp offers no way to distinguish "no username" from "not allowed to see it".

What goes wrong

SymptomCause
/api/status says disconnectedThe socket dropped. See connection events in session logs below
/api/user returns undefined for identityYou read jid; the field is id
A presence update seems to do nothingIt is fire-and-forget. There is no acknowledgement to read
fetch-username returns nullExpected. Most accounts have not set one
message-logs is emptylog_messages is off for that session

Logs

GET /api/whatsapp-sessions/{id}/message-logs — what the session sent, with delivery status. Needs log_messages on, and a Personal Access Token.

GET /api/whatsapp-sessions/{id}/session-logs — connection events: pairing, drops, reconnects. The first place to look when a session keeps disconnecting.

On this page