← Back to docs

API Reference

API Reference

The Postscale API is organized around REST. Our API accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.

Base URL

All API requests should be made to:

https://api.postscale.io/v1

Authentication

Authenticate your API requests by including your API key in the Authorization header:

Authorization: Bearer ps_live_your_api_key

See Authentication for more details on API keys.

Content Type

All requests must include the Content-Type header:

Content-Type: application/json

Response Format

Successful responses return JSON directly:

{
  "message_id": "a1b2c3d4@yourapp.com",
  "status": "queued"
}

Error responses include an error message:

{
  "error": "the 'to' field is required"
}

HTTP Status Codes

StatusDescription
200Success
201Created
202Accepted (email queued)
400Bad Request — Invalid parameters
401Unauthorized — Invalid or missing API key
403Forbidden — Insufficient permissions or plan limit reached
404Not Found — Resource doesn't exist
409Conflict — Resource already exists
422Unprocessable Entity — All recipients suppressed
429Too Many Requests — Rate limit exceeded
500Internal Server Error

Pagination

List endpoints support pagination via query parameters:

ParameterTypeDescription
limitintegerNumber of items per page (default: 50, max: 100)
offsetintegerNumber of items to skip

Example:

GET /v1/emails?limit=50&offset=100

Rate Limits

Sending rate limits are managed through the domain warming system. See Warming for details on sending limits per warming phase.

Rate limit errors include details about the limit:

{
  "error": "rate_limit_exceeded",
  "message": "daily sending limit exceeded",
  "limit_type": "daily",
  "limit": 1500,
  "used": 1500,
  "retry_after_seconds": 3600,
  "warming_phase": "phase_1"
}

API Endpoints

The Postscale API is organized into these resource groups:

Emails (Send)

MethodEndpointDescription
POST/v1/sendSend an email
POST/v1/send/batchSend up to 100 emails
GET/v1/emailsList sent emails
GET/v1/emails/:idGet email details

Inbound

MethodEndpointDescription
GET/v1/inbound-emailsList inbound emails
GET/v1/inbound-emails/:idGet inbound email

Shield Aliases

MethodEndpointDescription
POST/v1/shield/aliasesCreate a Shield alias
GET/v1/shield/aliasesList Shield aliases
GET/v1/shield/aliases/:idGet Shield alias details
PUT/v1/shield/aliases/:idUpdate a Shield alias
DELETE/v1/shield/aliases/:idDelete a Shield alias

Domain Aliases

MethodEndpointDescription
POST/v1/domains/:id/aliasesCreate an alias for a domain
GET/v1/domains/:id/aliasesList aliases for a domain
GET/v1/aliases/:idGet alias details
PUT/v1/aliases/:idUpdate an alias
DELETE/v1/aliases/:idDelete an alias

Domains

MethodEndpointDescription
POST/v1/domainsAdd a domain
GET/v1/domainsList domains
GET/v1/domains/:idGet domain details
PUT/v1/domains/:idUpdate a domain
POST/v1/domains/:id/verifyVerify domain DNS
GET/v1/domains/:id/dnsGet DNS records
DELETE/v1/domains/:idRemove a domain

Templates

MethodEndpointDescription
POST/v1/templatesCreate a template
GET/v1/templatesList templates
GET/v1/templates/:idGet template (by UUID or slug)
PUT/v1/templates/:idUpdate a template
DELETE/v1/templates/:idDelete a template
POST/v1/templates/:id/previewPreview rendered template

Webhooks

MethodEndpointDescription
POST/v1/webhooksCreate webhook endpoint
GET/v1/webhooksList webhook endpoints
DELETE/v1/webhooks/:idDelete webhook endpoint

DKIM

MethodEndpointDescription
POST/v1/domains/:id/dkimGenerate DKIM key
GET/v1/domains/:id/dkimGet DKIM records
POST/v1/domains/:id/dkim/rotateRotate DKIM key
POST/v1/domains/:id/dkim/verifyVerify DKIM DNS
DELETE/v1/domains/:id/dkim/:selectorDeactivate DKIM key

DMARC

MethodEndpointDescription
GET/v1/domains/:id/dmarc/summaryGet DMARC summary stats
GET/v1/domains/:id/dmarc/sourcesGet source IP breakdown
GET/v1/domains/:id/dmarc/dailyGet daily alignment data
GET/v1/domains/:id/dmarc/reportsList aggregate reports
GET/v1/domains/:id/dmarc/reports/:reportIdGet report with records
GET/v1/domains/:id/dmarc/addressGet DMARC report address

Stats

MethodEndpointDescription
GET/v1/domains/:id/statsGet aggregated statistics
GET/v1/domains/:id/stats/dailyGet daily statistics
GET/v1/domains/:id/stats/hourlyGet hourly statistics
GET/v1/domains/:id/stats/ispGet per-ISP statistics

Warming

MethodEndpointDescription
GET/v1/domains/:id/warmingGet warming status
GET/v1/domains/:id/warming/historyGet warming history
POST/v1/domains/:id/warming/startStart warming
POST/v1/domains/:id/warming/pausePause warming
POST/v1/domains/:id/warming/resumeResume warming

Suppressions

MethodEndpointDescription
GET/v1/suppressionsList suppression entries
GET/v1/suppressions/checkCheck if email is suppressed
POST/v1/suppressionsAdd to suppression list
DELETE/v1/suppressions/:emailRemove from suppression list

API Keys

MethodEndpointDescription
POST/v1/api-keysCreate API key
GET/v1/api-keysList API keys
GET/v1/api-keys/:idGet API key
PUT/v1/api-keys/:idUpdate API key
DELETE/v1/api-keys/:idRevoke API key

SDKs

We provide official SDKs for popular languages. See SDKs & Libraries for installation and usage.