ChakraHQ APIs
HomeSign In
HomeSign In
  1. Whatsapp
  • API Keys
  • Response Format
  • Whatsapp
    • Inbound Events Webhook
    • How to figure out pluginId and whatsappPhoneNumberId
    • Pass Through APIs
      • WhatsApp Messages API (pass-through)
      • Send WhatsApp session message
      • Create WhatsApp Message Template (pass-through)
      • List WhatsApp Message Templates (pass-through)
      • Update WhatsApp Message Template (pass-through)
      • Fetch Whatsapp Media API
      • Show Whatsapp Media Attachments API
    • Send Whatsapp Template Message For Process
      POST
    • Send Whatsapp Template Message For A Phone Number
      POST
    • Upload Public Media
      POST
    • Show Whatsapp Media API
      GET
    • Create a lead
      POST
    • List previous messages for a phone number
      POST
  • Platform
    • Process
      • Fetch Process By Id
      • List Processes
      • Create Process
      • Update Process
      • Update Process By Primary Key
      • Delete Process
      • Delete Process By Primary Key Value
      • Bulk Create Process API
      • Bulk Update Process API
    • Task
      • Create Task API
    • User
      • List Users API
      • List Users API (V2)
      • Fetch User API
      • Fetch User API (V2)
      • Update User API
    • Photo
      • Fetch Photo API
      • Upload Photo API
      • Upload Photo API With Id
    • Background Job
      • Fetch Background Job
      • Fetch Background Job Entries API
    • Fetch Config
      GET
  1. Whatsapp

List previous messages for a phone number

POST
https://api.chakrahq.com/v1/ext/plugin/whatsapp/list-chat-messages-for-phone-number
This API allows you to list chat messages exchanged with a customer phone number. In response you

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/jsonRequired

Example
{
  "customerPhoneNumber": "919901258433"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.chakrahq.com/v1/ext/plugin/whatsapp/list-chat-messages-for-phone-number' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "customerPhoneNumber": "919901258433"
}'

Responses

🟢200Success
application/json
Body

Example
{
  "_data": [
    {
      "id": "994374d6-67e5-4ba1-83a0-3ae0ba77163e",
      "createdAt": 1760525496350,
      "updatedAt": 1760525496350,
      "externalId": "wamid.HBgMOTE5OTAxMjU4NDMzFQIAERgSMjBBMzdGQjFGRjYwRkY0NjQzAA==",
      "provider": "WHATSAPP",
      "dataType": "text",
      "body": {
        "text": {
          "body": "wait is over"
        }
      },
      "text": "wait is over",
      "attachments": null,
      "deliveryStatus": "DELIVERED",
      "direction": "OUTBOUND",
      "timestamp": 1760525496345,
      "context": null,
      "adhocAgent": null,
      "source": null,
      "errorContext": null,
      "team": "5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee",
      "chat": "1965c0e9-9e81-4c35-a79c-b6fe90757fd2",
      "plugin": "d83e1d23-50b8-4d87-8f92-842a0ac516f6",
      "contact": "102b44f2-272b-4405-8af8-b0dc73002a5d",
      "user": "2995c8ee-8749-4983-a648-707c24bf030f",
      "procedure": null,
      "process": "7417c17d-ace1-4977-867d-eef2ba320263",
      "campaign": null,
      "inReplyTo": null
    },
    {
      "id": "791c80c5-b89c-46ea-9cff-530b7daa64df",
      "createdAt": 1760525485312,
      "updatedAt": 1760525485312,
      "externalId": "wamid.HBgMOTE5OTAxMjU4NDMzFQIAERgSNzJBRTVFMUEzMjM3RTcwOUU3AA==",
      "provider": "WHATSAPP",
      "dataType": "text",
      "body": {
        "text": {
          "body": "Lets wait"
        }
      },
      "text": "Lets wait",
      "attachments": null,
      "deliveryStatus": "DELIVERED",
      "direction": "OUTBOUND",
      "timestamp": 1760525485307,
      "context": null,
      "adhocAgent": null,
      "source": null,
      "errorContext": null,
      "team": "5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee",
      "chat": "1965c0e9-9e81-4c35-a79c-b6fe90757fd2",
      "plugin": "d83e1d23-50b8-4d87-8f92-842a0ac516f6",
      "contact": "102b44f2-272b-4405-8af8-b0dc73002a5d",
      "user": "2995c8ee-8749-4983-a648-707c24bf030f",
      "procedure": null,
      "process": "7417c17d-ace1-4977-867d-eef2ba320263",
      "campaign": null,
      "inReplyTo": null
    },
    {
      "id": "609f39ed-bfe8-493c-8ea0-9e6eff051178",
      "createdAt": 1760525484345,
      "updatedAt": 1760525484345,
      "externalId": "TEST.e69c9b3b-0236-4036-a8e2-7b68bf3ba3fe",
      "provider": "WHATSAPP",
      "dataType": "text",
      "body": {
        "body": "wait"
      },
      "text": "wait",
      "attachments": null,
      "deliveryStatus": "DELIVERED",
      "direction": "INBOUND",
      "timestamp": 1760525484000,
      "context": {},
      "adhocAgent": null,
      "source": null,
      "errorContext": null,
      "team": "5fc9f8e3-af4a-4f29-bfd8-6c02e3abe3ee",
      "chat": "1965c0e9-9e81-4c35-a79c-b6fe90757fd2",
      "plugin": "d83e1d23-50b8-4d87-8f92-842a0ac516f6",
      "contact": "102b44f2-272b-4405-8af8-b0dc73002a5d",
      "user": null,
      "procedure": null,
      "process": "7417c17d-ace1-4977-867d-eef2ba320263",
      "campaign": null,
      "inReplyTo": null
    },
  ]
}
Modified at 2025-10-16 10:40:46
Previous
Create a lead
Next
Fetch Process By Id
Built with