Skip to main content
POST
Provision a client company as a tenant

Authorizations

Authorization
string
header
required

Send your Cufea partner key as Authorization: Bearer cufea_partner_.... Only the /v1/partner routes accept it.

Body

application/json

The client company to provision. One tenant per NIT and partner: repeating the call with the same data answers the existing tenant (200, created: false).

authorization
ClientAuthorizationIn · object
required

The client's written authorization of the partner. Cufea stores these facts, append-only; it does not verify the signature, the partner answers for it.

check_digit
string
required

The NIT's check digit (DV), DIAN modulo 11.

Pattern: ^[0-9]$
Example:

"8"

contact_email
string
required

The client's contact email address.

Required string length: 3 - 254

The client's legal name (razón social); also the tenant's name.

Required string length: 1 - 450
nit
string
required

The client's NIT, digits only, without the check digit.

Pattern: ^[0-9]{5,15}$
Example:

"900123456"

issue_keys
enum<string>[]

Stages whose API keys to issue now, each once (a new tenant is in test, so production keys come after its promotion). Only a create issues them: a repeated call issues none.

Maximum array length: 2
Available options:
sandbox,
test

Response

The partner already had this tenant (created: false).

check_digit
string
required
contact_email
string
required
created
boolean
required

True when this call created the tenant.

dian_environment
enum<string>
required

test until the tenant is promoted, production afterwards.

Available options:
test,
production
nit
string
required
status
enum<string>
required
Available options:
active,
suspended
tenant_id
string<uuid>
required
test_set_accepted
boolean
required

Whether the DIAN accepted the habilitación test set of the issuer's current TestSetId.

active_keys
ApiKeyInfo · object[]

The tenant's keys that are not revoked: id, prefix and stage, never the key.

api_keys
ApiKeyCreated · object[]

The keys issued by this call, shown once. Empty on a repeated call.

created_at
string<date-time> | null