Companies
Register and manage the companies used for NFS-e issuance.
Permissions: fetches use nfse.companies.view; writes use nfse.companies.manage.
From signup to issuing
POST /v1/companieswithtaxRegimeandmunicipalityCode.municipalRegis optional.POST /v1/companies/:id/certificateswith the A1 certificate.POST /v1/invoices.
/v1/companies201 CreatedRegisters a company.
| Field | Type | Required | Description |
|---|---|---|---|
| legalName | string | ✓ | Legal name, up to 200 characters, not empty after trim. |
| taxId | string | ✓ | Valid CNPJ; normalized before the duplicate check. |
| taxRegime | string | ✓ | MEI or Simples Nacional. Corvo serves only these two regimes: any other value returns 422 ERROR_TAX_REGIME_NOT_SUPPORTED. |
| tradeName | string | Up to 200 characters. | |
| municipalReg | string or null | Optional, and nonblank when sent. It is stored but **not sent on the invoice** unless sendMunicipalReg is true. null clears it (and turns sendMunicipalReg off). | |
| sendMunicipalReg | boolean | Default false. Send the municipal registration in the DPS only if the city registered this company in the national registry and the tax authority requires it; otherwise the invoice is rejected (E0120). | |
| municipalityCode | string | ✓ | Exactly 7 digits (IBGE), required in test and live mode. Used as the issuer municipality and default service location. |
| defaultServiceCode | string | Exactly 6 digits (cTribNac); default for new invoices. Without it, provide service.code when issuing. | |
| simpleNational | boolean | If omitted, follows the regime (true for MEI and Simples Nacional). | |
| specialRegime | string | One of "0"–"6" (regEspTrib, RTC v1.01): 0 None, 1 Cooperative Act, 2 Estimate, 3 Municipal Microenterprise, 4 Notary or Registrar, 5 Self-employed Professional, 6 Professional Partnership. | |
| simplesRate | string | Required for Simples Nacional, ignored for MEI. Effective total rate (%) of your DAS, the one shown in the PGDAS-D, e.g. "6.54" (0 to 100, at most 2 decimals). It goes on every invoice (pTotTribSN). Corvo does not compute the DAS. | |
| simplesIssRate | string | Optional, Simples Nacional only. Effective ISS rate (%) of your bracket (1.80 to 5.00), needed only when a customer withholds ISS. Ignored for MEI. | |
| address | object | street (200), number (20), complement (100), district (100), city (100), state (2) and zip (10), all optional strings. A filled-in state must be a valid UF and is normalized to uppercase. A filled-in zip must be 8 digits and is stored without punctuation. |
curl -X POST "$BASE_URL/companies" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"legalName": "Empresa Exemplo Ltda",
"taxId": "11222333000181",
"taxRegime": "Simples Nacional",
"simplesRate": "6.54",
"simpleNational": true,
"municipalReg": "123456",
"municipalityCode": "3550308",
"defaultServiceCode": "010101",
"address": {
"street": "Rua Exemplo",
"number": "100",
"city": "São Paulo",
"state": "SP",
"zip": "01001000"
}
}'Response — 201 Created
{
"data": {
"id": "3f1c8a90-6b2e-4d5a-9c11-8e2f0a7b4d11",
"legalName": "Empresa Exemplo Ltda",
"taxId": "11222333000181",
"taxRegime": "Simples Nacional",
"municipalityCode": "3550308",
"defaultServiceCode": "010101",
"status": "pending_setup",
"environment": "test",
"createdAt": "2026-10-10T12:00:00.000Z"
}
}/v1/companies200 OKLists the companies in the account/environment.
| Field | Type | Required | Description |
|---|---|---|---|
| limit | integer | Defaults to 50; accepts integers from 1 to 1000 (an invalid value returns 400). | |
| cursor | string | nextCursor from the previous page, keeping the same filters. |
curl "$BASE_URL/companies?limit=50" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": [
{
"id": "3f1c8a90-6b2e-4d5a-9c11-8e2f0a7b4d11",
"legalName": "Empresa Exemplo Ltda",
"taxId": "11222333000181",
"status": "ready",
"environment": "test"
}
],
"pagination": {
"limit": 50,
"hasMore": true,
"nextCursor": "eyJ2IjoxLCJjcmVhdGVkQXQiOiIyMDI2LTEwLTA5VDEyOjAwOjAwLjAwMDAwMFoiLCJpZCI6IjNmMWM4YTkwIn0"
}
}/v1/companies/:id200 OKFetches a single company by id.
curl "$BASE_URL/companies/$COMPANY_ID" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"id": "3f1c8a90-6b2e-4d5a-9c11-8e2f0a7b4d11",
"legalName": "Empresa Exemplo Ltda",
"taxId": "11222333000181",
"municipalReg": "123456",
"taxRegime": "Simples Nacional",
"status": "ready",
"environment": "test",
"setupGaps": []
}
}/v1/companies/:id200 OKUpdates a company. Accepts the creation fields, all optional. Send simplesRate (and simplesIssRate, or null to remove it) to update the Simples rate, for example every month.
| Field | Type | Required | Description |
|---|---|---|---|
| legalName | string | Legal name, up to 200 characters, not empty after trim. | |
| taxId | string | The CNPJ cannot be changed. Sending the current CNPJ is accepted and ignored; any other value returns 422. To use another CNPJ, create a new company. | |
| taxRegime | string | MEI or Simples Nacional. Corvo serves only these two regimes: any other value returns 422 ERROR_TAX_REGIME_NOT_SUPPORTED. | |
| tradeName | string | Up to 200 characters. | |
| municipalReg | string or null | Optional. Stored but not sent on the invoice unless sendMunicipalReg is true. null clears it. | |
| municipalityCode | string | Exactly 7 digits when provided; omit to keep the existing value. Cannot be cleared. | |
| defaultServiceCode | string or null | Exactly 6 digits when provided. Omit to keep; null clears the default. | |
| simpleNational | boolean | Omit it to keep the current value. | |
| specialRegime | string | One of "0"–"6" (regEspTrib, RTC v1.01), same codes as on creation. Empty string clears it; omit to keep the current value. | |
| simplesRate | string | Omit it to keep the current value. Send a new value to update it (for example, each month). Ignored for MEI. | |
| simplesIssRate | string or null | Same format as on creation. null removes it. | |
| address | object or null | Same fields as on creation. null clears the address. |
curl -X PATCH "$BASE_URL/companies/$COMPANY_ID" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "tradeName": "Novo nome", "municipalReg": "987654" }'Response — 200 OK
{
"data": {
"id": "3f1c8a90-6b2e-4d5a-9c11-8e2f0a7b4d11",
"tradeName": "Novo nome",
"municipalReg": "987654",
"status": "ready"
}
}/v1/companies/:id200 OKDeletes a company (logical deletion).
curl -X DELETE "$BASE_URL/companies/$COMPANY_ID" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": null
}Look up a CNPJ
/v1/cnpj/:cnpj200 OKPublic registry data of a CNPJ (names, address, Simples Nacional, MEI, situation, activities/CNAE and suggestedServiceCode, a service code to suggest, never to apply without asking), to pre-fill a company or a customer form. Send the CNPJ with or without punctuation. 400 CNPJ_INVALID for a malformed CNPJ; 404 CNPJ_NOT_FOUND when the registry does not know the CNPJ; 503 CNPJ_LOOKUP_UNAVAILABLE when it has no answer right now. Needs nfse.companies.manage or nfse.invoices.issue; 20 requests per minute.
Path
| Field | Type | Required | Description |
|---|---|---|---|
| cnpj | string | ✓ | 14 digits, punctuation optional. |
curl "$BASE_URL/cnpj/:cnpj" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{
"data": {
"legalName": "ACME TECNOLOGIA LTDA",
"tradeName": "Acme",
"address": { "zip": "01310100", "street": "Avenida Paulista", "number": "1000", "complement": "", "district": "Bela Vista", "city": "São Paulo", "state": "SP" },
"municipalityCode": "3550308",
"simples": true,
"mei": false,
"active": true,
"situation": "ATIVA"
}
}DPS numbering
Each invoice takes the next DPS number of the company; the Receita refuses a repeated one (E0014, shown as DPS_NUMBER_ALREADY_USED). If the company already issued notes elsewhere, move the counter forward before the first invoice.
/v1/companies/:id/dps-sequence200 OKThe DPS series and the last number used (0 when none yet). Needs nfse.companies.view.
curl "$BASE_URL/companies/:id/dps-sequence" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": { "series": "00001", "lastNumber": 120 } }/v1/companies/:id/dps-sequence200 OKContinues the numbering from the last number the company issued elsewhere (see it in the last note, PDF or XML). The next invoice uses the following number. It only moves forward: a lower number answers 422 DPS_NUMBER_BELOW_CURRENT. Needs nfse.companies.manage.
| Field | Type | Required | Description |
|---|---|---|---|
| lastNumber | integer | ✓ | Last DPS number already used in this series, 0 or more. |
curl -X PUT "$BASE_URL/companies/:id/dps-sequence" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"lastNumber":120}'Response — 200 OK
{ "data": { "series": "00001", "lastNumber": 120 } }Fiscal profile
/v1/companies/:id/fiscal-profile200 OKThe fiscal profile history of the company (regime, Simples Nacional, special regime, IBS/CBS option) by validity period. Needs nfse.companies.view.
curl "$BASE_URL/companies/:id/fiscal-profile" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": [
{
"id": "6d1f6f3a-4e0c-4f5e-8f55-0a8f4f0e7a21",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"taxRegime": "SIMPLES_NACIONAL",
"simpleNational": true,
"specialTaxRegime": null,
"ibsCbsRegularOption": false,
"ibsCbsRegularFrom": null,
"simplesIssRate": "2.00",
"validFrom": "2026-01-01",
"validUntil": null,
"source": "api",
"reviewStatus": "approved",
"reviewedBy": null,
"reviewedAt": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
] }/v1/companies/:id/fiscal-profile200 OKOpens a new validity period of the fiscal profile, from validFrom. Sending a state equal to the open one changes nothing, so the call is safe to repeat. Needs nfse.companies.manage.
| Field | Type | Required | Description |
|---|---|---|---|
| taxRegime | string | ✓ | MEI or SIMPLES_NACIONAL. Any other regime answers 422 ERROR_TAX_REGIME_NOT_SUPPORTED. |
| validFrom | date | First day of the period (default: today). | |
| simpleNational | boolean | Opted for the Simples Nacional. | |
| specialTaxRegime | string | Special regime code, 0 to 6. | |
| ibsCbsRegularOption | boolean | Opted for the regular IBS/CBS regime. | |
| ibsCbsRegularFrom | date | From when the regular IBS/CBS option holds. |
curl -X PUT "$BASE_URL/companies/:id/fiscal-profile" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"taxRegime":"SIMPLES_NACIONAL","simpleNational":true,"validFrom":"2026-01-01"}'Response — 200 OK
{
"data": {
"id": "6d1f6f3a-4e0c-4f5e-8f55-0a8f4f0e7a21",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"taxRegime": "SIMPLES_NACIONAL",
"simpleNational": true,
"specialTaxRegime": null,
"ibsCbsRegularOption": false,
"ibsCbsRegularFrom": null,
"simplesIssRate": "2.00",
"validFrom": "2026-01-01",
"validUntil": null,
"source": "api",
"reviewStatus": "approved",
"reviewedBy": null,
"reviewedAt": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
}/v1/companies/:id/fiscal-profile/:profileId/approve201 CreatedMarks a fiscal profile as reviewed and approved. Needs nfse.companies.manage.
curl -X POST "$BASE_URL/companies/:id/fiscal-profile/:profileId/approve" \
-H "X-API-Key: $CORVO_API_KEY"Response — 201 Created
{
"data": {
"id": "6d1f6f3a-4e0c-4f5e-8f55-0a8f4f0e7a21",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"taxRegime": "SIMPLES_NACIONAL",
"simpleNational": true,
"specialTaxRegime": null,
"ibsCbsRegularOption": false,
"ibsCbsRegularFrom": null,
"simplesIssRate": "2.00",
"validFrom": "2026-01-01",
"validUntil": null,
"source": "api",
"reviewStatus": "approved",
"reviewedBy": null,
"reviewedAt": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
}Service tax profiles
The catalog of the services a company sells, with their tax classification. A profile starts unreviewed; approve it before it is used to withhold taxes. effectiveFrom is inclusive and effectiveUntil exclusive.
/v1/companies/:id/service-tax-profiles200 OKThe profiles effective on date (default: today in America/Sao_Paulo). Needs nfse.companies.view.
Query
| Field | Type | Required | Description |
|---|---|---|---|
| date | date | Day to evaluate, YYYY-MM-DD. |
curl "$BASE_URL/companies/:id/service-tax-profiles?date=2026-11-24" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": [
{
"id": "9c2c9a60-7d2e-4a5f-b0a6-2d7d57b7a3c4",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"name": "Consultoria em TI",
"serviceCode": "010101",
"municipalServiceCode": null,
"nbsCode": "115022000",
"cst": null,
"classCode": null,
"operationIndicator": null,
"operationNature": "SERVICE",
"regimeApplicability": ["SIMPLES_NACIONAL"],
"incidenceMunicipalityCode": null,
"issTaxation": "NORMAL",
"issRate": "2.00",
"issWithholdingDefault": false,
"withholdingPolicy": "NONE_CONFIRMED",
"withholdingRates": {},
"effectiveFrom": "2026-01-01",
"effectiveUntil": null,
"classificationSource": "manual",
"reviewStatus": "unreviewed",
"catalogVersion": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
] }/v1/companies/:id/service-tax-profiles201 CreatedAdds a service to the catalog. Besides name, serviceCode and effectiveFrom you can send the classification (nbsCode, cst, classCode, operationIndicator), ISS (issTaxation, issRate, issWithholdingDefault) and withholdings (withholdingPolicy UNKNOWN, NONE_CONFIRMED or CONFIGURED, with withholdingRates in percent). Needs nfse.companies.manage.
curl -X POST "$BASE_URL/companies/:id/service-tax-profiles" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Consultoria em TI","serviceCode":"010101","nbsCode":"115022000","effectiveFrom":"2026-01-01","withholdingPolicy":"NONE_CONFIRMED"}'Response — 201 Created
{
"data": {
"id": "9c2c9a60-7d2e-4a5f-b0a6-2d7d57b7a3c4",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"name": "Consultoria em TI",
"serviceCode": "010101",
"municipalServiceCode": null,
"nbsCode": "115022000",
"cst": null,
"classCode": null,
"operationIndicator": null,
"operationNature": "SERVICE",
"regimeApplicability": ["SIMPLES_NACIONAL"],
"incidenceMunicipalityCode": null,
"issTaxation": "NORMAL",
"issRate": "2.00",
"issWithholdingDefault": false,
"withholdingPolicy": "NONE_CONFIRMED",
"withholdingRates": {},
"effectiveFrom": "2026-01-01",
"effectiveUntil": null,
"classificationSource": "manual",
"reviewStatus": "unreviewed",
"catalogVersion": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
}/v1/companies/:id/service-tax-profiles/:serviceId200 OKChanges the listed fields of a profile; omitted fields stay. Needs nfse.companies.manage.
curl -X PATCH "$BASE_URL/companies/:id/service-tax-profiles/:serviceId" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"issRate":"2.50"}'Response — 200 OK
{
"data": {
"id": "9c2c9a60-7d2e-4a5f-b0a6-2d7d57b7a3c4",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"name": "Consultoria em TI",
"serviceCode": "010101",
"municipalServiceCode": null,
"nbsCode": "115022000",
"cst": null,
"classCode": null,
"operationIndicator": null,
"operationNature": "SERVICE",
"regimeApplicability": ["SIMPLES_NACIONAL"],
"incidenceMunicipalityCode": null,
"issTaxation": "NORMAL",
"issRate": "2.00",
"issWithholdingDefault": false,
"withholdingPolicy": "NONE_CONFIRMED",
"withholdingRates": {},
"effectiveFrom": "2026-01-01",
"effectiveUntil": null,
"classificationSource": "manual",
"reviewStatus": "unreviewed",
"catalogVersion": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
}/v1/companies/:id/service-tax-profiles/:serviceId/approve201 CreatedApproves the saved classification of the service for this company. Needs nfse.companies.manage.
curl -X POST "$BASE_URL/companies/:id/service-tax-profiles/:serviceId/approve" \
-H "X-API-Key: $CORVO_API_KEY"Response — 201 Created
{
"data": {
"id": "9c2c9a60-7d2e-4a5f-b0a6-2d7d57b7a3c4",
"companyId": "0b7a5a3e-3c33-4d5e-9a3b-6a3d2f6b9b10",
"name": "Consultoria em TI",
"serviceCode": "010101",
"municipalServiceCode": null,
"nbsCode": "115022000",
"cst": null,
"classCode": null,
"operationIndicator": null,
"operationNature": "SERVICE",
"regimeApplicability": ["SIMPLES_NACIONAL"],
"incidenceMunicipalityCode": null,
"issTaxation": "NORMAL",
"issRate": "2.00",
"issWithholdingDefault": false,
"withholdingPolicy": "NONE_CONFIRMED",
"withholdingRates": {},
"effectiveFrom": "2026-01-01",
"effectiveUntil": null,
"classificationSource": "manual",
"reviewStatus": "approved",
"catalogVersion": null,
"createdAt": "2026-11-24T12:00:00.000Z"
}
}/v1/companies/:id/service-tax-profiles/:serviceId200 OKDeletes a profile that has expired and was never approved (422 otherwise). Needs nfse.companies.manage.
curl -X DELETE "$BASE_URL/companies/:id/service-tax-profiles/:serviceId" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": null }Accountant package
On the 1st of each month Corvo e-mails the accountant a ZIP with the XML and PDF of the previous month (see GET /v1/companies/:companyId/invoice-package). Live companies only.
/v1/companies/:companyId/accountant-package200 OKThe accountant e-mail and the last month sent. Needs nfse.companies.view.
curl "$BASE_URL/companies/:companyId/accountant-package" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": { "email": "contador@example.com", "lastSentMonth": "2026-10" } }/v1/companies/:companyId/accountant-package200 OKSets the accountant e-mail; null or blank turns the monthly send off. A new address gets a short hello (testEmailSent) so a wrong recipient is noticed. Needs nfse.companies.manage.
| Field | Type | Required | Description |
|---|---|---|---|
| accountantEmail | string | null | ✓ | A valid e-mail, or null to turn it off. |
curl -X PUT "$BASE_URL/companies/:companyId/accountant-package" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"accountantEmail":"contador@example.com"}'Response — 200 OK
{ "data": { "email": "contador@example.com", "lastSentMonth": "2026-10", "testEmailSent": true } }/v1/companies/:companyId/accountant-package/send200 OKSends the package of a month now, even if it was already sent. status is sent (queued for e-mail, not proof of delivery) or skipped-test, skipped-no-email, skipped-empty, skipped-too-large, with nothing sent. 10 per hour. Needs nfse.companies.manage.
| Field | Type | Required | Description |
|---|---|---|---|
| month | string | ✓ | Competence month, YYYY-MM. |
curl -X POST "$BASE_URL/companies/:companyId/accountant-package/send" \
-H "X-API-Key: $CORVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"month":"2026-10"}'Response — 200 OK
{ "data": { "status": "sent" } }/v1/companies/:companyId/accountant-package/sends200 OKThe last 12 attempts to send the package. Needs nfse.companies.view.
curl "$BASE_URL/companies/:companyId/accountant-package/sends" \
-H "X-API-Key: $CORVO_API_KEY"Response — 200 OK
{ "data": [ {
"id": "2a3c6f1e-8d25-4c19-9e0d-7b3b1d1c4c55",
"month": "2026-10",
"recipient": "contador@example.com",
"invoiceCount": 42,
"totalCents": 12750000,
"status": "sent",
"trigger": "scheduled",
"createdAt": "2026-11-01T12:00:00.000Z"
} ] }