Connect a store, a site or a script with one API key.

REST and JSON at api.sendsational.app/v1: send contacts, consent and store events in, send single emails, and get signed webhooks back.

Quickstart

Three requests, each with its answer.

Create a key in the app under Settings, API keys. It is shown once, belongs to one workspace, and carries scopes that limit what it may do: these three steps need contacts:write and events:write.
  1. Step 1: Check the key

    GET /v1/me needs no scope. It says which workspace the key belongs to and what it may do.

    GET /v1/me
    export SENDSATIONAL_API_KEY="ss_live_…"
    
    curl https://api.sendsational.app/v1/me \
      -H "Authorization: Bearer $SENDSATIONAL_API_KEY"
    Answer: 200 OK
    {
      "workspace": {
        "id": "Jq3vT8mZ2xKp7cRb4nWs9hLd6fYa1eUo",
        "name": "Juniper & Co"
      },
      "api_key": {
        "id": "6f1c2e4a-8b3d-4f5e-9a7c-1d2b3c4e5f60",
        "name": "Store backend",
        "scopes": ["contacts:write", "events:write"],
        "rate_limit_per_minute": 600
      }
    }
  2. Step 2: Add a contact, with consent

    Needs contacts:write. Finds the contact by email address or creates it: 201 when created, 200 when updated.

    POST /v1/contacts
    curl https://api.sendsational.app/v1/contacts \
      -H "Authorization: Bearer $SENDSATIONAL_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "email": "maya@juniperco.example",
        "first_name": "Maya",
        "consent": {
          "email": { "status": "subscribed", "source": "signup_form" }
        }
      }'
    Answer: 201 Created
    {
      "id": "0b6f9a52-3c1e-4d7a-8f20-5e9b1c7d4a36",
      "email": "maya@juniperco.example",
      "external_id": null,
      "first_name": "Maya",
      "last_name": null,
      "phone": null,
      "properties": {},
      "tags": [],
      "consent": {
        "email": {
          "status": "subscribed",
          "source": "signup_form",
          "changed_at": "2026-11-24T15:04:05.000Z"
        }
      },
      "suppression": null,
      "created_at": "2026-11-24T15:04:05.000Z",
      "updated_at": "2026-11-24T15:04:05.000Z"
    }
  3. Step 3: Track an event

    Needs events:write. Send your own id and occurred_at, and a retry is stored once: the answer is then 200 with duplicate set to true.

    POST /v1/events
    curl 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" },
        "id": "order-1001-placed",
        "occurred_at": "2026-11-24T15:06:12Z",
        "properties": {
          "order_id": "1001",
          "total": 84.5,
          "currency": "USD"
        }
      }'
    Answer: 201 Created
    {
      "id": "5d2e8c71-9a4b-4f63-b0e2-7c1a9f3d6b58",
      "name": "order_placed",
      "contact_id": "0b6f9a52-3c1e-4d7a-8f20-5e9b1c7d4a36",
      "occurred_at": "2026-11-24T15:06:12.000Z",
      "duplicate": false
    }

The model

What goes in, and what comes out.

Four kinds of thing, each with its own scopes. Field names are snake_case, times are ISO 8601 in UTC, money is a decimal in the currency’s main unit, and a field the API does not know is refused, so a typo is never ignored.

Contacts and consent

Scopes: contacts:readcontacts:write

A person, found by email address. Consent is kept per channel with where and when the choice was made, and an older change never overrides a newer one. A hard bounce or a spam complaint suppresses the address, whatever the consent says.

  • POST /v1/contacts
  • POST /v1/contacts/bulk
  • GET /v1/contacts
  • GET /v1/contacts/{id}
  • PATCH /v1/contacts/{id}
  • DELETE /v1/contacts/{id}

Events

Scopes: events:write

What a contact did. The five standard store events are checked for their required properties, and flows, segments and revenue reports are built on them. Any other lower-case name is your own event, stored as sent.

Standard store events: product_viewedadded_to_cartcheckout_startedorder_placedorder_fulfilled

  • POST /v1/events
  • POST /v1/events/bulk

Products and orders

Scopes: products:readproducts:writeorders:readorders:write

Optional, stored under your own ids. Products fill product blocks in emails. An order_placed event stores the order for you; PUT an order only to load past ones or correct one.

  • PUT /v1/products/{id}
  • GET /v1/products/{id}
  • PUT /v1/orders/{id}
  • GET /v1/orders/{id}

Single emails

Scopes: emails:sendemails:read

One transactional email to one person: a receipt, a password reset. The answer is 202 with the email’s id, and it goes out within seconds from a domain you verified. Someone who only unsubscribed from marketing still gets it.

  • POST /v1/emails
  • GET /v1/emails/{id}

No bulk marketing send. Marketing email goes out as a campaign or a flow, made in the app, which adds the unsubscribe link and header the law asks for. The API sends one transactional email at a time.

Webhooks

Unsubscribes, bounces and complaints, sent to you, signed.

Add an endpoint under Settings, Webhooks, or with POST /v1/webhook_endpoints. We POST each event you chose as JSON. Answer with any 2xx within 10 seconds; anything else is tried again after 1 min, 5 min, 30 min, 2 h, 6 h, 12 h and 24 h: eight attempts over about two days.

Five events

contact.subscribed
A contact’s email consent became subscribed.
contact.unsubscribed
Their consent became unsubscribed, a spam complaint included.
contact.consent_changed
Any consent change. Sent alongside the two above: choose this one or those.
email.bounced
An email could not be delivered. A hard bounce suppresses the address.
email.complained
Someone marked an email as spam. The address is suppressed and unsubscribed.

How they are signed

  • The Standard Webhooks way, so its libraries verify them as they are.
  • HMAC-SHA256 of webhook-id, a dot, webhook-timestamp, a dot and the raw body, keyed with your secret after whsec_, base64-decoded.
  • Refuse a timestamp more than 5 minutes old.
  • webhook-id is the same on every retry: store it and ignore repeats.
What your endpoint receives
POST /hooks/sendsational HTTP/1.1
Content-Type: application/json
webhook-id: evt_0f8fad5bd9cb469fa16570867728950e
webhook-timestamp: 1795537200
webhook-signature: v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4=

{
  "id": "evt_0f8fad5bd9cb469fa16570867728950e",
  "type": "contact.unsubscribed",
  "created_at": "2026-11-24T16:20:00.000Z",
  "workspace_id": "Jq3vT8mZ2xKp7cRb4nWs9hLd6fYa1eUo",
  "data": {
    "contact": {
      "id": "0b6f9a52-3c1e-4d7a-8f20-5e9b1c7d4a36",
      "email": "maya@juniperco.example",
      "external_id": "cus_1001"
    },
    "consent": {
      "channel": "email",
      "status": "unsubscribed",
      "previous_status": "subscribed",
      "source": "preference_page",
      "occurred_at": "2026-11-24T16:20:00.000Z"
    }
  }
}
Check the signature (Node.js)
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);
  });
}

Retries and limits

Safe to retry, with limits you can see.

A network can drop an answer. Send an Idempotency-Key and a retry gets the first answer back instead of doing the work twice. Every error has the same shape, and every answer says how much of the minute’s limit is left.
422 Unprocessable Content
{
  "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"
  }
}
The same request again
# Repeated with the same Idempotency-Key:
HTTP/1.1 201 Created
Idempotent-Replayed: true
RateLimit-Limit: 600
RateLimit-Remaining: 597
RateLimit-Reset: 41
X-Request-Id: req_9c2d7e1f4a6b4c8d9e0f1a2b3c4d5e6f
Past the limit
HTTP/1.1 429 Too Many Requests
Retry-After: 41
RateLimit-Limit: 600
RateLimit-Remaining: 0
RateLimit-Reset: 41
  • Idempotency keys

    Any unique text up to 255 characters, on a POST or PATCH. The first answer is kept for 24 hours. A repeat while the first still runs gets 409; the same key with a different request gets 422.

  • One error shape

    Decide from type, match on code, show message to a person. A 429 means wait; a 500 is on our side and safe to retry. Quote request_id when you ask for help.

  • 600 requests a minute

    Per key, unless its limit was changed. A bulk request of up to 500 contacts or events counts once. Past the limit: 429 with Retry-After in seconds. A body may be up to 2 MB.

Site tracking

One line on your site records the browsing.

Settings, Site tracking gives you the line with your key filled in. Paste it on every page. It sets no cookies: the visitor id is kept in the browser’s localStorage.
On every page
<script async src="https://app.sendsational.app/t.js" data-key="ss_pub_…"></script>
Product views and cart additions
// Once t.js has loaded:
sendsational("track", "product_viewed", {
  product_id: "p1",
  title: "Linen apron",
  price: 32,
});
sendsational("track", "added_to_cart", { product_id: "p1", quantity: 1 });

What it records

  • Page views, on every page, by itself.
  • Product views and cart additions, when you call it as shown.
  • Who the browser is, when they arrive from one of your emails. An email address typed into a form only links them to a contact you already have, and is kept apart as unverified.
  • Nothing else. Checkouts, orders and events of your own come from your server, with a secret key. The key in the line starts ss_pub_ and works only from the sites you list.

For agents

Readable by agents as well as people.

An assistant or a coding agent can learn the API from two files, before it makes a single request.
  • The OpenAPI file

    OpenAPI 3.1, generated from the code that serves the API: every endpoint, field, scope and error.

    openapi.json
  • llms.txt

    Plain text for language models: this site’s says what Sendsational is, and the app’s lists the endpoints, events, webhooks and rules.

  • MCP server Coming soon

    It will let an assistant find and update contacts and record events with an API key, under the same scopes and limits as the API.

Request access.

Sign-in is by invitation for now. Leave your email address and we will write when your access is ready. People on this list also hear about prices first.

One email when your access is ready. Nothing else.