NUWAY API
Conversations
Every conversation with your AI workers is here: API chats, website chats, voice calls, phone calls and SMS.
List conversations
GET /api/v1/external/conversations Offset pagination
Newest first.
Query parameters
| Name | Description |
|---|---|
channel string | text (chat, including the API), web (website voice), phone, sms |
tag string | AI_ANSWERED, AI_FAILED, HUMAN_ANSWERED, VOICE, TEXT, PHONE, LIKED, DISLIKED |
status string | all, read, unread, satisfied, dissatisfied, unresolved (has a question the AI couldn't answer) |
date_from, date_to date-time | ISO 8601; conversations started in this range |
limit integer | 1–200, default 50 |
offset integer | Default 0 |
Example request
curl "https://ai.nuway.co/api/v1/external/conversations?channel=text&status=unresolved&limit=20" \
-H "X-API-KEY: $NUWAY_API_KEY"// Node.js 18+. Uses top-level await: save as .mjs (or set "type": "module").
const res = await fetch("https://ai.nuway.co/api/v1/external/conversations?channel=text&status=unresolved&limit=20", {
method: "GET",
headers: {
"X-API-KEY": process.env.NUWAY_API_KEY
}
});
const data = await res.json();import os
import requests
r = requests.get(
"https://ai.nuway.co/api/v1/external/conversations?channel=text&status=unresolved&limit=20",
headers={"X-API-KEY": os.environ["NUWAY_API_KEY"]},
timeout=30,
)
r.raise_for_status()
data = r.json()Response
{
"conversations": [
{
"chat_id": "api_0a8a897f15f547a7839987037932a43b",
"channel": "TEXT",
"tags": ["AI_ANSWERED", "TEXT"],
"created_at": "2026-10-11T08:27:52.793544+00:00",
"updated_at": "2026-10-11T08:27:52.976098+00:00",
"message_count": 2,
"ai_answered_message_count": 1,
"ai_failed_message_count": 0,
"latestMessage": { "id": 36344, "role": "bot", "content": "Yes, we do offer office tours! ...", "created_at": "2026-10-11T08:27:52.957828+00:00" },
"isRead": false,
"hasUnresolvedQuestion": false,
"ticketSatisfaction": null,
"clientEmail": "[email protected]",
"clientPhone": null,
"firstName": "Jane",
"lastName": "Doe",
"country": null,
"note": null
}
],
"count": 1,
"total": 4780,
"limit": 20,
"offset": 0,
"has_more": true
}Response fields
| Name | Description |
|---|---|
chat_id | The conversation's ID; the same value as session_id in chat. |
channel | TEXT, VOICE (website voice), PHONE or SMS. |
tags | Outcome and channel tags (see the tag filter). |
message_count | Messages from both sides. |
ai_answered_message_count, ai_failed_message_count | AI replies that answered / couldn't answer. |
latestMessage | The most recent message. |
isRead | Whether someone on your team has opened it. |
hasUnresolvedQuestion | The AI couldn't answer something and nobody has resolved it yet. |
ticketSatisfaction | The customer's rating, when given. |
clientEmail, clientPhone, firstName, lastName, country | What is known about the customer. |
note | Your team's note on the conversation. |
Get a conversation
GET /api/v1/external/conversations/{chat_id}
One conversation with all its messages. Same fields as the list, plus messages.
Path parameters
| Name | Description |
|---|---|
chat_id string required | The conversation ID (the chat session_id). |
Example request
curl "https://ai.nuway.co/api/v1/external/conversations/{chat_id}" \
-H "X-API-KEY: $NUWAY_API_KEY"// Node.js 18+. Uses top-level await: save as .mjs (or set "type": "module").
const res = await fetch("https://ai.nuway.co/api/v1/external/conversations/{chat_id}", {
method: "GET",
headers: {
"X-API-KEY": process.env.NUWAY_API_KEY
}
});
const data = await res.json();import os
import requests
r = requests.get(
"https://ai.nuway.co/api/v1/external/conversations/{chat_id}",
headers={"X-API-KEY": os.environ["NUWAY_API_KEY"]},
timeout=30,
)
r.raise_for_status()
data = r.json()Errors 404 when the conversation doesn't exist or isn't yours.
Get messages
GET /api/v1/external/conversations/{chat_id}/messages
The messages of one conversation.
Path parameters
| Name | Description |
|---|---|
chat_id string required | The conversation ID. |
Query parameters
| Name | Description |
|---|---|
role string | user (the customer) or bot (the AI) |
answer_type string | ANSWER, NO_ANSWER or ERROR (AI replies only) |
Example request
curl "https://ai.nuway.co/api/v1/external/conversations/{chat_id}/messages" \
-H "X-API-KEY: $NUWAY_API_KEY"// Node.js 18+. Uses top-level await: save as .mjs (or set "type": "module").
const res = await fetch("https://ai.nuway.co/api/v1/external/conversations/{chat_id}/messages", {
method: "GET",
headers: {
"X-API-KEY": process.env.NUWAY_API_KEY
}
});
const data = await res.json();import os
import requests
r = requests.get(
"https://ai.nuway.co/api/v1/external/conversations/{chat_id}/messages",
headers={"X-API-KEY": os.environ["NUWAY_API_KEY"]},
timeout=30,
)
r.raise_for_status()
data = r.json()Response
{
"messages": [
{ "id": 36343, "role": "user", "content": "Do you offer office tours?", "answer_type": null, "feedback": null, "created_at": "2026-10-11T08:27:52.879136+00:00" },
{ "id": 36344, "role": "bot", "content": "Yes, we do offer office tours! ...", "answer_type": "ANSWER", "feedback": null, "created_at": "2026-10-11T08:27:52.957828+00:00" }
],
"count": 2
}Response fields
| Name | Description |
|---|---|
role | user or bot. |
content | The message text. |
answer_type | For AI replies: ANSWER, NO_ANSWER or ERROR. null for customer messages. |
feedback | The customer's like or dislike on an AI reply, when given. |
relevant_resources | For AI replies: the training documents the answer drew on, when available. |
Errors 404 when the conversation doesn't exist or isn't yours.