Conversations
List conversations, send messages, assign agents, and resolve threads.
GET
/v1/conversationsRetrieve a paginated list of conversations. Supports filtering by status and channel.
bash
curl "https://api.oryn.com/v1/conversations?status=open&channel=whatsapp" \
-H "Authorization: Bearer YOUR_API_KEY"Response
json
{
"data": [
{
"id": "conv_abc123",
"contact": {
"id": "ct_def456",
"name": "John Doe",
"phone": "+1234567890"
},
"channel": "whatsapp",
"status": "open",
"assigned_to": "agent_xyz",
"last_message_at": "2026-04-10T14:30:00Z",
"created_at": "2026-04-09T08:00:00Z"
}
],
"meta": {
"page": 1,
"per_page": 25,
"total": 87
}
}GET
/v1/conversations/{id}Retrieve a single conversation with its recent messages.
bash
curl https://api.oryn.com/v1/conversations/conv_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
json
{
"id": "conv_abc123",
"contact": {
"id": "ct_def456",
"name": "John Doe"
},
"channel": "whatsapp",
"status": "open",
"messages": [
{
"id": "msg_001",
"direction": "inbound",
"type": "text",
"content": { "text": "Hi, I need help!" },
"timestamp": "2026-04-10T14:28:00Z"
},
{
"id": "msg_002",
"direction": "outbound",
"type": "text",
"content": { "text": "Hello! How can we assist you?" },
"timestamp": "2026-04-10T14:30:00Z"
}
]
}POST
/v1/conversations/{id}/messagesSend a message in a conversation.
bash
curl -X POST https://api.oryn.com/v1/conversations/conv_abc123/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "text",
"content": {
"text": "Hello from Oryn!"
}
}'Response
json
{
"id": "msg_003",
"conversation_id": "conv_abc123",
"direction": "outbound",
"type": "text",
"content": { "text": "Hello from Oryn!" },
"status": "queued",
"timestamp": "2026-04-10T14:35:00Z"
}PUT
/v1/conversations/{id}/assignAssign a conversation to a specific agent or team.
bash
curl -X PUT https://api.oryn.com/v1/conversations/conv_abc123/assign \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_xyz"
}'PUT
/v1/conversations/{id}/resolveMark a conversation as resolved.
bash
curl -X PUT https://api.oryn.com/v1/conversations/conv_abc123/resolve \
-H "Authorization: Bearer YOUR_API_KEY"Response
json
{
"id": "conv_abc123",
"status": "resolved",
"resolved_at": "2026-04-10T15:00:00Z"
}