Before invoking a Published Space chat endpoint, a team administrator must publish the Space in Team Settings > Published Spaces. Learn more in Published Spaces.
Endpoint
POST /v1/endpoints/{endpointId}/chat
Request Headers
Request Body (application/json)
Response Modes
1. Standard JSON Response (streaming: false)
When streaming is false (or omitted), the endpoint processes the entire conversation and returns a single JSON object.
Example Request
JSON Response (200 OK)
2. SSE Streaming Response (streaming: true)
When streaming is set to true, the server streams the response as real-time Server-Sent Events (SSE) using Content-Type: text/event-stream.
SSE Event Types
The event stream emits typed SSE events as response generation progresses:Example Streaming Request
SSE Stream Output Example
Code Examples
- JavaScript / Node.js
- Python
Next Steps
- Explore document operations with the Documents API
- Review Published Spaces documentation to manage endpoint access