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 generatedid 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 thedata-segment attribute:
segment query parameter: