Shots API Authentication

Authentication, API key scopes, signed-in sessions, and rate limits for Shots editor utilities and /api/v1 workspace endpoints.

Shots has two API surfaces. Editor utility endpoints such as /api/screenshot require a signed-in session or a workspace API key with the artifact:read scope, and per-IP limits apply on top. Versioned /api/v1 tenant endpoints require a workspace API key with the declared scope or a signed-in user session with the matching permission.

Create and manage workspace API keys in Settings → Developer API (/settings/developers).

Editor Utility Endpoints

Utility endpoints accept either a signed-in session cookie (used by the browser editor) or a workspace API key with the artifact:read scope in the X-API-Key header.

  • A request with neither credential returns 401 with code unauthorized.
  • There is no free plan: a workspace without an active paid subscription receives 403 with code workspace_feature_not_entitled.
curl -X POST https://shots.playbookmedia.io/api/screenshot \
  -H "X-API-Key: $SHOTS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://example.com"}'

Tenant API Credentials (/api/v1)

Calls to /api/v1/* operate strictly within one workspace. Machine callers send an organization key in X-API-Key; browser callers may use their signed-in session. The server verifies workspace membership, role permission, subtractive permission groups, API-key scope, plan feature entitlement, and metered quotas on every request.

curl https://shots.playbookmedia.io/api/v1/releases \
  -H "X-API-Key: $SHOTS_API_KEY"

Workspace API Key Scopes

Every API key carries an explicit set of scopes. Keys can never approve posts—human approval always requires a signed-in member session.

ScopePermitted actions
artifact:readRead releases, campaigns, the review queue, the publishing schedule, and link previews; sign asset downloads; use the editor utilities.
asset:writeComplete and delete asset uploads.
draft:commentAdd, reply, edit your own comments, and resolve discussions on workspace drafts. Never approves or publishes.
draft:writeCreate, update, and delete content drafts. Posting to your accounts takes its own scope.
onboarding:runRead a product site into its profile and follow the run.
post:deleteDelete posts that Shots published from their platforms, with their thread parts, replies and reposts. Each delete is audited.
post:publishWrite and publish new posts to the accounts of your shared social sets, right away or at a time, with no review by a person unless the workspace requires approval. Cancelling them takes the scheduling scope too.
post:scheduleSchedule campaign posts and visuals a person approved, and cancel scheduled posts. It never approves anything.
queue:writeChange future posting-slot suggestions and time zones. Does not approve, schedule, or move existing posts.
release:createCreate releases and draft campaigns, and submit drafts for review.
source:writeRegister and update release-intake sources.
upload:signSign asset uploads.

Rate Limits

EndpointLimitNotes
POST /api/screenshot20 requests per minute per IPReturns 429 with Retry-After and X-RateLimit-* headers
POST /api/exportUnmetered per-IPBounded by request body size and server processing time
GET /api/tweet/{id}Unmetered per-IPBounded by the upstream syndication API
GET /api/image-proxyUnmetered per-IPRestricted to an allowlist of Twitter media hosts
/api/v1/* writesPlan-based api:write:minute quotaEnforced per workspace in Redis
MCP server calls60 calls per minute per keySame scope, plan, and quota checks as /api/v1

Handling 429 Responses

When a rate limit is exceeded, the response carries Retry-After (in seconds) alongside X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset. Wait for Retry-After before retrying:

{
  "error": "Rate limit exceeded. Please try again later.",
  "code": "rate_limited",
  "message": "Rate limit exceeded. Please try again later.",
  "hint": "Wait 42 seconds, then retry. This endpoint allows 20 requests per minute per IP address.",
  "status": 429,
  "documentation": "https://shots.playbookmedia.io/docs#errors",
  "retryAfter": 42
}

Credentialed Maintenance Endpoints

Internal cache-maintenance endpoints require a maintainer secret and are deliberately excluded from the public OpenAPI specification.

Next Steps