Skip to content

Promote Tenant to Production

Promotes the authenticated tenant from sandbox to production. All branches (issuers) are promoted at once. Sequential counters are seeded for every issuer × document type combination. All active sandbox API keys are revoked and replaced with matching production keys — one per revoked sandbox key, preserving the same label.

POST /v1/tenants/promote

This is a one-way action. Once a tenant is in production, it cannot return to sandbox.

Authentication

Authorization: Bearer <api-key>

The tenant's email must be ACTIVE (verified) — promotion is blocked for PENDING_VERIFICATION tenants.

Request body

All fields are optional. An empty body {} is valid.

json
{
  "initialSequentials": [
    { "issuerId": 1, "documentType": "01", "sequential": 1 },
    { "issuerId": 2, "documentType": "01", "sequential": 1 }
  ]
}
FieldTypeRequiredDescription
initialSequentialsarrayNoPer-issuer, per-document-type starting sequential numbers. Any combination not listed defaults to 1.
initialSequentials[].issuerIdintegerYes (per entry)Numeric issuer id (from GET /v1/issuers)
initialSequentials[].documentTypestringYes (per entry)Document type code, e.g. "01"
initialSequentials[].sequentialintegerYes (per entry)Next sequential number to issue (≥ 1)

Response

200 OK

json
{
  "ok": true,
  "apiKeys": [
    { "label": "Initial sandbox key", "apiKey": "a3f8c2bd..." },
    { "label": "erp-integration",     "apiKey": "d94e17ac..." }
  ]
}

apiKeys contains one entry per sandbox key that was active at the time of promotion. Store all tokens immediately — they are shown only once. Distribute each token to the integration that previously used the sandbox key with the same label.

Sandbox keys are revoked automatically during promotion. If you had no sandbox keys, apiKeys will be an empty array — mint production keys via POST /v1/keys.

Errors

StatusCodeWhen
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENTenant email not yet verified
409CONFLICTTenant is already in production

Comprobify API Documentation