Skip to main content

API Reference

Nexus exposes a REST API via Supabase Edge Functions and the Supabase auto-generated PostgREST API. This section covers authentication, conventions, and the public OpenAPI specification.

In this section

API base URLs

ServiceBase URLDescription
Edge Functionshttps://<project-ref>.supabase.co/functions/v1/Custom serverless endpoints
PostgRESThttps://<project-ref>.supabase.co/rest/v1/Auto-generated CRUD from database
Authhttps://<project-ref>.supabase.co/auth/v1/Supabase Auth endpoints
Storagehttps://<project-ref>.supabase.co/storage/v1/File uploads and downloads

Replace <project-ref> with your Supabase project reference. Exact URLs are provided during onboarding and are not published publicly.

Security model

All API requests require a valid bearer token. Nexus uses two types of tokens:

  1. User JWT — issued by Supabase Auth after login. Contains user_id, organization_id, and role. Used by the frontend and by third-party integrations.
  2. Service Role Key — a privileged key for server-to-server operations. Never exposed to clients or public documentation.

Every write endpoint is explicitly marked "Auth Required" in the specification. Read endpoints also require authentication unless explicitly marked as public (e.g., webhook receivers with verify-token validation).

Endpoint tags

The OpenAPI specification organizes endpoints into these tags:

TagDescription
AuthAuthentication and session management
ContactsContact (customer) CRUD and search
MessagesSend and receive messages across channels
OrdersOrder management and lifecycle
InventoryStock, warehouse, and bin operations
ShippingAWB creation, tracking, labels
VoIPCall initiation, CDR, extensions
AIAI annotation, insights, embeddings
AutomationWorkflow rules and execution
IntegrationsIntegration setup and sync