SenderKit Messages API
Read message history and cancel pending sends.
Read message history and cancel pending sends.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/senderkit-com:senderkit-com-messages-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: SenderKit Public Messages API
version: 1.0.0
description: 'Public REST API for SenderKit — send transactional messages (email, SMS,
push, web push), list message history, and read/render templates.
## Authentication
All endpoints require a Bearer API key:
Authorization: Bearer sk_live_xxx
The `sk_live_` / `sk_test_` prefix selects the environment (live vs. test).
The prefix is only a hint for humans; the secret is the full token. Keys are
created in the dashboard and shown once at creation.
## Sends are asynchronous
`POST /v1/send` enqueues the message and returns `202` with `status: "queued"`.
Delivery happens out of band; poll `GET /v1/messages` to observe progress.
## Rate limits
All endpoints are rate limited per API key. Sends and reads count against
separate budgets, so listing messages never competes with sending them.
A `429` response includes a `Retry-After` header (seconds).'
servers:
- url: https://api.senderkit.com
description: Production
- url: http://localhost:3000/api
description: Local development
security:
- apiKey: []
tags:
- name: Messages
description: Read message history and cancel pending sends.
paths:
/v1/messages:
get:
tags:
- Messages
summary: List messages
operationId: listMessages
description: 'Returns messages for the authenticated workspace and environment,
newest first, with cursor pagination.
Setting `tail=1` switches the endpoint to a Server-Sent Events stream
(`text/event-stream`) that backfills the most recent 50 messages and
then pushes new ones live. Streams are closed by the server after 30
minutes; EventSource clients reconnect automatically and receive a
fresh backfill. The schemas below describe the non-streaming JSON
response.'
parameters:
- name: limit
in: query
description: Page size (1–200).
schema:
type: integer
minimum: 1
maximum: 200
default: 50
- name: cursor
in: query
description: Opaque pagination cursor from a previous response's `nextCursor`.
schema:
type: string
- name: status
in: query
schema:
$ref: '#/components/schemas/MessageStatus'
- name: channel
in: query
schema:
$ref: '#/components/schemas/Channel'
- name: template
in: query
description: Filter by template slug.
schema:
type: string
- name: metadata[key]
in: query
description: 'Filter by metadata containment, Stripe-style. E.g.
`?metadata[userId]=usr_123`. Multiple keys are AND-ed. A value
matches whether it was stored as a string or as a number/boolean,
so `?metadata[orderId]=123` matches both `"123"` and `123`.
'
schema:
type: string
- name: search
in: query
description: 'Case-insensitive substring match over the message''s public id,
recipient, template slug, and metadata keys/values. Composes with
the other filters and with cursor pagination — use
`metadata[key]=value` instead when you need an exact match. `%`,
`_`, and `\` are matched literally.
'
schema:
type: string
maxLength: 512
- name: tail
in: query
description: Set to `1` to receive a Server-Sent Events stream instead of JSON.
schema:
type: string
enum:
- '1'
responses:
'200':
description: A page of messages.
content:
application/json:
schema:
type: object
required:
- data
- nextCursor
properties:
data:
type: array
items:
$ref: '#/components/schemas/Message'
nextCursor:
type:
- string
- 'null'
description: Cursor for the next page, or null if no more results.
text/event-stream:
schema:
type: string
description: 'SSE stream (when `tail=1`). Events: `message` (a Message
object), `ready` (backfill complete), `error`
(`{ code, message }`; `poll_failed` errors are transient and
the stream stays open).
'
'400':
description: Invalid `status` or `channel` filter value (`invalid_request`).
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'401':
$ref: '#/components/responses/Unauthorized'
'429':
$ref: '#/components/responses/RateLimited'
/v1/messages/{id}:
get:
tags:
- Messages
summary: Get a message
operationId: getMessage
description: 'Retrieve a single message by its public ID. The message must belong to
the authenticated workspace and match the API key''s environment (live
or test).'
parameters:
- $ref: '#/components/parameters/MessageId'
responses:
'200':
description: The message.
content:
application/json:
schema:
$ref: '#/components/schemas/Message'
'401':
$ref: '#/components/responses/Unauthorized'
'404':
description: No message with that id in this workspace and environment.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/RateLimited'
delete:
tags:
- Messages
summary: Cancel a message
operationId: cancelMessage
description: 'Cancel a still-pending message before it is dispatched. Only messages
whose status is `scheduled` or `queued` can be canceled; anything past
that (rendered, dispatched, sent, delivered, failed, opted_out,
suppressed, blocked, canceled) is already committed to a provider or terminal.
Cancellation is race-safe: if the dispatcher advances the message while
the cancel request is in flight, the request fails with `409` and the
message''s freshly observed status.'
parameters:
- $ref: '#/components/parameters/MessageId'
responses:
'200':
description: The message was canceled.
content:
application/json:
schema:
type: object
required:
- id
- status
properties:
id:
type: string
description: Public message ID (e.g. `msg_...`).
example: msg_0a1b2c3d4e5f6g7h
status:
type: string
const: canceled
'401':
$ref: '#/components/responses/Unauthorized'
'404':
description: No message with that id in this workspace and environment.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'409':
description: 'Not cancelable (`not_cancelable`) — the message has already been
dispatched or is in a terminal state. The error message includes
the message''s current status.
'
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
'429':
$ref: '#/components/responses/RateLimited'
components:
responses:
RateLimited:
description: Rate limit exceeded.
headers:
Retry-After:
description: Seconds to wait before retrying.
schema:
type: integer
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
Unauthorized:
description: Missing, malformed, invalid, or revoked API key.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
MessageId:
name: id
in: path
required: true
description: Public message ID (e.g. `msg_...`).
schema:
type: string
schemas:
Error:
type: object
required:
- error
properties:
error:
type: object
required:
- code
- message
properties:
code:
type: string
description: Stable machine-readable error code.
example: invalid_request
message:
type: string
issues:
type: array
description: Present on validation failures (Zod issues).
items:
type: object
additionalProperties: true
limit:
type: integer
description: Present on rate-limit errors.
Metadata:
type: object
description: Caller-supplied tags/IDs. Values must be string, number, or boolean.
additionalProperties:
oneOf:
- type: string
- type: number
- type: boolean
Channel:
type: string
enum:
- email
- sms
- push
- web-push
MessageStatus:
type: string
description: 'Lifecycle status of a message. `scheduled` is the initial status for a
send with a future `scheduledAt`; `queued` is the initial status for an
immediate send. `canceled` is terminal and reached when a `scheduled` or
`queued` message is canceled before dispatch.
`suppressed` means the provider accepted the request but never attempted
delivery — the recipient address failed validation, or was already
suppressed for this sender. It is distinct from `failed`, which is a
bounce reported by the receiving mail server.
'
enum:
- scheduled
- queued
- rendered
- dispatched
- sent
- delivered
- failed
- opted_out
- suppressed
- blocked
- canceled
Message:
type: object
description: A message row. `vars`, `metadata`, and `timeline` are JSON.
properties:
id:
type: string
format: uuid
workspaceId:
type: string
format: uuid
publicId:
type: string
example: msg_0a1b2c3d4e5f6g7h
templateSlug:
type:
- string
- 'null'
description: Null for raw sends.
channel:
$ref: '#/components/schemas/Channel'
status:
$ref: '#/components/schemas/MessageStatus'
livemode:
type: boolean
recipient:
type: string
vars:
type: object
additionalProperties: true
metadata:
$ref: '#/components/schemas/Metadata'
fromOverride:
type:
- string
- 'null'
fromNameOverride:
type:
- string
- 'null'
interpolate:
type: boolean
description: 'Raw sends only — whether Mustache interpolation was run over the
inline content. Always false for template sends.
'
pinnedVersion:
type:
- integer
- 'null'
description: 'Template sends only — the explicit template version pinned by the
caller, or null when resolved by environment.
'
provider:
type:
- string
- 'null'
providerConnectionId:
type:
- string
- 'null'
format: uuid
providerMessageId:
type:
- string
- 'null'
latencyMs:
type:
- integer
- 'null'
openedAt:
type:
- string
- 'null'
format: date-time
description: 'First provider-reported open (email open tracking), or null. Set
once; later opens don''t update it.
'
clickedAt:
type:
- string
- 'null'
format: date-time
description: 'First provider-reported link click, or null. Set once; later
clicks don''t update it.
'
error:
type:
- string
- 'null'
timeline:
type: array
items:
type: object
properties:
t:
type: string
format: date-time
e:
type: string
additionalProperties: true
createdAt:
type: string
format: date-time
scheduledAt:
type:
- string
- 'null'
format: date-time
description: 'When the send was scheduled for, or null for an immediate send.
'
idempotencyKey:
type:
- string
- 'null'
description: 'The Idempotency-Key supplied on the send request, or null if none
was provided.
'
securitySchemes:
apiKey:
type: http
scheme: bearer
description: API key with an `sk_live_` or `sk_test_` prefix.