# Stannp: Developer and API reference

> REST API hosts, authentication, test mode, idempotency, rate limits, webhooks, endpoints, SDK and documentation.

## Developer and API reference

- API style: REST over HTTPS, version v1 in the URL path. Requests are form-encoded (application/x-www-form-urlencoded or multipart/form-data, with nested values in bracket notation such as recipient[firstname]); responses are JSON.
- Regional API hosts (use the host for the region your account is on):
  - UK and Europe: https://api-eu1.stannp.com/v1
  - United States: https://api-us1.stannp.com/v1
  - Canada: https://api-ca1.stannp.com/v1
- Authentication: account API key sent as the HTTP Basic Auth username with a blank password, or as an api_key query parameter. HTTPS is mandatory; plain HTTP requests fail. API keys are in the account settings page of the platform. QR code generation uses a separate public key so it can be embedded in artwork.
- Response format: {"success": true, "data": ...} on success; {"success": false, "error": "..."} on failure.
- Test mode: set test=true on create requests to generate a proof PDF without printing, posting or charging.
- Idempotency: create requests accept an optional X-Idempotency-Key header. Keyed requests are stored for 24 hours; a retry within that time with the same key and an identical request body is not processed again and returns the original response with HTTP 409. A retry with a changed body, or after 24 hours, is treated as a new request.
- Rate limits by plan: Starter 300, Growth 600, Premium 2,000 and Enterprise 3,000 requests per minute, reported in X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset headers. The Free plan has no API access.
- Webhooks: events for mailpiece status (printing, dispatched, local_delivery, delivered, returned, cancelled), campaign status and recipient events. Optional HMAC-SHA256 signing in the X-Stannp-Signature header; up to 50 objects per call; 3 retries 30 seconds apart. Available as 2 webhooks on Growth, 4 on Premium and unlimited on Enterprise.
- Uptime: postcard creation API 100.000% (UK) and 99.989% (US) over the 90 days to 19 November 2026; live status at https://status.stannp.com/

### Endpoints

| Resource | Operations |
|---|---|
| Postcards | create, get, cancel (US sizes 4x6, 6x9 and 6x11; UK A6 and A5) |
| Letters | create from template or PDF, post a pre-merged PDF (address read automatically), get, cancel |
| Recipients | list, get, create, delete, bulk import |
| Groups | list, create, add and remove recipients, purge, recalculate, delete |
| Campaigns | list, get, create, sample proof, cost, available dates, approve, book, delete |
| Selections | filtered selections over a group |
| Recipient events | record engagement or conversion events (for example PURCHASE, SIGNUP) against a recipient or your own reference ID |
| Addresses | validate addresses in the UK, US and Canada |
| Reporting | summaries and lists by date range, status and tag |
| Account | balance and top-up |
| Files | upload files and manage folders |
| SMS | send SMS messages |
| Tools | create QR codes, merge PDFs, list templates |

### Documentation and libraries

- API guide (authentication, responses, first mailing, rate limits, idempotency): https://www.stannp.com/us/direct-mail-api/guide (UK: https://www.stannp.com/uk/direct-mail-api/guide)
- Complete machine-readable API reference for AI assistants and coding agents: https://www.stannp.com/stannp-api-llm.md
- Official PHP SDK: https://github.com/Stannp/stannp-php
- Stannp on GitHub: https://github.com/Stannp
- No-code connections: Zapier, Make; native integrations: HubSpot, Klaviyo, Zoho CRM
- Developer help: API tools and logs from Starter; Stannp's API integration team from Growth; technical pre-sales review from Premium

### Quick example

```
curl https://api-us1.stannp.com/v1/accounts/balance -u YOUR_API_KEY:
```

Last updated: 19 November 2026. Index: https://www.stannp.com/llms.txt ; full version: https://www.stannp.com/llms-full.txt
