API Keys
Use API keys to access Shortn programmatically — for example, to create links, send conversions or read analytics from a script or backend. Manage them from Profile → API keys.
Create a key
- Choose Create API key.
- Name the key so you can tell later where it’s used.
- Choose its Data access: Account-wide, or one workspace (see below).
- Optionally set when it Expires. The key stops working at the end of that date.
- Choose its Permissions, or start from a preset:
- Conversion: read and write conversions, for sending leads and sales from your backend.
- Full access: every permission. On a workspace key it leaves out editing custom domains, which needs an account-wide key.
- Choose Create API key, then copy the secret.
The secret is shown only once. Shortn stores keys hashed, so if you lose one, create a new key and revoke the old one. Next to the secret, Copy env gives you both values as environment variables:
SHORTN_API_KEY="sk_live_..."
SHORTN_API_BASE="https://app.shortn.link"Keys begin with sk_live_. Keep them on your server, never in browser code.
Data access
- An Account-wide key works in every workspace you belong to.
- A workspace key works only in that workspace, and is refused for anything in another one. You can create one for a workspace where you’re an owner, administrator or collaborator. Its rate limits follow the workspace owner’s plan. It stops working if you leave the workspace.
A key never sees more than you do: links limited to teams you aren’t in stay hidden, unless you’re a workspace owner or administrator.
Permissions
Each permission is a scope. Edit doesn’t include Read, so a key that changes links and lists them needs both.
| Permission | Read | Edit |
|---|---|---|
| Links | links:read | links:write |
| Analytics | analytics:read | — |
| Conversions | conversions:read | conversions:write |
| Tags | tags:read | tags:write |
| UTM templates | utm-templates:read | utm-templates:write |
| Reports | reports:read | reports:write |
| Destinations | destinations:read | destinations:write |
| Workspace details | workspaces:read | — |
| Teams | teams:read | teams:write |
| Custom domains | domains:read | domains:write (account-wide keys only) |
Authentication lists the endpoints each scope unlocks. Give each key the narrowest permissions it needs.
Manage keys
Existing keys lists each key’s name, prefix, permissions, data access, creation date and last use, and whether it’s Active, Revoked or Expired.
- Revoke a key you no longer use. Integrations using it stop working right away.
- Delete a revoked key to remove it from the list for good. This can’t be undone.
Rate limits
Each key has a per-minute limit for general endpoints and a lower one for analytics and conversion reads, set by your plan. See rate limits for the numbers and the response headers.