Skip to content
LA CRYPTADOCS / 01

API guide

How to read, authenticate, and consume an organization’s API.

API guide

The public and tenant API is documented in a browsable OpenAPI schema. This guide explains how to integrate it safely; the reference contains every endpoint, parameter, body, response, and minimum role.

Choose the right operation

Every tenant operation begins with:

/api/organizations/{organizationSlug}

The main groups are:

GroupAudienceExamples
PublicNo sessionLanding page, Events, checkout, registration, coupon, payment, confirmation, public check-in
Personal areaguestProfile, own Events, items, gifts, transfers, and feedback
OperationsmanagerEvents, attendees, orders, ticketing, contacts, lists, campaigns, invoices, and content
ConfigurationOrganization adminMembers, roles, domains, landing page, integrations, storage, logs, and impersonation

The same path may support methods with different roles. Check the operation’s role badge, not only its resource name.

Browser authentication

Nostr or email login sets an HttpOnly cookie. For same-origin requests:

const response = await fetch(
  "/api/organizations/acme/me/items",
  { credentials: "same-origin" },
)

For a mutation, first obtain /api/auth/csrf and send x-csrf-token. The playground automates session and CSRF.

Programmatic Nostr login

The NIP-98 event must sign the exact absolute URL and method, use kind 27235, have a recent timestamp, and include organization intent when creating or linking membership. Do not reuse a signature for another host, method, or request.

Public requests

A public operation is still tenant-scoped. For example:

GET  /api/organizations/{organizationSlug}/events/by-slug/{eventSlug}/checkout-state
POST /api/organizations/{organizationSlug}/events/by-slug/{eventSlug}/register
POST /api/organizations/{organizationSlug}/events/by-slug/{eventSlug}/coupons/check
POST /api/organizations/{organizationSlug}/events/by-slug/{eventSlug}/claim

Use the Event slug within the organization; do not assume global uniqueness.

Versioning and compatibility

The API evolves while retaining explicit canonical routes. New fields may appear without breaking clients; ignore unknown properties. For renamed concepts or models, see Deprecations.

Robust clients

  • Validate requests and responses against the operation schema.
  • Set client-side timeouts and cancellation.
  • Retry reads with backoff and jitter.
  • For writes, query state before repeating.
  • Retain order, invoice, campaign, and provider IDs.
  • Log correlation IDs without storing secrets or complete personal data.
  • Treat 404 as “not visible in this tenant and role,” not proof of existence.

Next step

Open the OpenAPI reference, choose an operation, and try it in the Nostr-enabled playground. For live updates, continue with Real-time updates with SSE.