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
/contacts
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | number | Items per page, 1 to 100 (default 20). |
after | query | string | Return items after this id (the last id of the previous page). |
search | query | string | None |
segment_id | query | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X GET https://isent.dev/api/v1/contacts \
-H "Authorization: Bearer $ISENT_API_KEY"Create a contact
/contacts
Counts toward the marketing plan's contacts.
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
email | string | None |
first_name | string | None |
last_name | string | None |
unsubscribed | boolean | None |
properties | map of string | number | boolean | null | None |
topics | object[] | None |
topics[].id | string | None |
topics[].subscribed | boolean | None |
segment_ids | string[] | None |
Responses
| Status | Meaning |
|---|---|
| 201 | Created. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
Retrieve a contact
/contacts/{id}
By id or email address.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X GET https://isent.dev/api/v1/contacts/{id} \
-H "Authorization: Bearer $ISENT_API_KEY"Update a contact
/contacts/{id}
Properties are merged. Set unsubscribed to opt out of all marketing email.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
first_name | string | null | None |
last_name | string | null | None |
unsubscribed | boolean | true unsubscribes from every broadcast. |
properties | map of string | number | boolean | null | None |
topics | object[] | None |
topics[].id | string | None |
topics[].subscribed | boolean | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
Delete a contact
/contacts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X DELETE https://isent.dev/api/v1/contacts/{id} \
-H "Authorization: Bearer $ISENT_API_KEY"List a contact's topic subscriptions
/contacts/{id}/topics
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |
curl -X GET https://isent.dev/api/v1/contacts/{id}/topics \
-H "Authorization: Bearer $ISENT_API_KEY"Subscribe or unsubscribe a contact from topics
/contacts/{id}/topics
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Body
A JSON array of 1 to any number of objects, each with these fields.
| Name | Type | Description |
|---|---|---|
id | string | None |
subscribed | boolean | None |
Responses
| Status | Meaning |
|---|---|
| 200 | OK. |
| 400 | The body is not valid JSON. |
| 401 | Missing, invalid or restricted API key. |
| 403 | Not allowed: role, key scope, unverified domain, plan limit (plan_limit_reached) or a new team's members-only sending (sending_restricted). |
| 404 | Not found. |
| 409 | Conflict with the current state, or an idempotency key reused. |
| 422 | Validation failed. |
| 429 | Rate limit (rate_limit_exceeded), monthly quota (monthly_quota_exceeded) or a new team's daily limit (daily_limit_reached). |