Creates a company under the account the request resolves to. The NIF is
registered in the name of that account's holder, never in the name of the caller.
- **`activate`:** unless it is `false`, the company is switched on in
`aeat_environment` and its three default invoice series (ordinary, simplified,
corrective) are seeded there. This endpoint never switches an existing company on:
that is `POST /v1/companies/{company_id}/activations`.
- **`numbering`:** decides the code, format, counter reset and starting number those
series are born with. Only accepted when the request activates the company.
- **Billing:** no charge is ever started here. Creating a production NIF on an account
without billing is rejected with `402`, and no checkout is opened.
- **Duplicates:** a NIF that already exists in the account is rejected with `409`, and
the response carries the existing `error.details.company_id`.
Endpoint: POST /v1/accounts/{account_id}/companies
⚠️ Fiscal guardrails — read before calling:
- Which company an operation acts on, and how that is selected. (resource: beel://guardrails/multi-nif)
- Why a name that does not match the census makes an invoice unsubmittable. (resource: beel://guardrails/nif-validation)
- How invoice numbers are formed, and why numbering can never be rewritten. (resource: beel://guardrails/series-and-numbering)
For the exhaustive rules and worked examples, call beel_docs_search.
Connector