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

NameDescription
channel stringtext (chat, including the API), web (website voice), phone, sms
tag stringAI_ANSWERED, AI_FAILED, HUMAN_ANSWERED, VOICE, TEXT, PHONE, LIKED, DISLIKED
status stringall, read, unread, satisfied, dissatisfied, unresolved (has a question the AI couldn't answer)
date_from, date_to date-timeISO 8601; conversations started in this range
limit integer1–200, default 50
offset integerDefault 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

NameDescription
chat_idThe conversation's ID; the same value as session_id in chat.
channelTEXT, VOICE (website voice), PHONE or SMS.
tagsOutcome and channel tags (see the tag filter).
message_countMessages from both sides.
ai_answered_message_count, ai_failed_message_countAI replies that answered / couldn't answer.
latestMessageThe most recent message.
isReadWhether someone on your team has opened it.
hasUnresolvedQuestionThe AI couldn't answer something and nobody has resolved it yet.
ticketSatisfactionThe customer's rating, when given.
clientEmail, clientPhone, firstName, lastName, countryWhat is known about the customer.
noteYour 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

NameDescription
chat_id string requiredThe 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

NameDescription
chat_id string requiredThe conversation ID.

Query parameters

NameDescription
role stringuser (the customer) or bot (the AI)
answer_type stringANSWER, 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

NameDescription
roleuser or bot.
contentThe message text.
answer_typeFor AI replies: ANSWER, NO_ANSWER or ERROR. null for customer messages.
feedbackThe customer's like or dislike on an AI reply, when given.
relevant_resourcesFor AI replies: the training documents the answer drew on, when available.

Errors 404 when the conversation doesn't exist or isn't yours.