API reference
Broadcasts API
Create, send, schedule and cancel marketing email.
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 broadcasts
/broadcasts
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). |
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/broadcasts \
-H "Authorization: Bearer $ISENT_API_KEY"Create a broadcast
/broadcasts
A draft. Content can use {{first_name}}, {{last_name}}, {{email}}, contact properties and {{{unsubscribe_url}}}.
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
name | string | 1 to 120 characters. |
segment_id | string | null | Audience segment; null sends to every contact. |
topic_id | string | null | Limit to contacts subscribed to this topic. |
template_id | string | null | None |
from | string | None |
reply_to | string | null | None |
subject | string | At most 998 characters. |
preview_text | string | null | At most 200 characters. |
html | string | null | None |
text | string | null | 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 broadcast
/broadcasts/{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. |
| 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/broadcasts/{id} \
-H "Authorization: Bearer $ISENT_API_KEY"Update a draft broadcast
/broadcasts/{id}
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Body
A JSON object.
| Name | Type | Description |
|---|---|---|
name | string | 1 to 120 characters. |
segment_id | string | null | Audience segment; null sends to every contact. |
topic_id | string | null | Limit to contacts subscribed to this topic. |
template_id | string | null | None |
from | string | None |
reply_to | string | null | None |
subject | string | At most 998 characters. |
preview_text | string | null | At most 200 characters. |
html | string | null | None |
text | string | null | 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 broadcast
/broadcasts/{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/broadcasts/{id} \
-H "Authorization: Bearer $ISENT_API_KEY"Send or schedule a broadcast
/broadcasts/{id}/send
Recipients are queued within a minute and delivered by the send worker.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | string | None |
Body
An optional JSON object.
| Name | Type | Description |
|---|---|---|
scheduled_at | string | ISO 8601, or "in 1 hour". Omit to send now. |
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). |
Cancel a broadcast
/broadcasts/{id}/cancel
Emails already handed off still deliver; the rest are canceled.
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 POST https://isent.dev/api/v1/broadcasts/{id}/cancel \
-H "Authorization: Bearer $ISENT_API_KEY"