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

# Public API overview

> COPE exposes a RESTful public API for vendor integrations. Authenticate with a Bearer API key or Clerk bearer token and call the endpoints described in this reference.

# Public API

COPE's public REST API lets vendor integrations manage released COPE resources from a COPE business workspace using JSON over HTTPS.

## Contract

| Contract       | Behavior                                                                                                                        |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Base URL       | `https://api.cope.com`                                                                                                          |
| Encoding       | JSON over HTTPS                                                                                                                 |
| Authentication | `Authorization: Bearer <token>` on every request                                                                                |
| Errors         | RFC 9457 `application/problem+json` (`type`, `title`, `status`, `code`, `errors[]`)                                             |
| Pagination     | Cursor pagination by default. Offset pagination is legacy compatibility only when an operation documents `page` and `per_page`. |
| Versioning     | Major version in the URL (`/v1/...`). Breaking changes require a new major.                                                     |
| Compatibility  | Additive response fields and new optional request params may happen within the same major.                                      |

Vendor integrations should use `cope_sk_live_*` API keys. Clerk bearer tokens are also accepted for first-party or embedded clients; when using Clerk, send `X-Cope-Business-Id` to select the workspace. API keys are already scoped to one business and do not require that header.

Test-mode public API keys are reserved but not accepted yet; they currently return `401 invalid_token` until the public sandbox is enabled.

## API Areas

| Area     | Path prefix      | Use it for                                            |
| -------- | ---------------- | ----------------------------------------------------- |
| Commerce | `/v1/commerce/*` | Offers, products, and commerce integration workflows. |

Treat 4xx responses as permanent for the same payload - do not retry the request as-is, fix the input and resend. Treat 5xx responses as transient and retry with backoff.
