Skip to content
ViralSyncViralSync Docs
API

Errors and limits

The error format, safe retries with idempotency keys, rate limits and plan limits of the API.

Error format

Every error has the same shape. code is stable and meant for your script; message is meant for a person.

{ "error": { "code": "forbidden", "message": "This API key does not have the posts.write scope." } }

Request bodies are JSON with strict fields: an unknown field answers 400.

StatusCodeWhen
400validationThe body, a parameter or a header is not valid
401unauthenticatedThe key is missing, wrong, expired or revoked. The answer is the same for each.
403forbiddenThe key lacks the scope, cannot reach this brand, or the endpoint is closed to keys
403feature_not_in_planThe organization's plan does not include the feature
404not_foundThe resource does not exist, or belongs to another organization
409conflictThe request does not fit the resource's current state
409A code ending in _limit_reachedA plan limit is reached; see Plan limits
413payload_too_largeThe request body is too large
415unsupported_media_typeThe content type is not accepted
422idempotency_mismatchThe idempotency key was used for a different request
429rate_limitedToo many requests in one minute
429api_requests_limit_reachedThe organization's API requests for the month are used up
500internalSomething failed on our side

Safe retries

Send an Idempotency-Key header with any request that changes something. Use a value of up to 255 characters that is unique to the action, for example an id from your own system.

  • The same key with the same request returns the first answer again, marked with the header Idempotent-Replayed: true.
  • The same key with a different request answers 422.
  • A request with the same key that is still running answers 409 with the code request_in_progress.

A key is remembered for 24 hours. An answer with a 5xx status is not remembered, so the same key can be sent again.

Rate limits

Each key may make 120 requests per minute. Every answer carries the current state:

HeaderMeaning
RateLimit-LimitRequests allowed per minute
RateLimit-RemainingRequests left in this minute
RateLimit-ResetSeconds until the minute ends

Above the limit, the request answers 429 with rate_limited and a Retry-After header in seconds.

Monthly API requests

Besides the per-minute limit, each plan includes a number of API requests per month for the whole organization, across all its keys.

PlanAPI requests per month
Free3,000
Starter15,000
Team75,000
Agency250,000

When they are used up, requests answer 429 with api_requests_limit_reached and a Retry-After header that points to the start of the next month.

Plan limits

When a request would exceed what the organization's plan allows, it answers 409 with a code that names the limit. The codes a key can meet:

CodeLimit
storage_limit_reachedStored media
upload_limit_reachedUpload volume this month
publication_limit_reachedPublications this month

The message says which limit it was. Retrying does not help until the plan changes or the period ends.