Get started
Create an API key
Every request to Postwick is authenticated with a secret key that starts with pw_.
Create a key
Open Settings → API keys in the dashboard.
Choose New key, name it after the service that will use it, and pick a permission.
Copy the key now. Postwick only ever shows it once.
Permission | Can do |
|---|---|
Full access | Create, read, update and delete every resource |
Sending access | Send email, and nothing else |
Treat a key like a password. Never ship it in client-side code or a mobile app — anyone who can read it can send mail as you.
Use it
Send the key as a bearer token:
curl https://api.postwick.dev/emails \
-H "Authorization: Bearer pw_live_4f9c2e7a1b" \
-H "Content-Type: application/json"Rotate a key
Create the replacement, deploy it, then delete the old key. Deleting is immediate: requests made with it start failing with 401 straight away.
Was this page helpful?