# Facturia (/en/docs)

Facturia is a multi-empresa API for Chilean electronic invoicing (DTE, *documento tributario
electrónico*). You `POST` a small JSON object; we assign a folio — the pre-authorised sequential
number a DTE must carry — out of a real CAF (*código de autorización de folios*, the SII-signed
block of folios), build and sign the XML, transmit it to the SII (Chile's tax authority), follow it
to a terminal state, generate the PDF and tell you what happened — by polling or by webhook. We also
receive your suppliers' DTEs, keep your Registro de Compras y Ventas (the ledger of purchases and
sales the SII keeps for you) in sync, compute your F29 (the monthly VAT return) and file it.

## Three facts that explain the shape of the API [#three-facts-that-explain-the-shape-of-the-api]

**Multi-empresa is the primitive, not an upgrade tier.** One account, one key, N empresas (Chilean
companies, one per RUT). Every request names its empresa with the `Facturia-Empresa` header.

**Issuance is asynchronous at the SII and we never pretend otherwise.** The `POST` answers `201`
immediately, with `status: queued` and `folio: null`: the folio is assigned when the document
reaches `sent`, and you learn it from `document.sent` or from the `Facturia-Poll-After` on the
`GET`. The round trip to the SII is a state machine you watch, not a wait we hide from you.

**The sandbox is free forever and touches the SII zero times.** You can build the whole integration
before you own a certificate.

## Base URL [#base-url]

```
https://api.facturia.cl/v1
```

Every path in this documentation is relative to that base. TLS 1.2+ only. HTTP/2. There is no
unversioned root and no unencrypted port.

## Where to start [#where-to-start]

- [First factura in 60 seconds](/en/docs/empezar/quickstart): From an `sk_test_` key to a boleta (Chile's consumer-facing receipt) issued in the sandbox, with the full `queued` → `accepted` cycle.

- [Concepts](/en/docs/empezar/conceptos): Empresa, document, test/live mode and the header that names the empresa. Four ideas and the rest follows.

- [Authentication](/en/docs/autenticacion): `sk_test_` / `sk_live_` keys, scopes, empresa allowlists and rate limits.

- [API reference](/en/docs/referencia): The 99 endpoints of `/v1`, generated from the OpenAPI 3.1 document we publish.

## What this documentation covers [#what-this-documentation-covers]

| Chapter                                  | What it settles                                                             |
| ---------------------------------------- | --------------------------------------------------------------------------- |
| [Start here](/en/docs/empezar)           | What Facturia is, your first issuance and the base concepts                 |
| [Authentication](/en/docs/autenticacion) | Keys, scopes, empresas, rotation, limits                                    |
| [Issuance](/en/docs/emision)             | Creating DTEs, previews, artefacts, SII statuses                            |
| [Reception](/en/docs/recepcion)          | The casilla de intercambio (your DTE exchange mailbox) and the 8-day window |
| [Taxes](/en/docs/impuestos)              | RCV, characterisation, F29 and tipo 46                                      |
| [Webhooks](/en/docs/webhooks)            | Signing, retries, replay and the event catalogue                            |
| [MCP / AI](/en/docs/mcp)                 | Connecting Claude or another agent to `mcp.facturia.cl`                     |
| [API reference](/en/docs/referencia)     | The contract endpoint by endpoint                                           |
| [Errors](/en/docs/errores)               | The envelope, the types and the rejection codes                             |

## What is not in v1 [#what-is-not-in-v1]

Export documents (110/111/112), liquidación factura (43), boleta de honorarios (a different SII
regime altogether), rectifying F29s, F22 and declaraciones juradas, the libros de compra/venta as a
resource (the RCV replaced them), multi-currency invoicing beyond the tipo 46 FX path, copias
cedibles outside tipo 33, Meta and Google Ads billing connectors, and dated versions of the API.

The sandbox stays free forever. This reference stays public and unauthenticated: no login wall, no
PDF behind a form.
