Segments API
These are the Segments endpoints of the Keila API.
For Keila Cloud, the base URL is https://app.keila.io.
All endpoints, unless stated differently, require Bearer authentication.
A segment is a named, reusable filter over your contacts. It selects a subset of contacts based on their attributes and data, allowing you to target a part of your contact list when sending a campaign.
/api/v1/segments Index segments
Retrieve all segments from your project.
Responses
200 Segment response
- dataobject[]
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - idstring
Contact ID
Example:
"c_12345" - inserted_atstring
Example:
"2026-06-24T16:59:41.890418Z" - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts" - updated_atstring
Example:
"2026-06-24T16:59:41.890432Z"
- metaobject
/api/v1/segments Create Segment
Request body
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts"
Responses
200 Segment response
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - idstring
Contact ID
Example:
"c_12345" - inserted_atstring
Example:
"2026-06-24T16:59:41.890418Z" - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts" - updated_atstring
Example:
"2026-06-24T16:59:41.890432Z"
/api/v1/segments/{id} Show Segment
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Segment ID |
Responses
200 Segment response
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - idstring
Contact ID
Example:
"c_12345" - inserted_atstring
Example:
"2026-06-24T16:59:41.890418Z" - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts" - updated_atstring
Example:
"2026-06-24T16:59:41.890432Z"
/api/v1/segments/{id} Update Segment
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Segment ID |
Request body
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts"
Responses
200 Segment response
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - idstring
Contact ID
Example:
"c_12345" - inserted_atstring
Example:
"2026-06-24T16:59:41.890418Z" - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts" - updated_atstring
Example:
"2026-06-24T16:59:41.890432Z"
/api/v1/segments/{id} Update Segment
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Segment ID |
Request body
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts"
Responses
200 Segment response
- dataobject
- filterobject
Filter JSON
Example:
{"email":{"$like":"%keila.io"}} - idstring
Contact ID
Example:
"c_12345" - inserted_atstring
Example:
"2026-06-24T16:59:41.890418Z" - namestring
Segment name
Example:
"Rocket scientists and book enthusiasts" - updated_atstring
Example:
"2026-06-24T16:59:41.890432Z"
/api/v1/segments/{id} Delete Segment
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| id | path | string | yes | Segment ID |
Responses
204 Segment was deleted successfully or didn’t exist.