Skip to content
Platform documentation
API overview
API reference

API overview

Authenticate requests and choose the correct API surface.

Base URLs

SurfaceLocal baseAuthentication
Public entitlement and billing APIhttp://localhost:4001/v1Secret, publishable, or customer-scoped token as permitted by the endpoint.
Policy APIhttp://localhost:4000/v1 through gatewayServer gateway token; browser uses authenticated BFF.
Dashboard BFFhttp://localhost:3000/apiSigned-in dashboard session.
MCPhttp://localhost:4009/mcpemail and wallet-gated OAuth for public remote connections.

Authentication

http
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
CredentialUse
Publishable keyPublic plan listings only. Cannot read private customer access, issue tokens or consume credits.
Secret keyTrusted server operations, plans, checkout, and customer token issuance.
Customer tokenShort-lived token scoped to a provider and holder; revoked when its issuing secret key is revoked.

Create named, expiring provider keys through Dashboard → Developers. Secret keys appear only once and are stored as hashes. Rotate by creating a replacement, updating your integration, then revoking the old key. Internal deployment credentials are never returned. Never paste secret keys into these docs, browser examples, or an assistant chat.

Error format

json
{
  "error": {
    "code": "HOLDER_MISMATCH",
    "message": "grant holder does not match"
  }
}
StatusTypical meaning
400Invalid body, precision, or missing idempotency key.
401 / 403Missing credentials, insufficient scope, or refused access.
402Checkout payment could not yet be verified.
404No matching plan, grant, or resource.
409Conflicting state, reused payment, or unavailable deployment.
502 / 503Upstream failure, configuration issue, or insufficient deployer gas.

Endpoint reference

Authenticated customer billing BFF

RoutePurpose
GET /api/customers?search=&page=0Provider-owned paid customers; 20 records per page.
GET /api/billing-documents?view=issued|purchases&status=ALL&page=0Issued invoices or exact signed-in holder purchases; optional customer filter.
GET /api/billing-documents?id=INVOICE_IDOne private document, visible to issuer, billed holder or authenticated billing email.
GET /api/provider-checkouts?status=ALL&page=0&days=30Provider-scoped checkout cohort; days is 0, 7, 30 or 90.

These routes require the console session and return no-store responses. Ownership is derived server-side. Supplying a provider or holder query parameter cannot broaden scope. They are not public secret-key daemon endpoints.

Bagseven documentationemail and wallet · Avalanche · Registry