Authentication
Authenticate every request with an API key.
Keys have the format cf_test_ or cf_live_ followed by 40 lowercase hexadecimal characters.
Headers
| Header | Usage |
|---|---|
X-API-Key | Required for key authentication. |
Content-Type: application/json | JSON bodies. |
Idempotency-Key | Supported on issuance, cancellation, substitution and email requests; reusing a key with a different payload returns 409/422. |
Certificate upload uses multipart/form-data. With curl -F, let curl generate the Content-Type with the boundary. Downloads return PDF or XML with no JSON envelope.
Environments
- Companies, certificates and invoices are accessed in the key's persisted environment:
testorlive. - In
live, issuance verifies the company, blocks and active certificate; credits and issuance limits also apply. - In
test, issuance requires an existing company but skips the readiness and certificate checks of theliveflow. - Webhook deliveries use the explicit
?environment=test|livefilter; without it, they may return both of the account's environments, regardless of the key's environment.
Scopes
| Scope | Legacy alias | What it allows |
|---|---|---|
nfse:ler | invoices_view | Read invoices, PDF/XML, events, tax calculation and companies. |
nfse:emitir | invoices_issue | Issue, substitute and resend invoice emails. |
nfse:cancelar | — | Cancel invoices. |
clientes:ler | — | List and read saved customers. |
clientes:escrever | — | Update and delete saved customers. |
webhooks:gerenciar | — | Create, list, test, retry and delete webhooks. |
full_access | invoices_read_write (partial) | Full access to API-key-enabled routes. |
A key can combine multiple granular scopes (e.g. nfse:ler + nfse:emitir). Legacy scopes are translated automatically. Missing scopes return 403 {"error":"insufficient_scope","required":"<scope>"}.
Example
bash
export BASE_URL='https://api.SEU-DOMINIO/v1'
export CONCEITO_API_KEY='cf_test_your_key'
curl "$BASE_URL/companies" -H "X-API-Key: $CONCEITO_API_KEY"