Security
Keep your API key on your server, give it only the scopes it needs, and check every callback came from us.
Your API key can create slices that count against your plan. Anyone who has it can do the same. This page covers where the key lives, how to narrow what it can do, and how to prove a callback is real.
Keep the key on your server
Keys start with sk_live_ and go in the Authorization header:
curl https://api.superslice.co/v1/engines \
-H "Authorization: Bearer $SUPERSLICE_API_KEY"Call the API from your backend. A key in browser JavaScript, a mobile app or a public repo is a key anyone can copy. If your shop page needs a quote, send the upload to your server and let it call Superslice.
We show the full key once, when you create it. After that the console shows only its first characters, and we store a hash, so we can't show it to you again either. Lost it? Create a new one.
Give a key only the scopes it needs
| Scope | Lets the key |
|---|---|
slices:write | Create slices, delete models, upload and change presets, set pricing rules and slicer versions |
slices:read | Read slices, models, presets, pricing rules and slicer versions |
catalogue:read | List engines and their printers, processes, filaments and plate types |
New keys get all three. A storefront that only quotes needs slices:write and slices:read. A script that keeps your settings list fresh needs only catalogue:read. Each endpoint in the API reference names its scope. A key without it gets forbidden.
Rotate and revoke
A key can expire after 30, 90, 180 or 365 days, or never. Pick one when you create it. We email your organisation's owners and admins a week before a key expires, and after that it gets unauthorized.
To rotate, create the new key, deploy it, then revoke the old one in the console under API keys. Revoking takes effect on the next request, which gets unauthorized.
Keys act for the organisation, not for a person. When someone leaves, their keys keep working until you revoke them. See Roles for who can create and revoke keys.
Check that a callback came from us
Anyone who learns your callback URL can post to it. Every real callback carries a Superslice-Signature header signed with your org's signing secret. Check it before you trust the body. Callbacks shows how, and every SDK has a verify that does it for you.
Callback URLs must be HTTPS and resolve to a public address.
If a key leaks
- Revoke it in the console. It stops working on the next request.
- Create a new one and deploy it.
- Look in the console under Jobs and Usage for slices you didn't make.
- If it was committed to a repo, remove it from the history too. A revoked key is harmless, but it tells people where to look next time.
Email hello@superslice.co if you see usage you can't explain.