Skip to main content
Published Spaces allow organization administrators to expose configured as standalone API endpoints. External applications, custom internal tools, or automated workflows can send chat messages to a published Space and receive AI assistant responses powered by the Space’s instructions, models, and Uploaded Files.
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

Next Steps