API reference · v1

OG Manager REST API

One versioned REST API serves the web app, the mobile apps and your integrations. Every route uses the same permission, entitlement and action-gateway checks as the app. The OpenAPI 3.1 specification is generated from the server and published alongside this page.

Base URL

https://api.ogmanager.com/api/v1

All requests use HTTPS and JSON. Send Accept-Language: en or bn to get messages in English or Bangla. Every response carries an X-Request-Id header; quote it when you contact support.

Authentication

Server integrations use API keys or service accounts. The organization always comes from the key, never from a header you send.

API key format
eos_live_<id>_<secret>   # production
eos_test_<id>_<secret>   # sandbox organization
Request
curl https://api.ogmanager.com/api/v1/entitlements \
  -H "Authorization: Bearer eos_live_<id>_<secret>"
  • The secret is shown once at creation. Only a SHA-256 hash is stored.
  • Keys are scoped (for example data:read, crm:write), metered, rate-limited, can expire and can be revoked at any time.
  • Service accounts add expiry and rotation for long-running server integrations.
  • Send X-Branch-Id: <uuid> to filter to one branch within the key's scope.
  • The API is included on Starter and above. On Free, calls return 402 ENTITLEMENT_ERROR.

Envelope

Every success is wrapped in data and meta. Every error has the same shape.

Success
{
  "data": { "id": "0192f0c4-…", "display_id": "LEAD-000412", "name": "Nusrat Jahan" },
  "meta": { "request_id": "01JB8Z3K6Q2W9Y4T0M5R7N1P8C" }
}
Error
{
  "error": {
    "code": "ENTITLEMENT_ERROR",
    "message": "Your plan does not include this feature.",
    "request_id": "01JB8Z3K6Q2W9Y4T0M5R7N1P8C",
    "details": { "feature": "bos.growth", "upgrade_to": "growth" }
  }
}
Validation error (422)
{
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "The given data was invalid.",
    "request_id": "01JB8Z…",
    "details": { "fields": { "email": ["Enter a valid email."] } }
  }
}

Money is always integer minor units plus an ISO currency code, for example { "amount_minor": 1490000, "currency": "BDT" } for ৳14,900. Records carry id, display_id, branch_id, created_at, updated_at, archived_at, version.

Pagination, filters and sorting

GET crm/leads?limit=50&filter[status]=open&sort=-created_at&q=nusrat
GET crm/leads?cursor=eyJpZCI6…&limit=50
  • Cursor pagination with ?cursor=&limit=, maximum 100. The next cursor is in meta.next_cursor; null means the last page.
  • Filters as ?filter[status]=open, sorting as ?sort=-created_at, search as ?q=.
  • Sparse fields with ?fields= and related objects with ?include=.

Idempotency and concurrency

Retries are safe as long as you reuse the same key for the same logical operation.

Create with an idempotency key
curl -X POST https://api.ogmanager.com/api/v1/crm/leads \
  -H "Authorization: Bearer eos_live_<id>_<secret>" \
  -H "Idempotency-Key: 6f1c2a9e-3b7d-4e0a-9c55-2f8d1b4a7e10" \
  -H "Content-Type: application/json" \
  -d '{"name":"Nusrat Jahan","phone":"+8801711000000","source":"website"}'
  • Idempotency-Key is required on every create, send, pay and action endpoint, and stored for 24 hours.
  • Updates to versioned records send If-Match: <version>. A stale version returns 409 CONFLICT with the current version.

Versioning and long-running work

The API is versioned in the path (/api/v1). No sync, report render or AI call runs inside an HTTP request: long work returns 202 with a job you can poll.

POST reports/0192…/run
→ 202 { "data": { "job_id": "job_01JB…", "status": "queued" } }

GET jobs/job_01JB…
→ 200 { "data": { "id": "job_01JB…", "status": "running", "progress": 40 } }

Error codes

Error codes
CodeHTTPWhen
VALIDATION_ERROR422Input fails validation; details.fields lists each field's messages
AUTH_ERROR401Missing or invalid token
MFA_REQUIRED401Second factor needed; details.mfa_token
EMAIL_NOT_VERIFIED403Billing or invite before verification
PERMISSION_ERROR403Role or branch scope refuses
TENANT_ACCESS_ERROR403Not a member of that organization
ENTITLEMENT_ERROR402Plan does not include it; details.upgrade_to names the cheapest plan that does
PAYMENT_ERROR402Payment failed or past due
NOT_FOUND404No such record in this organization
CONFLICT409Version mismatch or duplicate
CONTACT_SALES409Enterprise-only change
ORGANIZATION_SUSPENDED423Workspace suspended
RATE_LIMIT429Too many requests; Retry-After is set
WEBHOOK_SIGNATURE_ERROR400Webhook signature invalid

Endpoint catalogue

Paths are relative to the base URL. The phase column shows when each group ships; later groups follow the same envelope and conventions.

Endpoint catalogue
GroupEndpointsPhase
AuthPOST auth/signup, auth/login, auth/mfa/verify, auth/refresh, auth/logout, auth/logout-all, auth/password/forgot, auth/password/reset, auth/password/change, auth/verify-email, auth/switch-organization, auth/mfa/setup, auth/mfa/enable, auth/mfa/disable · GET auth/me, auth/sessions, auth/google/start, auth/google/callback · PATCH auth/me · DELETE auth/sessions/{id}1
OrganizationPOST organizations · GET/PATCH/DELETE organizations/current · PUT organizations/current/profile, /security · members, invitations, roles, teams, branches, regions · GET organizations/current/audit-logs · POST invitations/accept1
BillingGET billing/catalog (public), billing/overview, billing/usage, billing/invoices, billing/invoices/{id} · POST billing/quote, billing/checkout, billing/change-plan, billing/cancel, billing/resume, billing/invoices/{id}/pay, billing/addons · POST billing/webhooks/{provider}1
PlatformGET entitlements, notifications, jobs/{id}, health · POST notifications/read, devices (push tokens) · GET/POST/DELETE api-keys1
RecordsGET/POST {module}/{resource}, GET/PATCH/DELETE {module}/{resource}/{id}, POST …/{id}/archive, /restore, /comments, /attachments · GET …/{id}/history · POST imports, exports · GET search?q=2
ApprovalsGET approvals?status=pending · POST approvals/{id}/approve, /reject, /comment2
Business modulestasks, work-diary, contacts, leads, deals, pipelines, appointments, schedules, customer-invoices, customer-payments, conversations, messages2
ConnectionsGET connectors · POST connections/{connector}/authorize · GET connections/callback/{connector} · GET/PATCH/DELETE connections/{id} · GET connections/{id}/accounts · PUT connections/{id}/accounts · POST connections/{id}/sync · GET connections/{id}/runs · POST authorization-links3
Marketing dataGET accounts, campaigns, ad-groups, ads, creatives, posts, audiences, conversions, metrics (with filter[date], group_by)3–4
AnalyticsPOST queries/run · GET/POST saved-queries, dashboards, dashboards/{id}/widgets, reports, report-schedules · POST reports/{id}/run · GET report-runs/{id}/pdf4
AIPOST ai/jobs (goal) · GET ai/jobs/{id} · POST ai/jobs/{id}/approve-plan · GET/POST ai/conversations, ai/conversations/{id}/messages (SSE stream) · GET/POST/PATCH ai/employees, knowledge/documents, ai/profile · GET ai/insights5
ActionsGET actions, actions/{id} · POST actions (preview) · GET/PUT policies6
AutomationGET/POST/PATCH workflows · POST workflows/{id}/validate, /dry-run, /enable, /disable, /run · GET workflows/{id}/runs · journeys, experiments7
Growth, finance, operations, industryad-requests, marketing-campaigns, social-posts, calls, budgets, ledger-accounts, journals, bank-transactions, employees, attendance, leave-requests, payroll-runs, items, stock-movements, purchase-orders, assets, liabilities, patients, treatments, packages, content-items, products, sales-orders, deliveries · POST migrations/pabau8
Open platformdestinations, destination-syncs, webhook-endpoints, webhook-deliveries · POST webhook-deliveries/{id}/replay · POST events (Events API) · service-accounts · MCP at mcp.ogmanager.com9
Agency and enterpriseclients, client-grants, white-label, custom-domains, marketplace, embed-tokens · sso/saml/{org}/acs, sso/oidc/{org}/callback · scim/v2/Users, scim/v2/Groups · ip-allowlist, retention-policies, data-exports10

Webhooks

Outbound deliveries are signed so you can prove they came from OG Manager.

Signature header
Este-Signature: t=<ts>,v1=<hmac-sha256>
  • t is the Unix timestamp of the delivery; v1 is the hex HMAC-SHA256 of <ts>.<raw body> with your endpoint secret.
  • Compare signatures in constant time and reject timestamps older than five minutes.
  • Each delivery carries an event ID, timestamp and version. De-duplicate on the event ID.
  • Retries use exponential backoff for 24 hours; 50 consecutive failures disable the endpoint. Replay with POST webhook-deliveries/{id}/replay.

To send your own website or app events (page view, add to cart, purchase, form submit) for attribution and journeys, use POST events.

Rate limits

Limits apply per key and per endpoint and are returned in X-RateLimit-* headers. When you exceed one you get 429 RATE_LIMIT with a Retry-After header. Monthly API call allowances by plan: Starter 10,000, Growth 100,000, Pro 500,000, Agency 1,000,000, Enterprise unlimited.