Skip to main content
This guide is for a developer wiring a server-side integration. You create a conversation for one end user, send a message, read the streamed answer, and fetch the stored transcript. It takes four requests.

Prerequisites

  • A scoped key (nxsk_v1_...) that carries conversations:use. Ask Nexio for one: the portal does not issue scoped keys, and an organization API key from the portal gets 403 legacy_key_person_route on these routes. The examples read the key from the NEXIO_API_KEY environment variable. See Authentication and access.
  • A Conversation instance with at least one published version. Create and publish one in the portal under Conversations, or see Versions and publish. The examples use the slug workspace-assistant.
  • An end_user value for the person your application is serving. The examples use u_dana_ortiz. Send the same value on every request for that person’s conversations.
Call these routes from your server. The API sends no CORS headers, and the key must never reach a browser.
1

Confirm the instance is published

List the instance’s released versions. For an instance you manage yourself, an empty list means turns will return 409 instance_not_published. An instance that follows another instance (a follower) runs the versions released on the instance it follows, so its own list can be empty while turns work.
Response 200:
2

Create a conversation

Create a conversation for the end user. title and scope are optional. scope is a JSON object your application can use to remember what the conversation is about. It never grants access to anything.
Response 201:
3

Send a message and read the stream

Post a turn with message, a turn_id you generate (a UUID), and Accept: application/json. The answer is 202 with the turn and the path of its stream. Then read the stream: a Server-Sent Events response where each frame is an id: line (the frame’s seq), an event: line, a data: line of JSON, and a blank line. Read frames until a turn_end or error frame arrives.
The admission answer, 202:
The stream for this message:
The first frame is conversation. It carries the id of the user message the turn stored. text_delta frames carry the answer in pieces. The turn ends with exactly one turn_end or error frame. The answer text depends on the instance’s system prompt and tools; the frame shapes do not. Every frame type is described on Turns and streaming.The turn runs on the platform, not in your request. If the stream connection drops, open it again with after set to the last seq you read; nothing is lost and nothing repeats.
4

Read the stored conversation

Fetch the conversation with the same end_user. The response holds the most recent 500 messages of the branch the conversation serves, oldest first.
Response 200:
config_version_hash records which released config answered. parent_message_id links messages on their branch; see Branching.

What to build next

Common errors

Last modified on December 1, 2026