Skip to main content
POST
/
api
/
v1
/
sessions
/
{sessionId}
/
messages
/
poll
Polls and message actions
curl --request POST \
  --url https://api.wadial.com/api/v1/sessions/{sessionId}/messages/poll \
  --header 'Authorization: Bearer <token>'

Create a poll

POST /api/v1/sessions/{sessionId}/messages/poll
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique-message-key>
{
  "to": "[email protected]",
  "content": {
    "type": "poll",
    "name": "Lunch?",
    "options": ["Pizza", "Sushi"],
    "selectableCount": 1
  }
}

Vote on a poll

POST /api/v1/sessions/{sessionId}/messages/poll/vote
Authorization: Bearer <api_key>
Content-Type: application/json
{
  "to": "[email protected]",
  "poll": {
    "id": "3EB0A1B2C3D4E5F6",
    "fromMe": false,
    "authorJid": "[email protected]",
    "messageSecretBase64": "base64-message-secret"
  },
  "selectedOptionNames": ["Pizza"]
}

React to a message

POST /api/v1/sessions/{sessionId}/messages/react
Authorization: Bearer <api_key>
Content-Type: application/json
{
  "to": "15551234567",
  "target": {
    "remoteJid": "[email protected]",
    "id": "3EB0A1B2C3D4E5F6",
    "fromMe": false
  },
  "emoji": "👍"
}
Use an empty emoji string to remove your reaction.

Edit a message

PATCH /api/v1/sessions/{sessionId}/messages/edit
Authorization: Bearer <api_key>
Content-Type: application/json
Idempotency-Key: <unique-message-key>
{
  "to": "15551234567",
  "target": {
    "id": "3EB0A1B2C3D4E5F6"
  },
  "content": {
    "type": "text",
    "text": "Corrected text"
  }
}

Target a message

These endpoints share the same target shape:
ActionEndpoint
Delete for everyonePOST /api/v1/sessions/{sessionId}/messages/revoke
PinPOST /api/v1/sessions/{sessionId}/messages/pin
UnpinPOST /api/v1/sessions/{sessionId}/messages/unpin
KeepPOST /api/v1/sessions/{sessionId}/messages/keep
UnkeepPOST /api/v1/sessions/{sessionId}/messages/unkeep
{
  "to": "15551234567",
  "target": {
    "remoteJid": "[email protected]",
    "id": "3EB0A1B2C3D4E5F6",
    "fromMe": true
  }
}
For pinning, you may include durationSecs.

Delete for me

POST /api/v1/sessions/{sessionId}/messages/delete-for-me
Authorization: Bearer <api_key>
Content-Type: application/json
{
  "message": {
    "chatJid": "[email protected]",
    "id": "3EB0A1B2C3D4E5F6",
    "fromMe": false
  },
  "deleteMedia": true
}