Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Inbox
Get a conversation
Returns one conversation with its latest messages and notes, oldest first. Reading it here does not mark it read in Ocoya.
Get a conversation
curl --request GET \
--url https://www.app.ocoya.com/api/_public/v1/inbox/conversations/{conversationId} \
--header 'X-API-Key: <api-key>'{
"id": "cmhx3v0k2000b7aps8q2u4n6e",
"brandId": "cmayvq3hk00017apshay5qezu",
"type": "DM",
"status": "OPEN",
"archived": false,
"channel": {
"id": "clh49poxf008x8kov4ncbjty9",
"provider": "instagram",
"name": "Ocoya"
},
"customer": {
"name": "Ana García",
"url": "https://www.instagram.com/anagarcia",
"image": null,
"language": "es"
},
"assigneeId": "clh49n2u300008kovd2wq1p8z",
"labels": [
{
"id": "cmhx3w8hd000c7apsd1f0g2h3",
"name": "Needs follow-up",
"color": "#fa5252"
}
],
"unread": true,
"lastMessage": {
"id": "cmhx3x2pq000d7apsf4k5l6m7",
"type": "received",
"text": "Hi! Do you ship to Spain?",
"images": [],
"authorId": null,
"deleted": false,
"createdAt": "2024-01-01T00:00:00Z"
},
"createdAt": "2024-01-01T00:00:00Z",
"messages": [
{
"id": "cmhx3x2pq000d7apsf4k5l6m7",
"type": "received",
"text": "Hi! Do you ship to Spain?",
"images": [],
"authorId": null,
"deleted": false,
"createdAt": "2024-01-01T00:00:00Z"
}
]
}Authorizations
Response
application/json
Success
DM a private conversation (an email thread is one too), COMMENT a comment on the brand's post, MENTION a post that mentions the brand, REVIEW a Google review.
OPEN waiting for the team, RESOLVED done, SPAM junk. A new message from the customer reopens a resolved one.
Was this page helpful?