List

Preview
GET
https://api.senditly.ai/v1/segments
List segments
This API is in preview. It may be changed in the future.
Headers
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Query
limit
integer
optional
A limit on the number of items to return. Defaults to 10. The value must be between 1 and 100.
startingAfter
string
optional
A cursor to start the list from. Defaults to the first item.
endingBefore
string
optional
A cursor to end the list at. Defaults to the last item.
label
string
optional
Label selector expression.
Response
items
array
required
hasMore
boolean
required
Whether there are more items to fetch.
cursor
string
optional
A cursor to start the next list from.

Count

Preview
GET
https://api.senditly.ai/v1/segments/count
Count segments
This API is in preview. It may be changed in the future.
Headers
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Query
after
string
optional
A cursor to start the count from.
before
string
optional
A cursor to end the count at.
label
string
optional
Label selector expression.
Response
count
integer
required
The total number of items.

Create

Preview
POST
https://api.senditly.ai/v1/segments
Create a segment
This API is in preview. It may be changed in the future.
Headers
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Request
name
string
optional
The name of the segment.
labels
record
optional
The labels of the segment.
Response
id
string
required
The id of the segment.
name
string
required
The name of the segment.
labels
record
required
The labels of the segment.
ownerId
string
required
The account id for the owner of the segment.
createdAt
string
required
A date string in ISO 8601 format The date and time the segment was created.
updatedAt
string
required
A date string in ISO 8601 format The date and time the segment was last updated.

Retrieve

Preview
GET
https://api.senditly.ai/v1/segments/:id
Retrieve a segment
This API is in preview. It may be changed in the future.
Headers
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Parameters
id
string
required
The id of the segment.
Response
id
string
required
The id of the segment.
name
string
required
The name of the segment.
labels
record
required
The labels of the segment.
ownerId
string
required
The account id for the owner of the segment.
createdAt
string
required
A date string in ISO 8601 format The date and time the segment was created.
updatedAt
string
required
A date string in ISO 8601 format The date and time the segment was last updated.

Update

Preview
PUT
https://api.senditly.ai/v1/segments/:id
Update a segment
This API is in preview. It may be changed in the future.
Headers
Authorization
string
required
Bearer authentication of the form "Bearer <API_KEY>", where API_KEY is your api key.
Parameters
id
string
required
The id of the segment.
Request
name
string
optional
The name of the segment.
labels
record
optional
The labels of the segment.
Response
id
string
required
The id of the segment.
name
string
required
The name of the segment.
labels
record
required
The labels of the segment.
ownerId
string
required
The account id for the owner of the segment.
createdAt
string
required
A date string in ISO 8601 format The date and time the segment was created.
updatedAt
string
required
A date string in ISO 8601 format The date and time the segment was last updated.