POST /history/sync

Request message history from WhatsApp servers. History will be delivered asynchronously via history.sync_complete webhook event. WhatsApp has rate limits on history sync requests.

application/json

Body Required

  • count integer

    Number of messages to sync

    Minimum value is 1, maximum value is 100. Default value is 25.

Responses

  • 200 application/json

    History sync requested

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data object
      Hide data attributes Show data attributes object
      • requested boolean
      • count integer
      • note string
  • 400 application/json

    Bad request

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
  • 500 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • error string
POST /history/sync
curl \
 --request POST 'http://localhost:7001/history/sync' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{"count":25}'
Request examples
{
  "count": 25
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "History sync requested",
  "data": {
    "requested": true,
    "count": 25,
    "note": "History will be delivered via history.sync_complete webhook event"
  }
}
Response examples (400)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}