> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fourdos.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference overview

> Base URL, conventions, and how this reference is generated

The endpoint pages in this tab are generated from the live OpenAPI document
the API itself serves - the same Zod schemas the server validates every
request against. The reference cannot drift from the deployed API.

## Base URL

All examples and the interactive playground target the nonprod environment:

```
https://api.develop.fourdos.dev
```

Production base URLs are provided during partner onboarding.

## Conventions

* **Auth** - `Authorization: Bearer <org_… key>` on every endpoint, except
  `POST /v1/track`, which takes a publishable `ek_live_…` tracking key as
  `?key=` or the body `key` field. See [Authentication](/authentication).
* **Wire format** - JSON with `snake_case` field names. Timestamps are ISO
  8601 with timezone; dates (like `dob`) are plain `YYYY-MM-DD` strings.
* **Errors** - one envelope everywhere:
  `{ "error": { "code", "status", "message", "details"? } }`. The `code` is
  stable; `message` wording is not a contract.
* **Idempotency** - endpoints that declare it accept an `Idempotency-Key`
  header. Same key + same body → the original response is replayed. Same key +
  different body → `409 IDEMPOTENCY_CONFLICT`.
* **Async jobs** - bulk import validation and commit run asynchronously:
  the call returns `202 Accepted` and you poll the job resource for state.

## Surfaces

| Group      | Endpoints                           | Notes                                                        |
| ---------- | ----------------------------------- | ------------------------------------------------------------ |
| Users      | `/v1/users…`                        | Create/attach, fetch, update, lock/unlock, remove membership |
| Imports    | `/v1/imports…`                      | Bulk member migration: stage → validate → commit             |
| Engagement | `/v1/track`, `/v1/engagement/keys…` | Public event receptor + tracking-key management              |

The raw OpenAPI document is available at
[`/openapi/partner.json`](https://api.develop.fourdos.dev/openapi/partner.json).
