Messages

Request a chat history sync

Triggers an asynchronous WhatsApp history sync for a specific chat through the WUTS-connected device. The endpoint returns immediately and the synced messages are delivered later via the configured webhook (event: history.sync).

POST
/messages/history/request

Triggers an asynchronous WhatsApp history sync for a specific chat through the WUTS-connected device. The endpoint returns immediately and the synced messages are delivered later via the configured webhook (event: history.sync).

Authorization

bearerAuth
AuthorizationBearer <token>

Per-user API token (UUID v4) sent as Authorization: Bearer <token>. Identifies the tenant and user.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/messages/history/request" \  -H "Content-Type: application/json" \  -d '{    "chat_jid": "5511999999999@s.whatsapp.net",    "last_message_id": "3EB0XXXX1234ABCD",    "last_message_from_me": false,    "last_message_timestamp": 1750000000,    "count": 50  }'
{  "success": true,  "message": "History sync requested. Messages will be delivered via webhook (event: history.sync).",  "chat_jid": "5511999999999@s.whatsapp.net",  "requested_count": 50}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}
{  "success": false,  "error": "validation failed",  "error_code": "VALIDATION_ERROR",  "timestamp": "2026-06-15T12:00:00Z"}