Skip to main content
POST
/
getMessages
cURL
curl --request POST \
  --url https://api.pingmee.co.il/getMessages \
  --header 'Content-Type: application/json' \
  --header 'Cookie: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "phoneNumberId": "<string>",
  "targetPhoneNumberId": "<string>"
}
'
{
  "dbObject": [
    {
      "messageId": "<string>",
      "createdAt": 123,
      "sender": "<string>",
      "receiver": "<string>",
      "initiator": "<string>",
      "status": "<string>",
      "updatedAt": 123,
      "participantsIdentifiers": "<string>",
      "message": "<string>",
      "type": "<string>",
      "messagePlatform": "<string>",
      "creationPlatform": "<string>",
      "associatedTo": "<string>",
      "messageDirection": "<string>",
      "hasReaction": true,
      "hasAttachment": true,
      "translation": {},
      "error": {},
      "agentIdentification": {},
      "context": {
        "from": "<string>",
        "id": "<string>"
      },
      "comment": {},
      "attachment": {},
      "attachmentBase64": {
        "resourceId": "<string>",
        "fileName": "<string>",
        "fileMimeType": "<string>",
        "fileSize": 123,
        "fileType": "<string>"
      },
      "reactions": [
        {}
      ],
      "richContent": {},
      "informativeMessageType": "<string>"
    }
  ],
  "hasMoreItemsToFetch": true,
  "lastEvaluatedKey": {
    "messageId": "<string>",
    "createdAt": 123
  }
}
Pagination: For the first request, omit startKey. To fetch the next batch, take lastEvaluatedKey from the previous response and send it as startKey in the next request. That object has the shape { "messageId": "<string>", "createdAt": <number> } (Unix time in milliseconds).

Authorizations

x-api-key
string
header
required

Body

application/json

Use startKey only after the first page: set it to lastEvaluatedKey from the prior response to fetch the next batch.

phoneNumberId
string
required

Business / sender phone number ID

targetPhoneNumberId
string
required

Customer (other party) phone number ID

startKey
object

Pagination cursor. Returned as lastEvaluatedKey in the response; send the same object as startKey on the next request to load the next batch. Shape: { "messageId": "<string>", "createdAt": <number> } (Unix milliseconds). Omit startKey on the first request.

Response

Messages and pagination metadata

dbObject
object[]
required

Messages (newest first), each a prepared Message object

hasMoreItemsToFetch
boolean
required

Whether more messages exist beyond this page

lastEvaluatedKey
object

When present, use this value as startKey in the next request to fetch the next batch of (older) messages.