Your API key. Create one in Ocoya. Authorization: Bearer <key> works too.
Inbox
Reply to a conversation
Sends a reply to the customer on the network, as the Inbox does: a DM in a DM, a reply under a comment, mention or review, an email in an email thread. as: dm answers a Facebook or Instagram comment privately instead, and as: note adds a note only the team sees. A reply assigns the conversation to the API key's user when nobody has it.
Reply to a conversation
curl --request POST \
--url https://www.app.ocoya.com/api/_public/v1/inbox/conversations/{conversationId}/reply \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"text": "Yes, we ship to Spain! Delivery takes 3 to 5 days.",
"as": "reply",
"imageUrl": "https://example.com/delivery-map.png"
}
'{
"conversationId": "cmhx3v0k2000b7aps8q2u4n6e",
"message": {
"id": "cmhx3x2pq000d7apsf4k5l6m7",
"type": "received",
"text": "Hi! Do you ship to Spain?",
"images": [],
"authorId": null,
"deleted": false,
"createdAt": "2024-01-01T00:00:00Z"
}
}Authorizations
Body
application/json
What to send.
reply (default) answers where they wrote, dm answers a Facebook or Instagram comment in a private message, note is kept to the team and never sent.
Was this page helpful?