Authentication and scopes

Every request carries an API key, and each key holds only the scopes you give it.

API keys

Send the key as a bearer token. It reads omn_ followed by 43 characters and belongs to one organisation, so a request needs nothing else to say which one.

curl https://api.omnio.sawego.com/v1/contacts \
  -H "Authorization: Bearer $OMNIO_API_KEY"

Owners and admins create and revoke keys in Settings, API keys. Omnio keeps only a SHA-256 of the key and shows it once. Revoking takes effect on the next request. A key cannot create keys or manage webhook endpoints.

Scopes

Each route in the reference names the scope it needs. Give a key the fewest that do the job.

ScopeAllows
messages:readRead messages and download their files
messages:writeSend messages and reactions, and upload files
conversations:readList and read conversations, notes and activity
conversations:writeChange status and assignee, add notes
contacts:readRead contacts, tags, stages and custom fields
contacts:writeCreate, change, tag, block and delete contacts
crm:adminManage tags, lifecycle stages and custom fields
content:readRead templates and snippets
imports:writeImport contacts and manage mappings
settings:readRead the organisation, members, teams and channels
settings:writeNo public route uses it yet

Search takes contacts:read, messages:read or both, and returns the groups the key may read.

When a key is refused

StatusCodeMeaning
401unauthorizedThe key is unknown or revoked, or the header is missing
403insufficient_scopeThe key lacks the scope this route needs
NextIdempotency