Skip to main content
POST
Create a legal entity
The new entity’s isolated ledger id and gapless invoice-number sequence are allocated automatically — you never manage either directly.

Request body

Example request

Example response

Returns 201 on success. Resources created afterwards with this entity’s entity_id post to its ledger and draw from its invoice series; resources with a NULL/omitted entity_id stay on the primary entity.

Authorizations

Authorization
string
header
required

Tenant API key obtained from POST /auth/register or POST /v1/developer/keys.

Body

application/json
name
string
required
invoice_prefix
string

Optional; defaults to a slug of the name.

country_code
string

ISO 3166-1 alpha-2. country is accepted as an alias; country_code wins if both are sent.

Required string length: 2
country
string

Alias for country_code (the field /auth/register uses).

Required string length: 2

Response

Entity created.

data
object

A legal entity under a tenant (Multi-Entity Books). Each entity has its own ledger and invoice series; every tenant has exactly one primary entity.