OmniSocialsOmniSocials
DocumentationAPI reference
Help centerSupport
  • Documentation
  • API reference
Developers
  • Quickstart
  • API reference
  • SDKs
  • MCP server
  • CLI
For AI agents
  • Docs for AI agents
  • llms.txt
  • OpenAPI spec
  • Postman collection
Product
  • OmniSocials
  • Pricing
  • Changelog
  • Help center
Company
  • Support
  • Privacy policy
  • Terms of service

© 2026 OmniSocials

OmniSocials on GitHubOmniSocials on XOmniSocials on LinkedIn
Overview
Get started
    QuickstartAuthenticationTest without publishingRate limits and errorsRetries and duplicatesVersioning
SDKs
CLI
MCPDocs for AI agentsWebhooks
Guides
Platforms
Integrations
Connect
Migrate
Plans and billing
GlossaryChangelogAPI reference
Get started

API authentication and API keys

Every OmniSocials API request requires a Bearer token in the Authorization header. Tokens are long-lived API keys created from the dashboard.

Text
Authorization: Bearer omsk_live_<YOUR_KEY>

Create an API key

  1. Sign in to app.omnisocials.com
  2. Open Settings → API
  3. Click Create API Key
  4. Name the key (e.g. "Zapier", "Internal automation"), pick the scopes it needs, and save
  5. Copy the key and store it somewhere safe. Members who can manage the organisation's API can copy it again later from the key list under Settings → API

Every key starts with omsk_live_ and works on your real, connected social accounts. There is no separate test environment or test key, so point CI and local development at a workspace whose accounts you can post to safely, or create drafts (they never publish on their own).

Scopes

Every key is scoped to a subset of the API. A key only has access to the scopes you selected when you created it.

ScopeGrants access to
posts:readGET /posts, GET /posts/:id
posts:writePOST /posts/create, PATCH /posts/:id, DELETE /posts/:id, publish endpoints
media:readGET /media, GET /media/:id, GET /folders, POST /media/check
media:writePOST /media/upload, POST /media/upload-from-url, PATCH /media/:id, DELETE /media/:id
accounts:readGET /accounts, GET /accounts/:id
analytics:readGET /analytics/* endpoints, GET /posts/recent-platform. The overview, account numbers, tag comparison, Update now and GET /posts/recent-platform also need the View analytics permission (access_analytics) for the person who created the key, as the Analytics pages in OmniSocials (Analytics)
webhooks:manageFull CRUD on webhooks, including secret rotation
inbox:readOpt-in. GET /inbox/*: conversations, messages, and the next unanswered item
inbox:writeOpt-in. Replies, marking read, hiding and deleting comments
automations:readOpt-in. GET /automations, GET /automations/:id, and the activity log
automations:writeOpt-in. Create, update, and delete automations, and comment_dm_automation on posts
accounts:writeOpt-in, the Credits and X statistics switch. PATCH /accounts/:id: how often an X account's statistics are read, which changes what it costs in credits (X statistics). The key's creator needs billing rights (manage_billing)
credits:readOpt-in, the same Credits and X statistics switch. GET /credits: the credit balance and the X statistics use. The key's creator needs billing rights (manage_billing)

The first seven scopes are the default set. The inbox, automation and credits scopes are opt-in: turn on Social Inbox access, Automations or Credits and X statistics (accounts:write and credits:read) when you create the key. Existing keys never get them automatically.

Requests made with a key missing the required scope return 403 Forbidden with the code insufficient_scope. The message names the missing scope and, for an opt-in scope, the switch that adds it:

JSON
{ "error": { "code": "insufficient_scope", "message": "This API key does not have the 'inbox:read' scope. The inbox scopes are opt-in: create a new API key with Social Inbox access switched on in OmniSocials (Settings, API)." } }

Add the missing scope by creating a new key, not by editing an existing one.

API metadata

The scopes are machine-readable too. In the OpenAPI document, every operation names the scope it needs in x-required-scopes (an empty list means any valid key), and x-scopes on the bearerAuth security scheme describes every scope and says which are opt-in.

The API also publishes its RFC 9728 protected resource metadata at https://api.omnisocials.com/.well-known/oauth-protected-resource/v1: the resource https://api.omnisocials.com/v1, the scopes a key can hold, and that the key goes in the Authorization header. Every 401 points there:

Text
HTTP/1.1 401 Unauthorized WWW-Authenticate: Bearer realm="OmniSocials API", resource_metadata="https://api.omnisocials.com/.well-known/oauth-protected-resource/v1", error="invalid_token"

error="invalid_token" is there when a key was sent and refused; without an Authorization: Bearer header it is left out. A 403 insufficient_scope carries error="insufficient_scope" and the missing scope, for example scope="posts:write". On https://api.omnisocials.com/v1 the REST API takes API keys only, so its metadata names no authorization server (see OAuth 2.0 below).

OAuth 2.0 (beta)

OAuth access tokens on the REST API are in beta and work only where they are switched on: today that is the OmniSocials staging servers, for testing. On https://api.omnisocials.com/v1 the API takes API keys only, and the steps below do not work there yet. API keys keep working everywhere.

Where it is switched on, an app can call the API for a person with an OAuth 2.0 access token instead of an API key. The person allows the app on the OmniSocials consent page; nobody copies a key.

  1. Discover. The API metadata at /.well-known/oauth-protected-resource/v1 of the API host you call names the resource (resource) and the authorization server (authorization_servers). The authorization server's metadata (/.well-known/oauth-authorization-server on that server) lists the authorization, token, registration and revocation endpoints and the API scopes in scopes_supported.
  2. Register the app with dynamic client registration (RFC 7591), or reuse a client you registered before.
  3. Authorize with the authorization code flow and PKCE (S256 only). Send the resource of the host you call (RFC 8707): https://stagingapi.omnisocials.com/v1 on staging, and https://api.omnisocials.com/v1 on production once OAuth is on there. A token works only on the host of its resource. Send the scopes you need in scope, space separated. Without scope the app asks for the default set of a key.
  4. Consent. The person signs in, picks the workspaces the app may reach, reads each scope in plain words and switches on the opt-in scopes (inbox, automations, credits and X statistics) they allow. A :write scope also gives its :read scope, as for a key: the page shows the read scope as included, and the token holds both. As for an API key, their role must allow API access (manage_api) and each scope in every workspace they pick.
  5. Token. Exchange the code at the token endpoint with the code_verifier and the same resource as in step 3. The answer holds access_token (valid 1 hour), refresh_token, scope (what the person allowed) and workspace_ids (the workspaces the token reaches).

Call the API with the token as a Bearer token:

Text
Authorization: Bearer <access token> X-Workspace-Id: 1234

X-Workspace-Id picks one of the token's workspaces. Without it the call goes to the lowest id in workspace_ids, and never to another workspace: when the person loses that workspace, the call is refused. Every call checks the person's role again, so a token never does more than the person may do in OmniSocials.

AnswerWhen
401 invalid_tokenThe token is unknown, expired or revoked, or it was made for another resource (for example an MCP connection to mcp.omnisocials.com)
403 insufficient_scopeThe token lacks the scope; WWW-Authenticate names it, as for a key
403 insufficient_permissionThe person's role no longer allows the action or API access
403 workspace_not_allowedX-Workspace-Id is not one of the token's workspaces, or the person can no longer open it

A refresh (grant_type=refresh_token) may ask for fewer scopes, never for more (400 invalid_scope), and keeps the resource of the authorization (400 invalid_target for another one). The person ends the app's access in Settings → Integrations, where it shows as API access; the app can also call the revocation endpoint.

When a key stops working

A key acts as the person who created it, in the workspace it was made for. Every request checks that this person still belongs to the workspace and still holds Manage API keys (manage_api) in the organisation that owns the workspace. When an admin removes the person, or takes Manage API keys off their role, the key stops at the next request with 401 invalid_api_key, the same answer as a revoked key. Give the permission back and the same key works again. Owners and admins hold every permission, so their keys are not affected. The other permissions of the role are checked per request too: an action the role no longer allows answers 403 insufficient_permission.

Rotating and revoking keys

Revoke a key from Settings → API at any time. Revocation is immediate. In-flight requests using a revoked key fail with 401 Unauthorized on the next call.

To rotate a key without downtime, create the new key first, update your integration, and only then revoke the old key. A webhook belongs to the key that made it (or last changed its URL or events, or switched it on), and revoking that key switches the webhook off. Before you revoke the old key, move each webhook to the new key: PATCH /webhooks/{id} with {"is_active": true}, sent with the new key. This applies to keys revoked, deleted or expired from 2026-11-26 on: webhooks of keys revoked before that date keep working.

Security notes

  • Never commit API keys to source control. Load them from environment variables or a secrets manager.
  • Give the keys you use in local development and CI only the scopes they need, and revoke them when a project ends.
  • A compromised key can do anything its scopes allow. Scope keys narrowly.
  • Tokens do not expire automatically. Rotate them periodically as a hygiene practice.
Last modified on December 2, 2026
QuickstartTest without publishing
On this page
  • Create an API key
  • Scopes
  • API metadata
  • OAuth 2.0 (beta)
  • When a key stops working
  • Rotating and revoking keys
  • Security notes
JSON