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

# API reference

> Every endpoint, generated from the Cufea OpenAPI contract, with a playground.

The pages of this section are generated from the OpenAPI contract the API serves at
`https://api.cufea.com/openapi.json`, so they always match it. The descriptions of the
contract are in English. Its version history is in the [changelog](https://docs.cufea.com/en/changelog.md).

## Base URL

```
https://api.cufea.com
```

## Authentication

Every endpoint except `GET /v1/health` takes `Authorization: Bearer <key>`. The `/v1/partner`
routes take a partner key (`cufea_partner_`) and nothing else does. See
[Authentication](https://docs.cufea.com/en/authentication.md).

## Try it with a sandbox key

> [!WARNING]
>
> Use a **`cufea_sandbox_`** key in the playground. It talks to Cufea's simulated DIAN, so
> nothing you send there has legal effect. A `cufea_test_` key reaches the DIAN test
> environment, and a `cufea_prod_` key **issues real invoices**: the API does not know a request
> came from these docs.

1. Get a sandbox key on the [developer console](https://app.cufea.com/signup).
2. Open an endpoint, such as `GET /v1/tenant`, and choose **Try it**.
3. Paste the key in the authorization field and send.

The playground sends the request through the docs platform's proxy, so your browser does not
call `api.cufea.com` directly. Your key travels in that request: keep production keys out of
it.

## Conventions

* Amounts and quantities are decimal strings, such as `"119000.00"`, never JSON numbers.
* Errors are `application/problem+json`; see [Errors](https://docs.cufea.com/en/errors.md).
* Creates and sends take an `Idempotency-Key` header; see [Idempotency](https://docs.cufea.com/en/idempotency.md).
* Every keyed response carries `X-RateLimit-*` headers; see [Rate limits](https://docs.cufea.com/en/rate-limits.md).
* Lists use cursor pagination; see [Pagination](https://docs.cufea.com/en/pagination.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.