The Sendsational API is REST with JSON at https://api.sendsational.app/v1. With one API key a shop, a site or a script can create contacts, record their consent, track what they did, and receive signed webhooks when someone unsubscribes, bounces or complains.
Field names are snake_case, times are ISO 8601 in UTC, and money is a decimal number in the currency's main unit (12.5, not 1250). A request body with a field the API does not know is refused with 422, so a typo is never silently ignored. Machine-readable description: OpenAPI 3.1 file. For assistants and agents: llms.txt.
Version 1.0.0. Last updated .
Start in three requests
# 1. Check the key
curl https://api.sendsational.app/v1/me -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
# 2. Create a subscribed contact
curl -X POST https://api.sendsational.app/v1/contacts \
-H "Authorization: Bearer $SENDSATIONAL_API_KEY" -H "Content-Type: application/json" \
-d '{"email":"maya@juniperco.example","consent":{"email":{"status":"subscribed","source":"signup_form"}}}'
# 3. Record an order
curl -X POST https://api.sendsational.app/v1/events \
-H "Authorization: Bearer $SENDSATIONAL_API_KEY" -H "Content-Type: application/json" \
-d '{"name":"order_placed","contact":{"email":"maya@juniperco.example"},"properties":{"order_id":"1001","total":84.5,"currency":"USD"}}'
Authentication
Every request carries an API key: Authorization: Bearer ss_live_…. Create keys in the app under Settings, API keys. A key belongs to one workspace and is shown once, when it is created; we store only a SHA-256 hash of it. Give each system its own key, so one can be revoked without breaking the others.
A key carries scopes. A request outside its scopes is answered with 403 and the code missing_scope.
Scopes an API key can carry
Scope
Lets the key
contacts:read
Read contacts
contacts:write
Add and change contacts
events:write
Send events
orders:read
Read orders
orders:write
Add and change orders
products:read
Read products
products:write
Add and change products
webhooks:read
Read webhook endpoints
webhooks:write
Manage webhook endpoints
Errors
Every error has the same shape. Decide what to do from type, match on code, and show message to a person. When a request is refused for its content, details lists each problem with the path of the field.
{
"error": {
"type": "invalid_request",
"code": "validation_failed",
"message": "The request was refused. See details for each problem.",
"details": [{ "field": "consent.email.status", "code": "invalid", "message": "Invalid option" }],
"request_id": "req_5b1f0c9e2a7d4e6f8a1b2c3d4e5f6a7b"
}
}
One entry per problem, when the request was refused for its content.
error.details[].fieldrequired
text
Dotted path to the field, for example consent.email.status.
error.details[].coderequired
text
error.details[].messagerequired
text
error.request_idrequired
text
Quote this when asking for help. Also in the X-Request-Id header.
400 the body is not JSON. 401 the key is missing, wrong or revoked. 403 the key lacks a scope.
404 no such object or path. 409 a conflict, such as an email address another contact has. 422 a field was refused.
429 too many requests; wait for Retry-After seconds. 500 our fault; the request can be retried.
Text that cannot be stored (a NUL character, or half of a character pair) is refused with 422 and the code invalid_characters. In a bulk request only that entry is refused.
Idempotency keys
Send an Idempotency-Key header with any unique text of up to 255 characters, such as a UUID, on a POST or PATCH. The first answer is stored for 24 hours. A repeat of the same request with the same key returns that answer with Idempotent-Replayed: true, and the work is not done twice. Keys are kept apart per workspace.
The same key with a different request is refused with 422 and the code idempotency_key_reused.
A repeat that arrives while the first request is still running gets 409. If the first request died, a repeat takes over after 60 seconds.
A refused request (a 4xx answer) is replayed too. An answer of 500 is not stored, so a retry runs the work again.
A secret that is shown once is never stored: a replayed POST /webhook_endpoints returns the endpoint with secret: null.
PUT and DELETE are safe to repeat as they are, and take no key.
Rate limits
Each key may make 600 requests a minute unless its limit was changed. A bulk request of up to 500 contacts or events counts as one request. Every answer says where the key stands: RateLimit-Limit, RateLimit-Remaining, and RateLimit-Reset in seconds. Past the limit the answer is 429 with Retry-After.
A request body may be up to 2 MB.
Account
Check that a key works.
Check a key
GET/me
Returns the workspace the key belongs to and what the key may do. A cheap way to check a key works.
401 The API key is missing, not valid, or revoked.
429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Check a key
Field
Type
What it is
workspacerequired
object
workspace.idrequired
text
workspace.namerequired
text
api_keyrequired
object
api_key.idrequired
id
api_key.namerequired
text
api_key.scopesrequired
list of "contacts:read" | "contacts:write" | "events:write" | "orders:read" | "orders:write" | "products:read" | "products:write" | "webhooks:read" | "webhooks:write"
api_key.rate_limit_per_minuterequired
whole number
Contacts
People, their custom fields, tags and consent.
A contact is a person, identified by email address within a workspace. Consent is recorded per channel with its source and the time of the choice. Changes are applied by rules: the same status again changes nothing; an older change never overrides a newer one; an import never resubscribes someone who unsubscribed. The contact in every answer shows what the consent is now.
Suppression is separate from consent. An address that hard-bounced or complained has suppression set and is not emailed, even if its consent says subscribed.
Create or update a contact
POST/contacts
Finds the contact by email address and updates it, or creates it. Fields you leave out keep their stored value. Answers 201 when the contact was created and 200 when it was updated.
Identifies the contact. Compared without regard to case.
external_id
text or null
Your own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
first_name
text or null
First name. Send null to clear it.
last_name
text or null
Last name. Send null to clear it.
phone
text or null
Phone number, stored as sent. It carries no consent. Send null to clear it.
properties
object
Custom fields, merged into the ones already stored. Values are text, numbers or true/false. A field keeps the type of the first value it was given. Send null to remove a field.
add_tags
list of text
Tags to add. Tags are case-sensitive.
remove_tags
list of text
Tags to remove. Removing a tag the contact does not have is fine.
consent
object
Consent changes, per channel.
consent.email
object
A consent change. It is applied by the consent rules, so the contact in the response shows what the consent is now.
consent.email.statusrequired
"subscribed" | "unsubscribed"
consent.email.source
text
Where the choice was made, in your own words: "signup_form", "checkout", "preference_page". Defaults to "api".
consent.email.occurred_at
time
When the person made the choice. Defaults to now. An older change never overrides a newer one.
Answers
200 The contact was updated.
201 The contact was created.
400 The body is not valid JSON.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
409 The first request with this Idempotency-Key is still running.
422 A field was refused.
429 Too many requests for this key in the current minute.
Set when the address must not be emailed whatever the consent says: it bounced, complained, or was blocked by hand.
suppression.reasonrequired
"bounced" | "complained" | "manual"
suppression.created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
Create or update many contacts
POST/contacts/bulk
Up to 500 contacts in one request, each handled like a single create or update. A contact that is refused does not stop the others: check results for each one. The whole request counts once against the rate limit.
1 to 500 contacts. Two entries with the same address are merged.
contacts[].emailrequired
email
Identifies the contact. Compared without regard to case.
contacts[].external_id
text or null
Your own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
contacts[].first_name
text or null
First name. Send null to clear it.
contacts[].last_name
text or null
Last name. Send null to clear it.
contacts[].phone
text or null
Phone number, stored as sent. It carries no consent. Send null to clear it.
contacts[].properties
object
Custom fields, merged into the ones already stored. Values are text, numbers or true/false. A field keeps the type of the first value it was given. Send null to remove a field.
contacts[].add_tags
list of text
Tags to add. Tags are case-sensitive.
contacts[].remove_tags
list of text
Tags to remove. Removing a tag the contact does not have is fine.
contacts[].consent
object
Consent changes, per channel.
contacts[].consent.email
object
A consent change. It is applied by the consent rules, so the contact in the response shows what the consent is now.
Answers
200 One result per contact, in the order sent.
400 The body is not valid JSON.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
409 The first request with this Idempotency-Key is still running.
422 The request itself was refused, for example more than 500 contacts.
429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Create or update many contacts
Field
Type
What it is
resultsrequired
list of object
One entry per contact sent, in the same order.
results[].statusrequired
"created" | "updated" | "error"
results[].id
id
results[].email
text
results[].error
object
results[].error.coderequired
text
results[].error.messagerequired
text
results[].error.details
list of object
summaryrequired
object
summary.createdrequired
whole number
summary.updatedrequired
whole number
summary.errorsrequired
whole number
List contacts
GET/contacts
Newest first, a page at a time. To look one contact up by address, pass email.
A new address for this contact. Consent, tags and fields stay with the contact.
external_id
text or null
Your own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
first_name
text or null
First name. Send null to clear it.
last_name
text or null
Last name. Send null to clear it.
phone
text or null
Phone number, stored as sent. It carries no consent. Send null to clear it.
properties
object
Custom fields, merged into the ones already stored. Values are text, numbers or true/false. A field keeps the type of the first value it was given. Send null to remove a field.
add_tags
list of text
Tags to add. Tags are case-sensitive.
remove_tags
list of text
Tags to remove. Removing a tag the contact does not have is fine.
consent
object
Consent changes, per channel.
consent.email
object
A consent change. It is applied by the consent rules, so the contact in the response shows what the consent is now.
consent.email.statusrequired
"subscribed" | "unsubscribed"
consent.email.source
text
Where the choice was made, in your own words: "signup_form", "checkout", "preference_page". Defaults to "api".
consent.email.occurred_at
time
When the person made the choice. Defaults to now. An older change never overrides a newer one.
Answers
200 The contact after the change.
400 The body is not valid JSON.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
404 No contact has this id.
409 Another contact already has the new email address.
422 A field was refused.
429 Too many requests for this key in the current minute.
Set when the address must not be emailed whatever the consent says: it bounced, complained, or was blocked by hand.
suppression.reasonrequired
"bounced" | "complained" | "manual"
suppression.created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
Delete a contact
DELETE/contacts/{id}
Removes the contact with its consent history and events. Orders are kept without the contact. If the address had bounced or complained it stays on the suppression list, so it is not emailed if it is added again.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
404 No contact has this id.
429 Too many requests for this key in the current minute.
Events
What contacts did: the standard store events and your own.
Track an event
POST/events
Records something a contact did. The five standard store events are checked for their required properties; any other name is a custom event and is stored as sent. Answers 201 for a new event and 200 when the same event was already stored.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
404 No product has this id.
429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Get a product
Field
Type
What it is
idrequired
text
Your id for the product.
titlerequired
text
urlrequired
text or null
image_urlrequired
text or null
pricerequired
number or null
currencyrequired
text or null
categoriesrequired
list of text
availablerequired
true or false
propertiesrequired
object
created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
Create or replace an order
PUT/orders/{id}
Stores an order under your own id without recording an event. Use it to load past orders or to correct one. For a new order, send an order_placed event instead: it stores the order and can start flows.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
404 No order has this id.
429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Get an order
Field
Type
What it is
idrequired
text
Your id for the order.
contact_idrequired
id or null
emailrequired
text or null
statusrequired
"placed" | "fulfilled" | "canceled" | "refunded"
totalrequired
number
currencyrequired
text
itemsrequired
list of object
propertiesrequired
object
placed_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
Webhook endpoints
Where we tell your systems about changes.
Add a webhook endpoint
POST/webhook_endpoints
We will POST the chosen events to this address, signed. The signing secret is in this response and is never shown again: it is not stored in readable form, so a replay of this request with the same Idempotency-Key returns the endpoint with secret set to null. If you lost the secret, remove the endpoint and add it again.
list of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
The event types to send.
description
text or null
Answers
201 The endpoint, with its signing secret.
400 The body is not valid JSON.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
409 The first request with this Idempotency-Key is still running.
422 The address or an event type was refused.
429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Add a webhook endpoint
Field
Type
What it is
idrequired
id
urlrequired
text
eventsrequired
list of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
descriptionrequired
text or null
statusrequired
"enabled" | "disabled"
disabled_reasonrequired
text or null
last_success_atrequired
time or null
last_failure_atrequired
time or null
created_atrequired
time
ISO 8601, for example 2026-11-24T15:04:05Z.
secretrequired
text or null
The signing secret. Shown only in the first answer: store it now. Null when this answer is a replay for a repeated Idempotency-Key, because the secret can no longer be shown.
204 Removed. Deliveries still waiting for it are dropped.
401 The API key is missing, not valid, or revoked.
403 The API key does not have the scope this request needs.
404 No endpoint has this id.
429 Too many requests for this key in the current minute.
Standard store events
Five event names are the standard store vocabulary. Flows, segments and revenue reports are built on them, so any platform that sends them gets the same features. Their properties are checked; anything extra is kept as sent. Any other lower-case name is a custom event with free properties.
product_viewed
Properties of product_viewed
Field
Type
What it is
product_idrequired
text
Your id for the product.
title
text
url
url
image_url
url
price
number
currency
text
categories
list of text
added_to_cart
Properties of added_to_cart
Field
Type
What it is
product_idrequired
text
Your id for the product.
quantity
whole number
Defaults to 1.
title
text
price
number
currency
text
cart_url
url
Where the person can pick the cart up again.
checkout_started
Properties of checkout_started
Field
Type
What it is
checkout_idrequired
text
Your id for the checkout.
totalrequired
number
currencyrequired
text
items
list of object
items[].product_idrequired
text
Your id for the product.
items[].title
text
items[].quantity
whole number
Defaults to 1.
items[].price
number
Price of one unit.
checkout_url
url
Where the person can finish the checkout.
order_placed
Properties of order_placed
Field
Type
What it is
order_idrequired
text
Your id for the order. The order is stored under it.
totalrequired
number
currencyrequired
text
items
list of object
items[].product_idrequired
text
Your id for the product.
items[].title
text
items[].quantity
whole number
Defaults to 1.
items[].price
number
Price of one unit.
order_fulfilled
Properties of order_fulfilled
Field
Type
What it is
order_idrequired
text
Your id for the order.
tracking_url
url
carrier
text
Receiving webhooks
Add an endpoint in the app under Settings, Webhooks, or with POST /webhook_endpoints. We POST each chosen event to it as JSON. Answer with any 2xx status within 10 seconds. Anything else is retried after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h, 24 h: eight attempts over about two days. An endpoint that fails every attempt for a day is switched off until you switch it back on, and events that happen while it is off are not kept for it. A short outage never switches an endpoint off.
Webhook event types
Type
Sent when
contact.subscribed
A contact's email consent became subscribed.
contact.unsubscribed
A contact's email consent became unsubscribed, including after a spam complaint.
contact.consent_changed
Any consent change. Sent alongside the two above, so subscribe to this one or to those, not both.
email.bounced
An email could not be delivered. A hard bounce suppresses the address.
email.complained
The recipient marked an email as spam. The address is suppressed and unsubscribed.
The request
Fields of a webhook body
Field
Type
What it is
idrequired
text
The event's id, also in the webhook-id header. The same on every retry: use it to ignore repeats.
Requests are signed the Standard Webhooks way, so its libraries work unchanged. The signed text is webhook-id, a dot, webhook-timestamp, a dot, and the raw body. The key is your endpoint's secret after whsec_, base64-decoded. The signature is HMAC-SHA256, base64-encoded, after v1,. Refuse a timestamp more than five minutes old.
import { createHmac, timingSafeEqual } from "node:crypto";
// rawBody must be the exact bytes we sent, before any JSON parsing.
export function isFromSendsational(rawBody, headers, secret) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
const key = Buffer.from(secret.replace("whsec_", ""), "base64");
const expected = createHmac("sha256", key).update(`${id}.${timestamp}.${rawBody}`).digest();
return headers["webhook-signature"].split(" ").some((part) => {
const given = Buffer.from(part.split(",")[1] ?? "", "base64");
return given.length === expected.length && timingSafeEqual(given, expected);
});
}
webhook-id is the same on every retry of an event. Store it and ignore repeats.
data.consent.source says where a change came from. Use it to ignore changes your own system sent.
CSV imports in the app do not send webhooks.
Questions
How do I authenticate with the Sendsational API?
Send an API key in the Authorization header as a Bearer token. Create the key in the app under Settings, API keys. A key belongs to one workspace, carries scopes that limit what it may do, and is shown once when it is created.
What are the rate limits?
Each API key may make 600 requests a minute by default. A bulk request of up to 500 contacts or events counts as one request. Every response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset headers, and a 429 response carries Retry-After in seconds.
How do I make a retried request safe?
Send an Idempotency-Key header with any unique text, such as a UUID, on a POST or PATCH request. The first answer is stored for 24 hours. A repeat of the same request with the same key returns that answer with the header Idempotent-Replayed: true, and the work is not done twice.
How do I verify a Sendsational webhook?
Compute the HMAC-SHA256 of the text webhook-id, a dot, webhook-timestamp, a dot, and the raw request body, using the bytes of your endpoint's secret after the whsec_ prefix, base64-decoded. Compare the base64 result with the value after v1, in the webhook-signature header, and refuse timestamps older than five minutes. This is the Standard Webhooks scheme, so its libraries work unchanged.
Can an API call resubscribe someone who unsubscribed?
Yes, when the subscribe is newer than the unsubscribe. Every consent change carries occurred_at, and an older change never overrides a newer one. A CSV import can never resubscribe someone who unsubscribed. A hard bounce or a spam complaint suppresses the address, which blocks sending whatever the consent says.
Which events does Sendsational understand?
Five standard store events are checked for required properties: product_viewed, added_to_cart, checkout_started, order_placed and order_fulfilled. Any other lower-case name is a custom event and is stored as sent. An order_placed event also stores the order.