Skip to content

Overview

Resend-compatible email API on Amazon SES.

The SpacePost API is a drop-in replacement for the Resend API: same paths, request fields, response shapes and error format. To migrate, change the base URL (RESEND_BASE_URL=https://api.spacepost.dev, or new Resend(key, { baseUrl })) or swap the SDK import. The official resend npm SDK works unchanged.

Platform mode (tenants)

If you send on behalf of your own customers, create a tenant for each with POST /tenants. Each tenant has its own SES tenant (isolated reputation), its own bounce/complaint guard, a pause switch and an optional daily cap. tenant_id (our id or your external_id) is optional on POST /emails, POST /emails/batch items and POST /domains. An email from a tenant-owned domain is attributed to that tenant automatically; a team-level domain may send on behalf of any tenant. Emails, domains and webhook payloads carry tenant_id.

Authentication

Send your API key as a bearer token: Authorization: Bearer sp_live_.... Keys come in two flavours:

  • full_access can use every endpoint.
  • sending_access can only send emails (POST /emails, POST /emails/batch), optionally from a single domain. Any other endpoint answers 401 restricted_api_key.

Errors

Every error has the same shape: { "statusCode": 422, "name": "validation_error", "message": "..." }.

Idempotency

POST /emails and POST /emails/batch accept an Idempotency-Key header (1 to 256 characters, kept for 24 hours). Repeating a request with the same key and body returns the original response. Reusing a key with a different body is a 409.

Rate limits

Each team may make 10 requests per second (25 on Scale). Responses carry ratelimit-limit, ratelimit-remaining and ratelimit-reset; when exceeded the API answers 429 rate_limit_exceeded with a retry-after header.

Pagination

List endpoints return { "object": "list", "has_more": true, "data": [...] }, newest first. Use limit (1 to 100, default 20) and after=<id> for the next (older) page or before=<id> for the previous (newer) page. after and before cannot be combined.

MCP

Every operation in this reference is also an MCP tool for AI agents, named after its operationId in snake_case (sendEmail → send_email). Connect to the hosted MCP server at https://api.spacepost.dev/mcp (Streamable HTTP) with the same Authorization: Bearer sp_live_... header, or run npx -y @spacepost/mcp locally. The same key permissions, rate limits and idempotency rules apply. x-mcp and x-permission on an operation are hints for these tools.

Information

  • License: Proprietary
  • OpenAPI version: 3.1.0

Your API key, e.g. Authorization: Bearer sp_live_....

Security scheme type: http

Bearer format: sp_live_...