API reference
Introduction
The Deckle REST API is organized around resources, uses predictable JSON, and is authenticated with a secret key.
Every dashboard feature is available over HTTP. The API speaks JSON, returns conventional status codes, and is served from a single base URL.
Base URL#
bash
https://app.getdeckle.com/api/v1The official Node.js SDK targets this URL by default. All requests must be made over HTTPS.
Authentication#
Authenticate with a secret API key in the Authorization header as a bearer token. Deckle issues secret keys only.
curl https://app.getdeckle.com/api/v1/emails \
-H "Authorization: Bearer sk_live_9a8b7c6d..."Keep keys server-side
A secret key can send email and read your data. Never expose it in client-side code. See Authentication.Responses#
All responses are JSON. Successful requests return a resource object (or, for list endpoints, a data array with cursor metadata). Errors return an error string with an appropriate HTTP status.
json
{
"id": "email_9f2c1a8b",
"status": "sent",
"message_id": "0000018f-...-amazonses"
}