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>",
"resetConversationUnreadCount": false
}
'import requests
url = "https://api.pingmee.co.il/getMessages"
payload = {
"phoneNumberId": "<string>",
"targetPhoneNumberId": "<string>",
"resetConversationUnreadCount": False
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phoneNumberId: '<string>',
targetPhoneNumberId: '<string>',
resetConversationUnreadCount: false
})
};
fetch('https://api.pingmee.co.il/getMessages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pingmee.co.il/getMessages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumberId' => '<string>',
'targetPhoneNumberId' => '<string>',
'resetConversationUnreadCount' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pingmee.co.il/getMessages"
payload := strings.NewReader("{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pingmee.co.il/getMessages")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pingmee.co.il/getMessages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}"
response = http.request(request)
puts response.read_body{
"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
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Messages
Get Messages
Fetches messages for a conversation identified by the business phone number and the customer (target) phone number. Results are ordered newest first. Omit startKey on the first request. For each following batch, set startKey to the lastEvaluatedKey value returned by the previous response. resetConversationUnreadCount defaults to false for API callers, so the unread count stays unchanged. The Pingmee app sends true by default and marks the conversation read.
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>",
"resetConversationUnreadCount": false
}
'import requests
url = "https://api.pingmee.co.il/getMessages"
payload = {
"phoneNumberId": "<string>",
"targetPhoneNumberId": "<string>",
"resetConversationUnreadCount": False
}
headers = {
"Cookie": "<api-key>",
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Cookie: '<api-key>',
'x-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
phoneNumberId: '<string>',
targetPhoneNumberId: '<string>',
resetConversationUnreadCount: false
})
};
fetch('https://api.pingmee.co.il/getMessages', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pingmee.co.il/getMessages",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'phoneNumberId' => '<string>',
'targetPhoneNumberId' => '<string>',
'resetConversationUnreadCount' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"Cookie: <api-key>",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.pingmee.co.il/getMessages"
payload := strings.NewReader("{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Cookie", "<api-key>")
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.pingmee.co.il/getMessages")
.header("Cookie", "<api-key>")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pingmee.co.il/getMessages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Cookie"] = '<api-key>'
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"phoneNumberId\": \"<string>\",\n \"targetPhoneNumberId\": \"<string>\",\n \"resetConversationUnreadCount\": false\n}"
response = http.request(request)
puts response.read_body{
"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
}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}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).Unread:
resetConversationUnreadCount is false by default on the API. Omit it or send false and the conversation stays unread. The Pingmee app sends true by default, which marks the conversation read.Authorizations
Body
application/json
Use startKey only after the first page: set it to lastEvaluatedKey from the prior response to fetch the next batch.
Response
Messages and pagination metadata
Last modified on October 4, 2026
Was this page helpful?