Skip to content

API reference

Contacts API

Create and update contacts, their properties and topic subscriptions.

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 contacts

GET/contacts

Parameters

List contacts: parameters
NameInTypeDescription
limitquerynumberItems per page, 1 to 100 (default 20).
afterquerystringReturn items after this id (the last id of the previous page).
searchquerystringNone
segment_idquerystringNone

Responses

List contacts: 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/contacts \
  -H "Authorization: Bearer $ISENT_API_KEY"

Create a contact

POST/contacts

Counts toward the marketing plan's contacts.

Body

A JSON object.

Create a contact: body
NameTypeDescription
emailRequiredstringNone
first_namestringNone
last_namestringNone
unsubscribedbooleanNone
propertiesmap of string | number | boolean | nullNone
topicsobject[]None
topics[].idRequiredstringNone
topics[].subscribedRequiredbooleanNone
segment_idsstring[]None

Responses

Create a contact: 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 contact

GET/contacts/{id}

By id or email address.

Parameters

Retrieve a contact: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Retrieve a contact: 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/contacts/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

Update a contact

PATCH/contacts/{id}

Properties are merged. Set unsubscribed to opt out of all marketing email.

Parameters

Update a contact: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON object.

Update a contact: body
NameTypeDescription
first_namestring | nullNone
last_namestring | nullNone
unsubscribedbooleantrue unsubscribes from every broadcast.
propertiesmap of string | number | boolean | nullNone
topicsobject[]None
topics[].idRequiredstringNone
topics[].subscribedRequiredbooleanNone

Responses

Update a contact: 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 contact

DELETE/contacts/{id}

Parameters

Delete a contact: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

Delete a contact: 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/contacts/{id} \
  -H "Authorization: Bearer $ISENT_API_KEY"

List a contact's topic subscriptions

GET/contacts/{id}/topics

Parameters

List a contact's topic subscriptions: parameters
NameInTypeDescription
idRequiredpathstringNone

Responses

List a contact's topic subscriptions: 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/contacts/{id}/topics \
  -H "Authorization: Bearer $ISENT_API_KEY"

Subscribe or unsubscribe a contact from topics

PATCH/contacts/{id}/topics

Parameters

Subscribe or unsubscribe a contact from topics: parameters
NameInTypeDescription
idRequiredpathstringNone

Body

A JSON array of 1 to any number of objects, each with these fields.

Subscribe or unsubscribe a contact from topics: body
NameTypeDescription
idRequiredstringNone
subscribedRequiredbooleanNone

Responses

Subscribe or unsubscribe a contact from topics: 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).