Skip to main content
The Alguna Public API is a JSON-over-HTTPS API for the whole quote-to-cash flow: customers, products and plans, subscriptions and their versions, usage events and metrics, credits and wallets, invoices, payments, refunds, tax and revenue schedules. Use it when you want your own systems to drive billing rather than the dashboard — provisioning customers on signup, metering usage, opening checkout, or reading revenue. How those objects relate is described in How Alguna works; the endpoint pages in this section are generated from the current OpenAPI spec.

Base URLs

Sandbox is a separate environment with its own data and its own API keys; a key issued in one environment is rejected by the other. All requests must be made over HTTPS.

Authentication

Every request carries an API key as a Bearer token:
Create and manage keys in the dashboard under Settings → Connections → Developers → API keys. Keys are secrets — keep them server-side, never in a browser or mobile app. A missing or invalid key returns 401.

Versioning

The API is date-versioned. Send the Alguna-Version header on every request to pin the version your integration is written against; the current version is 2026-04-01. Upgrading is a deliberate change to that header, never a side effect of time passing.
Use the version selector in the sidebar to browse the endpoints of a specific version. The TypeScript SDK sets the header for you from its apiVersion option.

Request and response format

  • Request and response bodies are JSON with snake_case field names (customer_id, plan_id). Webhook payloads are the exception — they are camelCase; see Webhooks.
  • Monetary amounts are decimal strings ("99.00"), never floats.
  • Timestamps are RFC 3339 (2026-04-01T10:00:00Z); dates are YYYY-MM-DD.
  • Send Content-Type: application/json on requests with a body.
  • Every response carries an X-Request-Id header — a UUID for that request. Log it and quote it when you contact support.

Filtering and sorting

List endpoints take filters as individual query parameters. Pass one value for an exact match, or comma-separated values for IN-style matching:
Tag IDs can be looked up with List tags. The filter parameters each endpoint accepts are documented on its page. Sorting uses sort=<field>:<asc|desc>, for example name:asc.

Pagination

List endpoints require limit and offset, and most require sort. Send all three on every list request. Responses wrap the page in data and describe it in pagination:
To walk a collection, increase offset by limit until offset / limit + 1 reaches total_pages.

Idempotency

Mutating endpoints (POST, PATCH, PUT, DELETE) accept an Idempotency-Key header so a retried request is applied at most once. POST /events is the exception: each event carries its own unique_id. See Idempotency.

Errors

Failed requests return a JSON body with the HTTP status and a human-readable detail:
Branch on the status code, not on the text of detail. See Errors for typed SDK errors, request IDs and retry guidance.

Other ways in

  • TypeScript SDK@alguna/sdk, one typed method per endpoint.
  • Webhooks — push notifications for subscription, invoice, payment, checkout and credit events.
  • MCP server — the same operations exposed as tools for AI assistants.
  • Developer quick start — first request to first invoice, end to end.