Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Inbox
Update a conversation
Resolves, reopens or marks a conversation as spam, archives it, assigns it, or sets its labels. Only the fields sent change, and each change is written in the conversation's history as the Inbox writes it.
Update a conversation
curl --request PATCH \
--url https://www.app.ocoya.com/api/_public/v1/inbox/conversations/{conversationId} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "RESOLVED",
"archived": false,
"assigneeId": "clh49n2u300008kovd2wq1p8z",
"labelIds": [
"cmhx3w8hd000c7apsd1f0g2h3"
]
}
'{
"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"
}Authorizations
Body
application/json
Response
application/json
The conversation as it is now.
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?