Skip to content

API reference

Segments API

Group contacts to send broadcasts to.

Paths are relative to https://isent.dev/api/v1. Every request needs an API key; see API overview for errors, rate limits and pagination.

List segments

GET/segments

Responses

List segments: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X GET https://isent.dev/api/v1/segments \
  -H "Authorization: Bearer $ISENT_API_KEY"

Create a segment

POST/segments

Body

A JSON object.

Create a segment: body
NameTypeDescription
nameRequiredstring1 to 100 characters.
filtermap of anyNone

Responses

Create a segment: responses
StatusMeaning
201Created.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Retrieve a segment

GET/segments/{id}

Parameters

Retrieve a segment: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Retrieve a segment: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X GET https://isent.dev/api/v1/segments/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Update a segment

PATCH/segments/{id}

Parameters

Update a segment: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON object.

Update a segment: body
NameTypeDescription
namestring1 to 100 characters.
filtermap of any | nullNone

Responses

Update a segment: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Delete a segment

DELETE/segments/{id}

Contacts stay; only the segment goes.

Parameters

Delete a segment: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Delete a segment: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X DELETE https://isent.dev/api/v1/segments/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Add contacts to a segment

POST/segments/{id}/contacts

By id or email; unknown contacts are skipped.

Parameters

Add contacts to a segment: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON object.

Add contacts to a segment: body
NameTypeDescription
contact_idsstring[]Up to 1000 items.
emailsstring[]Up to 1000 items.

Responses

Add contacts to a segment: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).

Remove a contact from a segment

DELETE/segments/{id}/contacts/{contactId}

Parameters

Remove a contact from a segment: parameters
NameInTypeDescription
idRequiredpathstringNone
contactIdRequiredpathstringNone

Responses

Remove a contact from a segment: responses
StatusMeaning
200OK.
400The body is not valid JSON.
401Missing, invalid or restricted API key.
403Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted).
404Not found.
409Conflict with the current state, or an idempotency key reused.
422Validation failed.
429Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached).
cURL
curl -X DELETE https://isent.dev/api/v1/segments/{id}/contacts/{contactId} \
  -H "Authorization: Bearer $ISENT_API_KEY"