Skip to content

Register

Self-service registration. Creates a tenant, issuer, and sandbox API key in one call. The returned API key is shown once — store it immediately.

POST /v1/register

Authentication

None — public endpoint.

Rate limiting

Shared with POST /v1/resend-verification — 5 requests per hour per IP.

Request body

multipart/form-data (required — a P12 certificate file must be included).

FieldTypeRequiredDescription
certfileYesP12 certificate file from SRI
certPasswordstringNoP12 password (omit if none)
emailstringYesTenant contact email — used for verification and invoice notifications
rucstringYes13-digit RUC
businessNamestringYesLegal business name (max 300 chars)
tradeNamestringNoTrade name
mainAddressstringNoMain address
branchCodestringYes3-digit branch code, e.g. 001
issuePointCodestringYes3-digit issue point code, e.g. 001
environmentstringNo(Deprecated — ignored) Historically controlled SRI environment. All new accounts start in sandbox; use POST /v1/tenants/promote to move to production.
emissionTypestringYes1 (normal emission)
requiredAccountingbooleanYesWhether the business is required to keep accounting
specialTaxpayerstringNoSpecial taxpayer code
branchAddressstringNoBranch address
documentTypesarrayNoDocument type codes to enable (default: ["01"]). Must be supported types.
initialSequentialsarrayNo(Deprecated — ignored at registration) Starting sequential numbers per document type to use at promotion time. Pass these to POST /v1/tenants/promote instead.
languagestringNoLanguage for outgoing emails. Supported: es (default), en. Stored on the tenant and used for all subsequent emails including resends.
verificationRedirectUrlstringNoFrontend URL where the verification link in the email will point. The token is appended as ?token=<token>. If omitted, the link goes directly to the API's verify endpoint.

verificationRedirectUrl behaviour

When set, the verification email contains a link to your frontend page:

https://app.comprobify.com/verify?token=<64-char-hex>

Your frontend page should display a confirmation UI and then call GET /v1/verify-email?token=<token> on user action.

When omitted, the link goes directly to the API:

https://api.comprobify.com/v1/verify-email?token=<64-char-hex>

Validation: in production (APP_ENV=production) the URL must use https. In staging, http is also accepted.

Response

201 Created — new registration

json
{
  "ok": true,
  "tenant": {
    "id": 1,
    "email": "you@company.com",
    "subscriptionTier": "FREE",
    "status": "PENDING_VERIFICATION",
    "documentQuota": 100,
    "documentCount": 0,
    "createdAt": "2026-04-30T00:00:00.000Z"
  },
  "issuer": {
    "id": 1,
    "ruc": "1712345678001",
    "businessName": "My Company S.A.",
    "tradeName": null,
    "branchCode": "001",
    "issuePointCode": "001",
    "certFingerprint": "SHA256:...",
    "certExpiry": "2027-01-01T00:00:00.000Z"
  },
  "apiKey": "abc123..."
}

200 OK — email already registered (key recovery)

If the email is already registered and not suspended, the current sandbox key is revoked and a fresh one is returned. Same response shape as 201 but with recovered: true.

Errors

StatusCodeWhen
400VALIDATION_ERRORMissing or invalid fields, or missing P12 file
400BAD_REQUESTP12 file is corrupt or the certificate password is wrong
403FORBIDDENThe account is suspended
409CONFLICTRUC already registered under a different email
429TOO_MANY_REQUESTSRate limit exceeded

Notes

  • The tenant starts in PENDING_VERIFICATION status. A verification email is sent immediately (fire-and-forget).
  • Unverified tenants can use sandbox but cannot promote to production.
  • The verification token expires after the configured TTL (default 24 hours). Use POST /v1/resend-verification to issue a fresh one.
  • The endpoint is idempotent on the email address — safe to retry if the API key was lost.

Comprobify API Documentation