Path parameters

  • chat_jid string Required

Query parameters

  • limit integer

    Default value is 50.

  • before string
  • after string

Responses

  • 200 application/json

    Messages retrieved successfully

    Hide response attributes Show response attributes object
    • status boolean
    • code integer
    • message string
    • data array[object]
      Hide data attributes Show data attributes object
      • message_id string
      • from string
      • text string
      • timestamp integer
      • is_from_me boolean
  • 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
GET /chats/{chat_jid}/messages
curl \
 --request GET 'http://localhost:7001/chats/{chat_jid}/messages' \
 --header "Authorization: $API_KEY"
Response examples (200)
{
  "code": 200,
  "data": [
    {
      "from": "6281234567890@s.whatsapp.net",
      "text": "Hello, World!",
      "timestamp": 1702129024,
      "is_from_me": false,
      "message_id": "3EB0ABC123DEF456789"
    },
    {
      "from": "me",
      "text": "Hi there!",
      "timestamp": 1702129030,
      "is_from_me": true,
      "message_id": "3EB0ABC123DEF456790"
    }
  ],
  "status": true,
  "message": "Messages retrieved successfully"
}
Response examples (200)
{
  "status": true,
  "code": 200,
  "message": "Messages retrieved successfully",
  "data": [
    {
      "message_id": "3EB0ABC123DEF456789",
      "from": "6281234567890@s.whatsapp.net",
      "text": "Hello, World!",
      "timestamp": 1702129024,
      "is_from_me": false
    }
  ]
}
Response examples (401)
{
  "code": 401,
  "error": "Invalid or expired JWT token",
  "status": false,
  "message": "Unauthorized"
}
Response examples (401)
{
  "status": false,
  "code": 401,
  "message": "Unauthorized",
  "error": "Invalid or missing authentication"
}
Response examples (500)
{
  "code": 500,
  "error": "Failed to retrieve messages",
  "status": false,
  "message": "Internal server error"
}
Response examples (500)
{
  "status": false,
  "code": 400,
  "message": "Bad request",
  "error": "Bad request"
}