segments
Create a segment
Creates a new segment in the active project. Segment names are unique per project and case-insensitive.
post/api/v1/segments
Request
- Base URL: https://pineprompt.com
- URL: https://pineprompt.com/api/v1/segments
- Auth: HTTP bearer
Headers
Pineprompt-Project-Idinteger required
The active project's numeric ID.
Request body
Example request
{
"name": "Enterprise Competitors"
}Response
Created
Example response
{
"id": 7,
"project_id": 42,
"name": "Direct Competitors",
"project": {
"id": 42,
"organization_id": 7,
"name": "Acme Marketing",
"brand_id": 555,
"organization": {
"id": 7,
"name": "Acme Inc.",
"created_at": "2026-05-15T09:11:42+00:00",
"updated_at": "2026-05-15T09:11:42+00:00"
},
"created_at": "2026-05-15T09:11:42+00:00",
"updated_at": "2026-05-15T09:11:42+00:00"
},
"created_at": "2026-05-18T09:11:42+00:00",
"updated_at": "2026-05-18T09:11:42+00:00"
}Changes
No recorded changes to this operation across all 1 revision of this API.