πAuthentication
Authenticate with API keys or session tokens, choose a key's access, manage keys, and know which actions refuse keys.
- Written for
- Developers calling the Shippified API
- Applies to
- All plans
Every authenticated endpoint reads one header:
Authorization: Bearer <token>Shippified accepts two kinds of token in that header. Use an API key for anything you write: scripts, servers, the SDK, the MCP server. Session tokens are what the dashboard and mobile app get when a person signs in.
Token | Format | Lifetime | Where it comes from | Use it for |
|---|---|---|---|---|
API key |
| Until you revoke it | Settings β Developer, or | Your code, the SDK, the MCP server |
Session token | 64 hexadecimal characters | 14 days from sign-in; activity doesn't extend it | Signing in to the dashboard | The dashboard and mobile app |
The server tells them apart by prefix: a token that starts with sk_ is looked up as an API key, and anything else as a session token. Cookies and query-string tokens are never read.
A Read & write key can read every order, change or delete orders, and create webhook subscriptions. Even a Read-only key can read everything in the workspace. Keep every key out of source control, browser code and mobile apps.
What a key is allowed to do
Every API key has one of two access levels, its scope. You pick it when you create the key and can't change it later; to change access, create a new key and revoke the old one.
Scope | In the dashboard | Allowed requests | Refused |
|---|---|---|---|
| Read-only |
| Every other method: |
| Read & write | Every method, including creating, editing and deleting orders, sources, bots, templates, subscriptions and webhook subscriptions | Creating or revoking API keys (see below) |
Two rules apply to every key, whatever its scope:
No API key manages API keys.
POST /api/account/api-keysandDELETE /api/account/api-keys/:idwith ansk_key return403 {"error": "API keys can't manage API keys β use the dashboard."}. Listing keys (GET) is allowed. Create and revoke keys in the dashboard, or with a session token.No API key exports or deletes the account. Those return
401; see Actions that refuse API keys below.
Keys created before scopes existed have no stored scope and behave as Read & write; the API reports them as "scope": "write".
Create an API key in the dashboard
- Open the Developer tab
Click Settings in the sidebar, then the Developer tab. The API keys card is at the top.

- Name the key
Under Mint a new key, type a label that says where the key will live, such as
Production SDKorn8n workflow. The label is only for you. If you leave it empty the button stays disabled; through the API an empty name becomesUntitled key. - Choose its access
Below the name, pick Read-only (selected by default) or Read & write. The line underneath explains the choice: "GET requests only β anything that changes data gets a 403." or "Reads and changes data, including webhook subscriptions. Can't create or revoke API keys." Pick Read & write for the SDK or MCP server if they need to add or change anything.
- Create and copy it
Click Create key. A panel titled "Save this key now β it won't be shown again." shows the full key and its access (for example "Access: Read-only."). Click Copy, paste the key somewhere safe (a password manager or your secrets store), then click I've saved it to hide it.

- Check it's listed
The key now appears under Active keys with its name, its first 11 characters (for example
sk__uMF392zβ¦), its access (Read-only or Read & write) and its creation date.
The eye button (Inspect key) shows the key's ID, its Access, and a reminder that the secret can't be recovered. The bin button (Revoke key) asks "Revoke this API key?" and, once you confirm with Revoke key, the key stops working at once: "Any scripts using it will start getting 401s immediately."

Manage keys through the API
Creating and revoking keys needs a signed-in session token; an API key gets 403 {"error": "API keys can't manage API keys β use the dashboard."}. In practice, create and revoke keys in Settings β Developer. Any API key can list keys.
Create a key
POST /api/account/api-keys
Body field | Type | Required | Notes |
|---|---|---|---|
| string | No | Trimmed and cut to 80 characters. Empty or missing becomes |
|
| No | Defaults to |
- curl
- TypeScript SDK
- MCP
curl -s -X POST https://shippified.net/api/account/api-keys \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Inventory sync","scope":"read"}'// The client must be built with a session token, not an sk_ key.
const { key, record } = await shippified.apiKeys.create("Inventory sync", { scope: "read" });
// `key` is the raw sk_β¦ value. It is never returned again."Create a read-only Shippified API key called Inventory sync." (tool create_api_key, arguments name and optional scope; works only when the MCP server runs with a session token)
Response 201 Created:
{
"key": "sk_3kq9V0xExampleExampleExample1234",
"record": {
"id": "key_m1x2y3z4_a1b2c3",
"name": "Inventory sync",
"prefix": "sk_3kq9V0xE",
"scope": "read",
"createdAt": "2026-09-24T15:02:11.482Z"
}
}Store key right away. The server keeps only a SHA-256 hash of it plus the 11-character prefix.
List keys
GET /api/account/api-keys returns { "items": [ β¦ ] }. Each item has id, name, prefix, scope ("read" or "write"), createdAt and, once the key has been used, lastUsedAt (updated on every request that authenticates with it). The list isn't paginated: an account can hold at most 25 keys. The hash is never returned.
- curl
- TypeScript SDK
- MCP
curl -s https://shippified.net/api/account/api-keys \
-H "Authorization: Bearer $SHIPPIFIED_API_KEY"const { items } = await shippified.apiKeys.list();"List my Shippified API keys." (tool list_api_keys)
Revoke a key
DELETE /api/account/api-keys/:id with a session token returns 200 {"ok": true}, or 404 {"error": "API key not found"}. The next request with that key gets 401. The Revoke key button in the dashboard does the same.
- curl
- TypeScript SDK
- MCP
curl -s -X DELETE https://shippified.net/api/account/api-keys/key_m1x2y3z4_a1b2c3 \
-H "Authorization: Bearer $SESSION_TOKEN"// Session-token client only.
await shippified.apiKeys.delete("key_m1x2y3z4_a1b2c3");"Revoke the API key key_m1x2y3z4_a1b2c3." (tool revoke_api_key; session token only)
Rotate a key
Keys can't be rotated in place. Instead:
Create a new key with the same access.
Deploy it everywhere the old one is used.
Watch the old key's
lastUsedAtstop changing, then revoke it.
Limits
Rule | Value |
|---|---|
Keys per account | 25. Creating a 26th returns |
Expiry | None. A key works until revoked. |
Name length | 80 characters |
Scope | Set at creation; can't be changed |
Session tokens
People sign in to the dashboard through Shippified's sign-in service at auth.shippified.net (email and password, email code, Discord or Google), or with the older Use your password instead form. Each path ends with the server issuing a session token, which the web app keeps in the browser's local storage and sends as a bearer token.
The endpoints that issue sessions are built for the dashboard, not for scripts: they need a human (a sign-in service token, an OAuth consent, or a Cloudflare Turnstile check when the deployment has one configured). Use an API key for programmatic access.
Endpoint | Body | Success |
|---|---|---|
|
|
|
|
|
|
|
|
|
Wrong credentials:
401 {"error": "Invalid email or password"}.Missing or failed Turnstile check:
400with the reason.These endpoints share a rate limit of 10 requests a minute per client IP; over it you get
429withRetry-After: 60.
Sessions expire 14 days after sign-in. To end one early, send it to DELETE /api/auth/session, which deletes the token in the header and always returns 200 {"ok": true}. It doesn't touch API keys.
Check who you are
GET /api/auth/me accepts either token type and returns { user, state }: the account and a full workspace snapshot.
- curl
- TypeScript SDK
- MCP
curl -s https://shippified.net/api/auth/me \
-H "Authorization: Bearer $SHIPPIFIED_API_KEY" | jq '.user'const state = await shippified.getState(); // GET /api/state; state.user is the same object
console.log(state.user.webhookHandle);"Show my Shippified account details." (tool get_state)
user contains id, username, email, displayName, createdAt, publicProfile, publicStats, webhookHandle, timezone, plan, subscriptionStatus, subscriptionPeriodEnd, subscriptionPriceId and emailVerified. You need webhookHandle to build Discord intake URLs; see Getting orders in.
Actions that refuse API keys
Two account endpoints accept only a signed-in session. They refuse any sk_β¦ key with 401, so a leaked key can't download everything or destroy the account. In the dashboard they live under Settings β Profile.
Endpoint | What it does | Error with an API key |
|---|---|---|
| Downloads everything the account owns as JSON |
|
| Permanently deletes the account |
|
The export (sent with Content-Disposition: attachment) contains exportedAt, account, settings, orders, emailSources, bots, customTemplates, subscriptions, shares, apiKeys and intakeMessages (the stored emails and webhook posts). Working secrets are left out: no password hash or one-time tokens, no mailbox passwords or OAuth tokens (sources keep only the IMAP host, port, TLS flag and username, or the connected Gmail or Outlook address), no API key hashes, no webhook signing secrets, and Discord webhook URLs are cut to their host.
Deletion needs the account's email typed back:
curl -s -X DELETE https://shippified.net/api/account \
-H "Authorization: Bearer $SESSION_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirmEmail":"you@example.com"}'A missing or different confirmEmail (compared after trimming, ignoring case) returns 400 {"error": "Type your account email exactly to confirm deletion."}. On success (200 {"ok": true}) the account and everything it owns are removed, every session and API key stops working, an active Stripe subscription is cancelled, and the sign-in identity is deleted too.
Account deletion is immediate and can't be undone. Export first if you might want your data. See Account and privacy.
Credentials that aren't bearer tokens
Some URLs carry their own credential because the sender can't set headers. Treat each full URL as a secret.
Credential | Used by | Details |
|---|---|---|
Discord intake URL | Monitor bots | The unguessable handle plus the bot's slug. Never add an API key to it. See Getting orders in. |
Forwarding address | Your mail provider's forwarding rule | The random slug routes mail to one email source. |
Embed copier URL | The embed copier Discord bot | Shown and rotated under Settings β Developer β Embed Copier. See the embed copier guide. |
Webhook signing secret | Shippified, when it calls you | Proves a delivery came from Shippified. See Webhooks. |
When authentication fails
Situation | Status | Body |
|---|---|---|
No |
|
|
Read-only key used for anything but |
|
|
Any API key creating or revoking a key |
|
|
API key used for export or deletion |
|
|
26th API key |
|
|
A bad key and an expired session get the same 401; the response doesn't say which. 403 only ever means the key's scope doesn't allow the request; a resource owned by another account returns 404.
My key worked yesterday and now returns 401
Someone revoked it (check Active keys in Settings β Developer), or you're sending a session token that passed its 14-day expiry. Session tokens start without sk_. Create an API key for anything long-running.
I lost the key right after creating it
It can't be recovered: only a hash is stored. Revoke it and create a new one.
Can I give a teammate or tool read-only access?
Yes: create the key with Read-only. It can read everything in the workspace but gets 403 on any change. Create a separate key per tool so you can revoke one without breaking the others.
My key returns 403
Either it's a Read-only key and the request isn't a GET (create a Read & write key), or you're creating or revoking API keys with a key (do that in the dashboard). The error message says which.
Security checklist
Keep keys in environment variables or a secrets manager. The
sk_prefix makes leaked keys easy to find withgrepor a secret scanner.Use one key per integration, named after it, and make it Read-only unless it has to change data.
Review
lastUsedAtand revoke keys you no longer use.Never put a key in browser or mobile code. The API allows cross-origin calls, but a key in a web page is readable by anyone. Call Shippified from your own backend.