Skip to main content
Segments let you configure different personalities and behaviors for the same tenant. Every tenant has a default segment. The system prompt lives on the segment, not the tenant.

GET /tenants//segments

List all segments. Required scope: segments:read

Request

Response

The systemPrompt field is excluded from the list response. Use GET /tenants/{slug}/segments/{id} to read it.

GET /tenants//segments/

Get a single segment with its full system prompt. Required scope: segments:read

Request

Response

POST /tenants//segments

Create a new segment. Required scope: segments:write

Request

Response

Returns the created segment object with generated id and slug.

PUT /tenants//segments/

Update an existing segment. Send only the fields you want to change. Required scope: segments:write

Request

DELETE /tenants//segments/

Delete a segment. The default segment cannot be deleted. Required scope: segments:write

Segment fields

Targeting a segment from the widget

Use the data-segment attribute:
Or via the Chat API with the segment query parameter: