Authentication and scopes
How organization API keys work, what each scope opens and what a key can never reach.
API keys
An API key belongs to one organization. An owner or an admin creates it in the app, in the organization's Settings on the Developers tab. The key is shown once and never shown again. If a key is lost, revoke it and create a new one.
A key looks like this:
vsk_1a2b3c4d_<43 more characters>The eight characters after vsk_ are the key's public prefix. It identifies the key without
revealing the secret.
Send the key with every request:
Authorization: Bearer vsk_1a2b3c4d_…A key can have an expiry date, and it can be limited to some of the organization's brands. A key
limited to brands answers 403 for every other brand.
The number of active keys depends on the plan:
| Plan | Active keys |
|---|---|
| Free | 1 |
| Starter | 3 |
| Team | 5 |
| Agency | 10 |
Paths
Every route a key can call starts with the organization:
/v1/organizations/{organization}/…For a key, {organization} must be the organization id, the value that starts with ws_. The
prefix is historical and names an organization. A key used with another organization's id answers
404.
Scopes
A scope is a resource and a verb. Each route needs exactly one scope. A write scope also allows
reading the same resource, so posts.write covers posts.read.
| Scope | Opens |
|---|---|
brands.read | Listing brands and reading one brand |
channels.read | Listing a brand's channels |
assets.read | Listing and downloading media |
assets.write | Uploading and deleting media |
posts.read | Reading drafts |
posts.write | Creating, changing, validating and deleting drafts |
publications.read | Reading publications and their attempts |
publications.write | Publishing, scheduling, rescheduling, cancelling and retrying |
analytics.read | Reading analytics for a brand, a channel or a publication |
usage.read | Reading the organization's usage |
There is no scope for changing brands or channels: a key can read them, and people manage them in the app.
What a key can never reach
These parts of the API are closed to keys whatever scopes they hold. A request answers 403 with
the message that the endpoint is not available to API keys.
- Members and invitations
- Billing
- API keys themselves
- Connections to social platforms
- Ideas
- The assistant and content suggestions
- Anything outside
/v1/organizations/{organization}/…