OmniManager Docs

Getting started

Getting started with the OmniManager API

Authentication, the response envelope, permissions and rate limits shared by every /api/v1 route.

Getting started

The OmniManager public API (/api/v1/**) gives programmatic access to a tenant's account with a per-tenant API key: shops, WhatsApp connection and sending, statuses, groups, and consent management — with the platform's anti-ban policy enforced on your behalf on every send.

Base URL: https://<your-omnimanager-host>/api/v1

Authentication

Create a key in Settings → API (requires canEditSettings), or ask an OmniManager admin to mint one for your tenant. The raw key (omk_live_…) is shown once; only its SHA-256 hash is stored, so if you lose it you must rotate, not "recover" it.

Send it on every request:

Authorization: Bearer omk_live_YOUR_KEY

(x-api-key: omk_live_YOUR_KEY is accepted as an alias.)

A key can hold an expiry and an IP allowlist; revoking a key (from Settings or the admin) takes effect immediately — the next request with that key fails 401 API_KEY_REVOKED.

Permissions

Every route requires one permission from this list (src/libs/api-keys/permissions.ts); a key only has the ones it was granted:

PermissionGrants
shops.readlist/read shops
shops.writecreate shops
whatsapp.readread WhatsApp channel state
whatsapp.connectstart/poll/stop the WhatsApp connection
messages.sendsend WhatsApp messages
messages.readread message/delivery state
statuses.postpost a WhatsApp status
contacts.readlist declared (consented) contacts
contacts.writedeclare / revoke consented contacts
groups.readlist the shop's WhatsApp groups

GET /me needs none of these — a key with a single permission can still verify itself.

Envelope

Every response is one of two shapes:

// success
{ "success": true, "data": { /* … */ } }
// error
{ "success": false, "error": { "code": "DAILY_CAP_REACHED", "message": "…", "retryAfter": 3600 } }

Every response carries X-Request-Id (echoed back if you send one) and, once authenticated, X-RateLimit-Limit / Remaining / Reset / Scope for the bucket that request just consumed.

Common error codes

HTTPcodemeaning
401API_KEY_MISSING / API_KEY_INVALID / API_KEY_REVOKED / API_KEY_EXPIREDkey problems
402 / 429QUOTA_EXCEEDEDplan quota or capability spent
403IP_NOT_ALLOWED / TENANT_INACTIVE / FORBIDDEN_PERMISSIONaccess denied
404SHOP_NOT_FOUND / MESSAGE_NOT_FOUND / DOC_ARTICLE_NOT_FOUND
409AMBIGUOUS_SHOPseveral shops share that name — pass the id instead
409WHATSAPP_NOT_CONFIGUREDGET connect before any POST connect
422VALIDATION_ERRORbody/query invalid (error.fields)
429RATE_LIMITEDper-key minute/hour/day limit (Retry-After)
429anti-ban policy codessee Messaging & the anti-ban policy
503BOT_SERVICE_UNREACHABLE / WHATSAPP_NOT_CONNECTED / WHATSAPP_SESSION_LOSTsession / bot down

Rate limits and metering

Per key, by default: 60/min, 1 000/h, 10 000/day (see X-RateLimit-* headers on every response; a breach returns 429 RATE_LIMITED with Retry-After). Every call counts toward the plan's api_calls allowance, visible in GET /me; every request is logged (route template, status, latency, IP — never the request body) and visible to OmniManager admins.

First call

curl -s -H "Authorization: Bearer omk_live_YOUR_KEY" https://app.omni-manager.com/api/v1/me

returns your key's permissions, rate limits and remaining api_calls quota.

MarkdownOpenAPI schema