# API reference

> Pontive's public HTTP APIs, generated from their OpenAPI documents, with the base URL and authentication of each.

Source: https://www.pontive.com/docs/api-reference

Every page in this section is generated from the OpenAPI documents the services publish, one page
per area (Users, Organizations, Roles…). Each page is also Markdown at its URL plus `.md`, with every
operation, its parameters, request body, responses and the schemas they use.

| API | Base URL | For | OpenAPI document |
| --- | --- | --- | --- |
| [Management API](/docs/api-reference/management/users) | `https://api.{region}.pontive.com/v1` | One instance's configuration and data: users, organizations, roles, apps, registered APIs, agents, service accounts, webhooks, audit logs, billing | [`/api/openapi/management`](/api/openapi/management) |
| [Authorization API](/docs/api-reference/authz/authzen) | `https://authz.{region}.pontive.com` | Permission checks on your request path (OpenID AuthZEN 1.0) and entitlement checks | [`/api/openapi/authz`](/api/openapi/authz) |
| [Usage ingest API](/docs/api-reference/ingest/billing-usage) | `https://ingest.{region}.pontive.com` | Metered usage events for billing | [`/api/openapi/ingest`](/api/openapi/ingest) |
| [Platform API](/docs/api-reference/platform/workspaces) | `https://api.pontive.com/v1` | Your Pontive account: workspaces, projects, instances, domains, members, secret keys | [`/api/openapi/platform`](/api/openapi/platform) |

`{region}` is the region of the instance's project, such as `us`, `eu` or `au`.

## Authentication [#authentication]

The management, authorization and ingest APIs take `Authorization: Bearer <token>`:

- a **secret key** (`pontive_sk_live_…` or `pontive_sk_test_…`), from a server. It acts as its service
  account on its own instance, so no instance header is needed;
- or an **access token** issued for the API, for example a service account's client-credentials token.
  A token that can reach several instances also names one with `X-Pontive-Instance-ID: inst_…`.

What a call may do is decided by the caller's roles on the instance.

Routes under `/me` act on the signed-in user's own account and are served on the instance's auth
domain, with a token the account components obtain for it, not on the management API host.

<Callout type="warn" title="Draft">
The platform API's document declares no security scheme. It is called by the Pontive dashboard and
the MCP server with a signed-in Pontive user's token; how your own code should authenticate to it is
not documented here yet.
</Callout>

## Conventions [#conventions]

- Ids are prefixed by kind: `usr_`, `org_`, `app_`, `svc_`, `agt_`, `res_`, `inst_`…
- Errors share one envelope, `{ "error": { "code": "permission_denied", "message": "…" } }`, with a
  machine-readable snake_case `code`.
- Lists answer `{ "object": "list", "data": [ … ], "pagination": { "page", "limit", "total", "total_pages" } }`,
  with the `page` and `limit` query parameters choosing the page. A list walked by cursor, such as the
  audit log, answers `next_cursor` instead, which the next call passes as `before`.
- Many write operations accept an `X-Idempotency-Key` header (see each operation).
- Configuration documents (resource types, roles, permissions) return an `ETag`; send it back as
  `If-Match` to update or delete; a stale one fails with `412 precondition_failed`.
