Inbox · Messages
Returns messages, one page at a time.
https://api.pozy.ai/v1/inbox/conversations/{conversationId}/messagesGuide: Messages
Request
Send your API key as Authorization: Bearer pz_live_.... Read-only keys can call it. Keys with the messages resource group disabled get 403 resource_group_disabled. Authentication
Path parameters
| Name | Type | Notes |
|---|---|---|
conversationIdrequired | string |
Query parameters
| Name | Type | Notes |
|---|---|---|
accountIdrequired | string | |
limit | integer | Default 1001 to 100 |
cursor | string | |
sortOrder | string | One of asc, descDefault asc |
Example
curl -X GET "https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages?accountId=696e0b682d0a31188e7a2ba9&limit=100" \
-H "Authorization: Bearer $POZY_API_KEY"const res = await fetch("https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages?accountId=696e0b682d0a31188e7a2ba9&limit=100", {
headers: { Authorization: `Bearer ${process.env.POZY_API_KEY}` },
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);import os
import requests
resp = requests.get(
"https://api.pozy.ai/v1/inbox/conversations/6e525f3820fc636aa96d2ee9/messages",
headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
params={
"accountId": "696e0b682d0a31188e7a2ba9",
"limit": 100,
},
timeout=30,
)
resp.raise_for_status()
print(resp.json())Response
200 on success
statusstringpaginationobjecthasMorebooleannextCursorstringCan be null.
sortOrderAppliedstringOne of
asc,desc.messagesarray of object29 child fields
idstringconversationIdstringaccountIdstringplatformstringmessagestringsenderIdstringsenderNamestringCan be null.
senderVerifiedTypestringOne of
blue,government,business,none. Can be null.directionstringOne of
incoming,outgoing.createdAtstring (date-time)attachmentsarray of object9 child fields
idstringtypestringOne of
image,video,audio,file,sticker,share,template,unsupported_type.originalTypestringmimeTypestringurlstringrefreshUrlstringCan be null.
filenamestringCan be null.
previewUrlstringCan be null.
payloadobject
subjectstringCan be null.
storyReplyobject2 child fields
storyIdstringstoryUrlstring
isStoryMentionbooleannoRenderableContentbooleanisEditedbooleaneditedAtstring (date-time)Can be null.
editCountintegereditHistoryarray of object3 child fields
textstringrequiredCan be null.
attachmentsarray of objectrequired3 child fields
typestringurlstringpayloadobject
editedAtstring (date-time)required
isDeletedbooleandeletedAtstring (date-time)Can be null.
deliveryStatusstringOne of
sent,delivered,read,played,failed,deleted. Can be null.deliveredAtstring (date-time)Can be null.
readAtstring (date-time)Can be null.
sentAtstring (date-time)Can be null.
deliveryErrorobjectCan be null.
5 child fields
codeintegertitlestringmessagestringdetailsstringhrefstring (URL)
reactionsarray of object3 child fields
emojistringfromMebooleanreactedAtstring (date-time)
metadataobjectsentViastringOne of
human,api,broadcast,sequence,workflow,comment_automation,bulk-api. Can be null.
lastUpdatedstring (date-time)
{
"status": "active",
"pagination": {
"hasMore": true,
"nextCursor": "string"
},
"sortOrderApplied": "asc",
"messages": [
{
"id": "6bfebd43ddc270f6d2c56fc5",
"conversationId": "6e525f3820fc636aa96d2ee9",
"accountId": "696e0b682d0a31188e7a2ba9",
"platform": "instagram",
"message": "Hello from Pozy",
"senderId": "68ef6f94df13738fb25f1e94",
"senderName": "Acme",
"senderVerifiedType": "blue",
"direction": "incoming",
"createdAt": "2026-10-02T09:00:00.000Z",
"attachments": [
{
"id": "6bfebd43ddc270f6d2c56fc5",
"type": "image",
"originalType": "string",
"mimeType": "image/jpeg",
"url": "https://pozy.ai/media/example-1.jpg",
"refreshUrl": "https://pozy.ai/media/example-1.jpg",
"filename": "photo.jpg",
"previewUrl": "https://pozy.ai/media/example-1.jpg",
"payload": {}
}
],
"subject": "string",
"storyReply": {
"storyId": "62c55df6d7c6e25c9304798b",
"storyUrl": "https://pozy.ai/media/example-1.jpg"
},
"isStoryMention": true,
"noRenderableContent": true,
"isEdited": true,
"editedAt": "2026-10-02T09:00:00.000Z",
"editCount": 42,
"editHistory": [
{
"text": "Hello from Pozy",
"attachments": [
{
"type": "string",
"url": "https://pozy.ai/media/example-1.jpg",
"payload": {}
}
],
"editedAt": "2026-10-02T09:00:00.000Z"
}
],
"isDeleted": true,
"deletedAt": "2026-10-02T09:00:00.000Z",
"deliveryStatus": "sent",
"deliveredAt": "2026-10-02T09:00:00.000Z",
"readAt": "2026-10-02T09:00:00.000Z",
"sentAt": "2026-10-02T09:00:00.000Z",
"deliveryError": {
"code": 1,
"title": "Launch day",
"message": "Hello from Pozy",
"details": "string",
"href": "https://pozy.ai/media/example-1.jpg"
},
"reactions": [
{
"emoji": "string",
"fromMe": true,
"reactedAt": "2026-10-02T09:00:00.000Z"
}
],
"metadata": {},
"sentVia": "human"
}
],
"lastUpdated": "2026-10-02T09:00:00.000Z"
}Errors
Errors use one shape: { error, type, code, param?, details? }. The ones you are most likely to see here:
| 400 | invalid_request_error | A parameter or body field is missing or invalid. param names it. |
| 401 | authentication_error | The API key is missing, revoked or expired. |
| 403 | permission_error | The key is scoped to other profiles or has this resource group disabled. |
| 404 | not_found | Nothing with that id exists in your workspace. |
| 429 | rate_limit_error | Too many requests this minute. Wait for Retry-After seconds. |
Every code is listed in Errors.