Sendsational API
OpenAPI fileSign in

Sendsational API reference

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
ScopeLets the key
contacts:readRead contacts
contacts:writeAdd and change contacts
events:writeSend events
orders:readRead orders
orders:writeAdd and change orders
products:readRead products
products:writeAdd and change products
webhooks:readRead webhook endpoints
webhooks:writeManage 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"
  }
}
Fields of an error
FieldTypeWhat it is
errorrequiredobject
error.typerequired"invalid_request" | "authentication_error" | "permission_error" | "not_found" | "conflict" | "rate_limited" | "internal_error"The family of error. Decide what to do from this.
error.coderequiredtextThe exact error, stable and safe to match on.
error.messagerequiredtextFor a person to read. The wording may change.
error.detailslist of objectOne entry per problem, when the request was refused for its content.
error.details[].fieldrequiredtextDotted path to the field, for example consent.email.status.
error.details[].coderequiredtext
error.details[].messagerequiredtext
error.request_idrequiredtextQuote 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.

Works with any valid key.

curl https://api.sendsational.app/v1/me \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"

Answers

  • 200 The workspace and the key.
  • 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
FieldTypeWhat it is
workspacerequiredobject
workspace.idrequiredtext
workspace.namerequiredtext
api_keyrequiredobject
api_key.idrequiredid
api_key.namerequiredtext
api_key.scopesrequiredlist of "contacts:read" | "contacts:write" | "events:write" | "orders:read" | "orders:write" | "products:read" | "products:write" | "webhooks:read" | "webhooks:write"
api_key.rate_limit_per_minuterequiredwhole 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.

Needs the contacts:write scope. Accepts an Idempotency-Key.

curl -X POST https://api.sendsational.app/v1/contacts \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "email": "maya@juniperco.example",
  "first_name": "Maya",
  "properties": {
    "favourite_collection": "Linen"
  },
  "add_tags": [
    "vip"
  ],
  "consent": {
    "email": {
      "status": "subscribed",
      "source": "signup_form"
    }
  }
}'

Request body

Request body of Create or update a contact
FieldTypeWhat it is
emailrequiredemailIdentifies the contact. Compared without regard to case.
external_idtext or nullYour own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
first_nametext or nullFirst name. Send null to clear it.
last_nametext or nullLast name. Send null to clear it.
phonetext or nullPhone number, stored as sent. It carries no consent. Send null to clear it.
propertiesobjectCustom 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_tagslist of textTags to add. Tags are case-sensitive.
remove_tagslist of textTags to remove. Removing a tag the contact does not have is fine.
consentobjectConsent changes, per channel.
consent.emailobjectA 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.sourcetextWhere the choice was made, in your own words: "signup_form", "checkout", "preference_page". Defaults to "api".
consent.email.occurred_attimeWhen 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.
Fields in the answer
Fields returned by Create or update a contact
FieldTypeWhat it is
idrequiredid
emailrequiredemailAlways lower-case.
external_idrequiredtext or nullYour own id for this person, if you gave one.
first_namerequiredtext or null
last_namerequiredtext or null
phonerequiredtext or null
propertiesrequiredobjectCustom fields.
tagsrequiredlist of textSorted alphabetically, without regard to case.
consentrequiredobject
consent.emailrequiredobject
consent.email.statusrequired"subscribed" | "unsubscribed" | "never_subscribed"
consent.email.sourcerequiredtext or null
consent.email.changed_atrequiredtime or nullWhen the person made the choice.
suppressionrequiredobject or nullSet 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_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 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.

Needs the contacts:write scope. Accepts an Idempotency-Key.

curl -X POST https://api.sendsational.app/v1/contacts/bulk \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

Request body

Request body of Create or update many contacts
FieldTypeWhat it is
contactsrequiredlist of object1 to 500 contacts. Two entries with the same address are merged.
contacts[].emailrequiredemailIdentifies the contact. Compared without regard to case.
contacts[].external_idtext or nullYour own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
contacts[].first_nametext or nullFirst name. Send null to clear it.
contacts[].last_nametext or nullLast name. Send null to clear it.
contacts[].phonetext or nullPhone number, stored as sent. It carries no consent. Send null to clear it.
contacts[].propertiesobjectCustom 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_tagslist of textTags to add. Tags are case-sensitive.
contacts[].remove_tagslist of textTags to remove. Removing a tag the contact does not have is fine.
contacts[].consentobjectConsent changes, per channel.
contacts[].consent.emailobjectA 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
FieldTypeWhat it is
resultsrequiredlist of objectOne entry per contact sent, in the same order.
results[].statusrequired"created" | "updated" | "error"
results[].idid
results[].emailtext
results[].errorobject
results[].error.coderequiredtext
results[].error.messagerequiredtext
results[].error.detailslist of object
summaryrequiredobject
summary.createdrequiredwhole number
summary.updatedrequiredwhole number
summary.errorsrequiredwhole number

List contacts

GET/contacts

Newest first, a page at a time. To look one contact up by address, pass email.

Needs the contacts:read scope.

curl https://api.sendsational.app/v1/contacts \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"

Query parameters

Query parameters of List contacts
FieldTypeWhat it is
emailtextOnly the contact with this address.
external_idtextOnly the contact with this external id.
tagtextOnly contacts with this tag.
limitwhole numberHow many to return, 1 to 200.
cursortextThe next_cursor from the previous page.

Answers

  • 200 A page of contacts.
  • 401 The API key is missing, not valid, or revoked.
  • 403 The API key does not have the scope this request needs.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by List contacts
FieldTypeWhat it is
datarequiredlist of object
data[].idrequiredid
data[].emailrequiredemailAlways lower-case.
data[].external_idrequiredtext or nullYour own id for this person, if you gave one.
data[].first_namerequiredtext or null
data[].last_namerequiredtext or null
data[].phonerequiredtext or null
data[].propertiesrequiredobjectCustom fields.
data[].tagsrequiredlist of textSorted alphabetically, without regard to case.
data[].consentrequiredobject
data[].consent.emailrequiredobject
data[].suppressionrequiredobject or nullSet when the address must not be emailed whatever the consent says: it bounced, complained, or was blocked by hand.
data[].suppression.reasonrequired"bounced" | "complained" | "manual"
data[].suppression.created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
data[].created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
data[].updated_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
next_cursorrequiredtext or nullPass as cursor to get the next page. Null on the last page.

Get a contact

GET/contacts/{id}

Needs the contacts:read scope.

curl https://api.sendsational.app/v1/contacts/CONTACT_ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Get a contact
FieldTypeWhat it is
idrequiredin the pathThe contact's id.

Answers

  • 200 The contact.
  • 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.
Fields in the answer
Fields returned by Get a contact
FieldTypeWhat it is
idrequiredid
emailrequiredemailAlways lower-case.
external_idrequiredtext or nullYour own id for this person, if you gave one.
first_namerequiredtext or null
last_namerequiredtext or null
phonerequiredtext or null
propertiesrequiredobjectCustom fields.
tagsrequiredlist of textSorted alphabetically, without regard to case.
consentrequiredobject
consent.emailrequiredobject
consent.email.statusrequired"subscribed" | "unsubscribed" | "never_subscribed"
consent.email.sourcerequiredtext or null
consent.email.changed_atrequiredtime or nullWhen the person made the choice.
suppressionrequiredobject or nullSet 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_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Update a contact by id

PATCH/contacts/{id}

Changes the fields you send. This is the way to change a contact's email address.

Needs the contacts:write scope. Accepts an Idempotency-Key.

curl -X PATCH https://api.sendsational.app/v1/contacts/CONTACT_ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'
Path parameters of Update a contact by id
FieldTypeWhat it is
idrequiredin the pathThe contact's id.

Request body

Request body of Update a contact by id
FieldTypeWhat it is
emailemailA new address for this contact. Consent, tags and fields stay with the contact.
external_idtext or nullYour own id for this person, such as a customer id. Unique in the workspace. Send null to clear it.
first_nametext or nullFirst name. Send null to clear it.
last_nametext or nullLast name. Send null to clear it.
phonetext or nullPhone number, stored as sent. It carries no consent. Send null to clear it.
propertiesobjectCustom 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_tagslist of textTags to add. Tags are case-sensitive.
remove_tagslist of textTags to remove. Removing a tag the contact does not have is fine.
consentobjectConsent changes, per channel.
consent.emailobjectA 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.sourcetextWhere the choice was made, in your own words: "signup_form", "checkout", "preference_page". Defaults to "api".
consent.email.occurred_attimeWhen 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.
Fields in the answer
Fields returned by Update a contact by id
FieldTypeWhat it is
idrequiredid
emailrequiredemailAlways lower-case.
external_idrequiredtext or nullYour own id for this person, if you gave one.
first_namerequiredtext or null
last_namerequiredtext or null
phonerequiredtext or null
propertiesrequiredobjectCustom fields.
tagsrequiredlist of textSorted alphabetically, without regard to case.
consentrequiredobject
consent.emailrequiredobject
consent.email.statusrequired"subscribed" | "unsubscribed" | "never_subscribed"
consent.email.sourcerequiredtext or null
consent.email.changed_atrequiredtime or nullWhen the person made the choice.
suppressionrequiredobject or nullSet 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_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 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.

Needs the contacts:write scope.

curl -X DELETE https://api.sendsational.app/v1/contacts/CONTACT_ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Delete a contact
FieldTypeWhat it is
idrequiredin the pathThe contact's id.

Answers

  • 204 Deleted.
  • 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.

Needs the events:write scope. Accepts an Idempotency-Key.

curl -X POST https://api.sendsational.app/v1/events \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "name": "order_placed",
  "contact": {
    "email": "maya@juniperco.example"
  },
  "id": "order-1001-placed",
  "occurred_at": "2026-11-24T15:04:05Z",
  "properties": {
    "order_id": "1001",
    "total": 84.5,
    "currency": "USD",
    "items": [
      {
        "product_id": "mug-oat",
        "title": "Oat glaze mug",
        "quantity": 2,
        "price": 28
      }
    ]
  }
}'

Request body

Request body of Track an event
FieldTypeWhat it is
namerequiredtextOne of the standard store events (product_viewed, added_to_cart, checkout_started, order_placed, order_fulfilled) or any name of your own.
contactrequiredobjectWhich contact. Give exactly one of id, email or external_id.
contact.ididThe contact's id.
contact.emailemailIf no contact has this address, one is created with no consent.
contact.external_idtextYour own id for the contact.
propertiesobjectAnything about the event. The standard store events have required properties; see the docs.
occurred_attimeWhen it happened. Defaults to now.
idtextYour own id for the event. An event with the same id and occurred_at is stored once, so send both to make a retry safe.

Answers

  • 200 This event was already stored.
  • 201 The event was stored.
  • 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, or no contact matches.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Track an event
FieldTypeWhat it is
idrequiredid
namerequiredtext
contact_idrequiredid
occurred_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
duplicaterequiredtrue or falseTrue when this event was already stored and nothing new was recorded.

Track many events

POST/events/bulk

Up to 500 events in one request. An event that is refused does not stop the others. The whole request counts once against the rate limit.

Needs the events:write scope. Accepts an Idempotency-Key.

curl -X POST https://api.sendsational.app/v1/events/bulk \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{}'

Request body

Request body of Track many events
FieldTypeWhat it is
eventsrequiredlist of object1 to 500 events.
events[].namerequiredtextOne of the standard store events (product_viewed, added_to_cart, checkout_started, order_placed, order_fulfilled) or any name of your own.
events[].contactrequiredobjectWhich contact. Give exactly one of id, email or external_id.
events[].contact.ididThe contact's id.
events[].contact.emailemailIf no contact has this address, one is created with no consent.
events[].contact.external_idtextYour own id for the contact.
events[].propertiesobjectAnything about the event. The standard store events have required properties; see the docs.
events[].occurred_attimeWhen it happened. Defaults to now.
events[].idtextYour own id for the event. An event with the same id and occurred_at is stored once, so send both to make a retry safe.

Answers

  • 200 One result per event, 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 events.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Track many events
FieldTypeWhat it is
resultsrequiredlist of objectOne entry per event sent, in the same order.
results[].statusrequired"created" | "duplicate" | "error"
results[].idid
results[].contact_idid
results[].errorobject
results[].error.coderequiredtext
results[].error.messagerequiredtext
results[].error.detailslist of object
summaryrequiredobject
summary.createdrequiredwhole number
summary.duplicatesrequiredwhole number
summary.errorsrequiredwhole number

Products and orders

Optional objects, stored under your own ids.

Create or replace a product

PUT/products/{id}

Stores a product under your own id, for product blocks and recommendations in emails. Optional: events work without it.

Needs the products:write scope.

curl -X PUT https://api.sendsational.app/v1/products/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "title": "Oat glaze mug",
  "price": 28,
  "currency": "USD",
  "url": "https://juniperco.example/products/oat-glaze-mug"
}'
Path parameters of Create or replace a product
FieldTypeWhat it is
idrequiredin the pathYour id for the product. URL-encode it.

Request body

Request body of Create or replace a product
FieldTypeWhat it is
titlerequiredtext
urlurl or null
image_urlurl or null
pricenumber or null
currencytext or null
categorieslist of text
availabletrue or falseFalse when it cannot be bought now. Defaults to true.
propertiesobjectAnything else about the product.

Answers

  • 200 The product was replaced.
  • 201 The product 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.
  • 422 A field was refused.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Create or replace a product
FieldTypeWhat it is
idrequiredtextYour id for the product.
titlerequiredtext
urlrequiredtext or null
image_urlrequiredtext or null
pricerequirednumber or null
currencyrequiredtext or null
categoriesrequiredlist of text
availablerequiredtrue or false
propertiesrequiredobject
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Get a product

GET/products/{id}

Needs the products:read scope.

curl https://api.sendsational.app/v1/products/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Get a product
FieldTypeWhat it is
idrequiredin the pathYour id for the product. URL-encode it.

Answers

  • 200 The product.
  • 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
FieldTypeWhat it is
idrequiredtextYour id for the product.
titlerequiredtext
urlrequiredtext or null
image_urlrequiredtext or null
pricerequirednumber or null
currencyrequiredtext or null
categoriesrequiredlist of text
availablerequiredtrue or false
propertiesrequiredobject
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 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.

Needs the orders:write scope.

curl -X PUT https://api.sendsational.app/v1/orders/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Path parameters of Create or replace an order
FieldTypeWhat it is
idrequiredin the pathYour id for the order. URL-encode it.

Request body

Request body of Create or replace an order
FieldTypeWhat it is
contactrequiredobjectWhich contact. Give exactly one of id, email or external_id.
contact.ididThe contact's id.
contact.emailemailIf no contact has this address, one is created with no consent.
contact.external_idtextYour own id for the contact.
totalrequirednumberA decimal number in the currency's main unit: 12.5, not 1250.
currencyrequiredtext
status"placed" | "fulfilled" | "canceled" | "refunded"Defaults to "placed".
itemslist of object
items[].product_idrequiredtextYour id for the product.
items[].titletext
items[].quantitywhole numberDefaults to 1.
items[].pricenumberPrice of one unit.
placed_attimeWhen the order was placed. Defaults to now for a new order.
propertiesobjectAnything else about the order.

Answers

  • 200 The order was replaced.
  • 201 The order 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.
  • 422 A field was refused, or no contact matches.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by Create or replace an order
FieldTypeWhat it is
idrequiredtextYour id for the order.
contact_idrequiredid or null
emailrequiredtext or null
statusrequired"placed" | "fulfilled" | "canceled" | "refunded"
totalrequirednumber
currencyrequiredtext
itemsrequiredlist of object
propertiesrequiredobject
placed_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Get an order

GET/orders/{id}

Needs the orders:read scope.

curl https://api.sendsational.app/v1/orders/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Get an order
FieldTypeWhat it is
idrequiredin the pathYour id for the order. URL-encode it.

Answers

  • 200 The order.
  • 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
FieldTypeWhat it is
idrequiredtextYour id for the order.
contact_idrequiredid or null
emailrequiredtext or null
statusrequired"placed" | "fulfilled" | "canceled" | "refunded"
totalrequirednumber
currencyrequiredtext
itemsrequiredlist of object
propertiesrequiredobject
placed_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
updated_atrequiredtimeISO 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.

Needs the webhooks:write scope. Accepts an Idempotency-Key.

curl -X POST https://api.sendsational.app/v1/webhook_endpoints \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "url": "https://juniperco.example/hooks/sendsational",
  "events": [
    "contact.unsubscribed",
    "email.bounced",
    "email.complained"
  ]
}'

Request body

Request body of Add a webhook endpoint
FieldTypeWhat it is
urlrequiredtextWhere to send events. Must be https.
eventsrequiredlist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"The event types to send.
descriptiontext 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
FieldTypeWhat it is
idrequiredid
urlrequiredtext
eventsrequiredlist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
descriptionrequiredtext or null
statusrequired"enabled" | "disabled"
disabled_reasonrequiredtext or null
last_success_atrequiredtime or null
last_failure_atrequiredtime or null
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
secretrequiredtext or nullThe 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.

List webhook endpoints

GET/webhook_endpoints

Needs the webhooks:read scope.

curl https://api.sendsational.app/v1/webhook_endpoints \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"

Answers

  • 200 Every endpoint of the workspace.
  • 401 The API key is missing, not valid, or revoked.
  • 403 The API key does not have the scope this request needs.
  • 429 Too many requests for this key in the current minute.
Fields in the answer
Fields returned by List webhook endpoints
FieldTypeWhat it is
datarequiredlist of object
data[].idrequiredid
data[].urlrequiredtext
data[].eventsrequiredlist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
data[].descriptionrequiredtext or null
data[].statusrequired"enabled" | "disabled"
data[].disabled_reasonrequiredtext or null
data[].last_success_atrequiredtime or null
data[].last_failure_atrequiredtime or null
data[].created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Get a webhook endpoint

GET/webhook_endpoints/{id}

Needs the webhooks:read scope.

curl https://api.sendsational.app/v1/webhook_endpoints/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Get a webhook endpoint
FieldTypeWhat it is
idrequiredin the pathThe endpoint's id.

Answers

  • 200 The endpoint.
  • 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.
Fields in the answer
Fields returned by Get a webhook endpoint
FieldTypeWhat it is
idrequiredid
urlrequiredtext
eventsrequiredlist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
descriptionrequiredtext or null
statusrequired"enabled" | "disabled"
disabled_reasonrequiredtext or null
last_success_atrequiredtime or null
last_failure_atrequiredtime or null
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Change a webhook endpoint

PATCH/webhook_endpoints/{id}

Change the address or the events, or switch the endpoint off and on. An endpoint we switched off after two days of failures is switched back on here.

Needs the webhooks:write scope.

curl -X PATCH https://api.sendsational.app/v1/webhook_endpoints/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
Path parameters of Change a webhook endpoint
FieldTypeWhat it is
idrequiredin the pathThe endpoint's id.

Request body

Request body of Change a webhook endpoint
FieldTypeWhat it is
urltext
eventslist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
descriptiontext or null
status"enabled" | "disabled"Switch the endpoint off or back on.

Answers

  • 200 The endpoint 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 endpoint has this id.
  • 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 Change a webhook endpoint
FieldTypeWhat it is
idrequiredid
urlrequiredtext
eventsrequiredlist of "contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
descriptionrequiredtext or null
statusrequired"enabled" | "disabled"
disabled_reasonrequiredtext or null
last_success_atrequiredtime or null
last_failure_atrequiredtime or null
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.

Remove a webhook endpoint

DELETE/webhook_endpoints/{id}

Needs the webhooks:write scope.

curl -X DELETE https://api.sendsational.app/v1/webhook_endpoints/ID \
  -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
Path parameters of Remove a webhook endpoint
FieldTypeWhat it is
idrequiredin the pathThe endpoint's id.

Answers

  • 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
FieldTypeWhat it is
product_idrequiredtextYour id for the product.
titletext
urlurl
image_urlurl
pricenumber
currencytext
categorieslist of text

added_to_cart

Properties of added_to_cart
FieldTypeWhat it is
product_idrequiredtextYour id for the product.
quantitywhole numberDefaults to 1.
titletext
pricenumber
currencytext
cart_urlurlWhere the person can pick the cart up again.

checkout_started

Properties of checkout_started
FieldTypeWhat it is
checkout_idrequiredtextYour id for the checkout.
totalrequirednumber
currencyrequiredtext
itemslist of object
items[].product_idrequiredtextYour id for the product.
items[].titletext
items[].quantitywhole numberDefaults to 1.
items[].pricenumberPrice of one unit.
checkout_urlurlWhere the person can finish the checkout.

order_placed

Properties of order_placed
FieldTypeWhat it is
order_idrequiredtextYour id for the order. The order is stored under it.
totalrequirednumber
currencyrequiredtext
itemslist of object
items[].product_idrequiredtextYour id for the product.
items[].titletext
items[].quantitywhole numberDefaults to 1.
items[].pricenumberPrice of one unit.

order_fulfilled

Properties of order_fulfilled
FieldTypeWhat it is
order_idrequiredtextYour id for the order.
tracking_urlurl
carriertext

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
TypeSent when
contact.subscribedA contact's email consent became subscribed.
contact.unsubscribedA contact's email consent became unsubscribed, including after a spam complaint.
contact.consent_changedAny consent change. Sent alongside the two above, so subscribe to this one or to those, not both.
email.bouncedAn email could not be delivered. A hard bounce suppresses the address.
email.complainedThe recipient marked an email as spam. The address is suppressed and unsubscribed.

The request

Fields of a webhook body
FieldTypeWhat it is
idrequiredtextThe event's id, also in the webhook-id header. The same on every retry: use it to ignore repeats.
typerequired"contact.subscribed" | "contact.unsubscribed" | "contact.consent_changed" | "email.bounced" | "email.complained"
created_atrequiredtimeISO 8601, for example 2026-11-24T15:04:05Z.
workspace_idrequiredtext
testtrue or falseTrue for a sample event sent from the app.
datarequiredobject
POST /hooks/sendsational
webhook-id: evt_0f8fad5bd9cb469fa16570867728950e
webhook-timestamp: 1795531445
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=

{
  "id": "evt_0f8fad5bd9cb469fa16570867728950e",
  "type": "contact.unsubscribed",
  "created_at": "2026-11-24T15:04:05.000Z",
  "workspace_id": "ws_…",
  "data": {
    "contact": { "id": "…", "email": "maya@juniperco.example", "external_id": "cus_1001" },
    "consent": { "channel": "email", "status": "unsubscribed", "previous_status": "subscribed",
                 "source": "preference_page", "occurred_at": "2026-11-24T15:04:05.000Z" }
  }
}

Check the signature

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.