Skip to content
ViralSyncViralSync Docs
API

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:

PlanActive keys
Free1
Starter3
Team5
Agency10

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.

ScopeOpens
brands.readListing brands and reading one brand
channels.readListing a brand's channels
assets.readListing and downloading media
assets.writeUploading and deleting media
posts.readReading drafts
posts.writeCreating, changing, validating and deleting drafts
publications.readReading publications and their attempts
publications.writePublishing, scheduling, rescheduling, cancelling and retrying
analytics.readReading analytics for a brand, a channel or a publication
usage.readReading 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}/…