Skip to content
Esc
  • OverviewGuidesWhat exists today, and where to start.
  • QuickstartGuidesKey, domain, first send — in that order.
  • AuthenticationGuidesBearer keys, the mandatory User-Agent, and what each refusal means.
  • ErrorsGuidesThe whole vocabulary, with the status each name carries.
  • IdempotencyGuidesRetry a send without sending it twice.
  • PaginationGuidesCursors are item IDs, not page numbers.
  • Rate limitsGuidesTen a second per team, and the headers that tell you where you are.
  • EventsGuidesEvery event a webhook can carry, with one real payload each.
  • DomainsGuidesThe records, where they go at each registrar, and what the page does while you wait.
  • TrackingGuidesOpens and clicks: one record, two toggles, and what an open really means.
  • ReceivingGuidesInbound mail, and the Inbox: a webhook fires, you read it, you answer it.
  • InboxGuidesChannels, personal mailboxes and seats: who sees what, and where a reply goes.
  • Node SDKGuidesThe rasket package: typed from the API's own document, retries only what is safe.
  • Python SDKGuidesThe rasket package on PyPI: the Node client's methods, in snake_case, over httpx.
  • MCP serverGuidesConnect Claude, ChatGPT or any MCP client: your scopes, no key.
  • AI assistGuidesSubject lines, drafts and diagnosis — in the dashboard and over the API, off until you allow it.
  • AgentsGuidesLet an AI agent set Rasket up: the skill, the rules file, MCP, and the recipe they share.
  • OAuthGuidesLet another app act for a team: register, authorize with PKCE, exchange, refresh.
  • Single sign-onGuidesOIDC login for your team, a domain proved by DNS, enforcement and break-glass.
  • IntegrationsGuidesVercel, Netlify and Cloudflare, plus Zapier and n8n for workflows without code.
  • SMTPGuidesSend from anything that speaks SMTP: settings, setup guides, limits and replies.
  • ZapierGuidesSend email, add contacts and react to email events from a Zap, with no code.
  • n8nGuidesThe Rasket node and trigger for n8n workflows: install, connect, every operation.
  • VercelGuidesAdd Rasket on Vercel: a Sending key in each project as RASKET_API_KEY, no copying.
  • EmailsAPI referenceSend, batch, retrieve, list, reschedule, cancel, attachments.
  • DomainsAPI referenceAdd a domain, publish its records, verify it.
  • API keysAPI referenceCreate, list, rename and revoke credentials.
  • WebhooksAPI referencePayloads, signature verification, retries and replay.
  • SuppressionsAPI referenceAddresses we will not send to, and why.
  • LogsAPI referenceEvery request made with this team's credentials.
  • MetricsAPI referenceDelivery, bounce, complaint and engagement counts.
  • TemplatesAPI referenceVersioned email content with typed variables, addressed by ID or alias.
  • ContactsAPI referenceYour audience: contacts, their typed properties, segments and topic choices.
  • SegmentsAPI referenceAudiences defined by a filter, by hand, or both.
  • TopicsAPI referenceWhat contacts subscribe to, and the preference page's list.
  • CampaignsAPI referenceCampaigns, at /broadcasts: one message to a segment, from draft to results.
  • ImportsAPI referenceCSV uploads: column mapping, conflicts and counts.
  • AutomationsAPI referenceWorkflows that run per contact: the graph, its versions, and every run.
  • Custom eventsAPI referenceThe names your product fires, and what starts a workflow.
  • ReceivingAPI referenceMail sent to you: the message, its attachments, its raw source.
  • OAuthAPI referenceClient registration, the token endpoint, and the grants a team has given.
  • TeamAPI referenceThe team a credential belongs to: its plan, sender identity, AI flag and members.
  • BillingAPI referencePlan, usage, invoices and add-ons, and the hosted pages where a customer pays.
  • AI helpersAPI referenceSubject lines, a first draft, and why an email did what it did.

API referenceTopics

Topics

The categories contacts subscribe to. A broadcast scoped to a topic reaches only the contacts opted in to it, and the hosted preference page is where they choose.

How a topic decides

  • Each contact has an effective subscription to every topic: their own choice where one was recorded, and the topic's default_subscription otherwise. A broadcast with a topic_id goes only to contacts whose effective subscription is opt_in.
  • default_subscription is fixed at creation. Changing it would silently flip everyone who never chose, so the API refuses rather than asking you to be careful.
  • A public topic is listed on every contact's preference page. A private one appears only for contacts already opted in — for a list people join somewhere else and should be able to leave here.
  • A global unsubscribe wins over every topic: a contact with unsubscribed: true receives nothing, whatever their choices say.

Every choice — from the API, an import, the preference page or a one-click unsubscribe — writes a consent record with its source, time and, where there was one, the IP address and user agent. Records are kept for three years and survive the contact's erasure with a hash of the address, which is what lets an opt-out be proven later.

Endpoints

Create a topic

POST /topics

A category contacts subscribe to, with a default for those who never chose.

Body

  • namestringRequired

    Up to 50 characters, unique among live topics.

  • default_subscriptionstringRequired

    opt_in or opt_out: what a contact with no explicit choice is treated as. Fixed after creation.

  • descriptionstring

    Up to 200 characters, shown on the preference page.

  • visibilitystring

    public lists the topic on every contact's preference page; private (the default) only for contacts already opted in.

Request

curl -X POST "https://api.rasket.com/topics" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Product updates",
  "description": "What shipped this month.",
  "default_subscription": "opt_in",
  "visibility": "public"
}'

Response 201

{
  "object": "topic",
  "id": "0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17"
}
  • A live topic with the same name is 422 invalid_parameter.
  • A broadcast scoped to a topic goes only to contacts whose effective subscription to it is opt_in.

List topics

GET /topics

Every live topic, newest first.

Query parameters

  • limitinteger

    How many items to return, 1–100. Defaults to 20.

  • afterstring

    Return the page that follows this item ID. Mutually exclusive with before.

  • beforestring

    Return the page that precedes this item ID. Mutually exclusive with after.

Request

curl -X GET "https://api.rasket.com/topics" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "list",
  "has_more": false,
  "data": [
    {
      "id": "0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17",
      "name": "Product updates",
      "description": "What shipped this month.",
      "default_subscription": "opt_in",
      "visibility": "public",
      "created_at": "2026-09-08T22:22:17.595Z"
    }
  ]
}

Retrieve a topic

GET /topics/{id}

One topic by ID.

Path parameters

  • idstringRequired

    The topic's ID.

Request

curl -X GET "https://api.rasket.com/topics/0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "topic",
  "id": "0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17",
  "name": "Product updates",
  "description": "What shipped this month.",
  "default_subscription": "opt_in",
  "visibility": "public",
  "created_at": "2026-09-08T22:22:17.595Z"
}

Update a topic

PATCH /topics/{id}

Change the name, description or visibility.

Path parameters

  • idstringRequired

    The topic's ID.

Body

  • namestring

    Up to 50 characters.

  • descriptionstring | null

    null clears it.

  • visibilitystring

    public or private.

Request

curl -X PATCH "https://api.rasket.com/topics/0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0" \
  -H "Content-Type: application/json" \
  -d '{
  "visibility": "private"
}'

Response 200

{
  "object": "topic",
  "id": "0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17"
}
  • default_subscription cannot change: a body that carries it is 422 invalid_parameter. Changing it would silently resubscribe or unsubscribe everyone who never chose.

Delete a topic

DELETE /topics/{id}

Retire the topic and free its name.

Path parameters

  • idstringRequired

    The topic's ID.

Request

curl -X DELETE "https://api.rasket.com/topics/0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17" \
  -H "Authorization: Bearer $RASKET_API_KEY" \
  -H "User-Agent: acme-billing/1.0"

Response 200

{
  "object": "topic",
  "id": "0199d2f1-4c4e-7a20-9c31-6f2b8a0e5d17",
  "deleted": true
}
  • The topic is 404 from that moment. Emails and consent records that name it keep doing so.