Skip to content

Getting started

Authentication

Every request belongs to one workspace. Create keys in the dashboard under Settings → Developer. There are two kinds:

  • Workspace key. Send x-api-key and x-client-code. Full access to the workspace: it acts as the owner.
  • Scoped key. erix_<scope>_… sent as Authorization: Bearer. Limited to one module (crm, flow, connect, storage) or a sub-scope such as erix_connect_whatsapp_…. Revocable, and the right choice for integrations. Scoped keys can’t perform admin-only actions.

Keep keys on your server. Never put a key in browser code or in a NEXT_PUBLIC_* variable. In a browser, use the SDK’s proxy mode: requests go to your own route, which checks your user and adds the key server-side.

Base URL: https://api.ecodrix.com/v1/api. Paths are grouped by domain: /product/erix/* (CRM, events, invoices), /product/flow/* (automations), /platform/inbox/* (inbox), /infra/connect/* (channels, Meet) and /infra/storage/* (files). The SDK sets the base URL for you.

Headers
# Workspace key
x-api-key: YOUR_API_KEY
x-client-code: ERIX_CLNT_XXXXXX

# Scoped key
Authorization: Bearer erix_crm_YOUR_SECRET
Browser (proxy mode)
// No key in the page
const ecod = new ECODrIxAPI({
  proxy: {
    url: "/api/erix", // your server route adds x-api-key / x-client-code
    ticket: () => fetch("/api/erix/ticket").then((r) => r.text()), // optional, for realtime
  },
});