We use cookies and similar technologies, including Google Analytics and the Meta Pixel, to improve your experience, measure site traffic and understand signup campaigns. By clicking "Accept", you agree to this use.

Learn more about our privacy practices
Corvo
Português

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/companies with taxRegime and municipalityCode. municipalReg is optional.
  • POST /v1/companies/:id/certificates with the A1 certificate.
  • POST /v1/invoices.
POST/v1/companies201 Created
full_access

Registers a company.

FieldTypeRequiredDescription
legalNamestring✓Legal name, up to 200 characters, not empty after trim.
taxIdstring✓Valid CNPJ; normalized before the duplicate check.
taxRegimestring✓MEI or Simples Nacional. Corvo serves only these two regimes: any other value returns 422 ERROR_TAX_REGIME_NOT_SUPPORTED.
tradeNamestringUp to 200 characters.
municipalRegstring or nullOptional, and nonblank when sent. It is stored but **not sent on the invoice** unless sendMunicipalReg is true. null clears it (and turns sendMunicipalReg off).
sendMunicipalRegbooleanDefault 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).
municipalityCodestring✓Exactly 7 digits (IBGE), required in test and live mode. Used as the issuer municipality and default service location.
defaultServiceCodestringExactly 6 digits (cTribNac); default for new invoices. Without it, provide service.code when issuing.
simpleNationalbooleanIf omitted, follows the regime (true for MEI and Simples Nacional).
specialRegimestringOne 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.
simplesRatestringRequired 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.
simplesIssRatestringOptional, Simples Nacional only. Effective ISS rate (%) of your bracket (1.80 to 5.00), needed only when a customer withholds ISS. Ignored for MEI.
addressobjectstreet (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"
  }
}
GET/v1/companies200 OK
full_accessinvoices_read_write

Lists the companies in the account/environment.

FieldTypeRequiredDescription
limitintegerDefaults to 50; accepts integers from 1 to 1000 (an invalid value returns 400).
cursorstringnextCursor 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"
  }
}
GET/v1/companies/:id200 OK
full_accessinvoices_read_write

Fetches 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": []
  }
}
PATCH/v1/companies/:id200 OK
full_access

Updates 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.

FieldTypeRequiredDescription
legalNamestringLegal name, up to 200 characters, not empty after trim.
taxIdstringThe 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.
taxRegimestringMEI or Simples Nacional. Corvo serves only these two regimes: any other value returns 422 ERROR_TAX_REGIME_NOT_SUPPORTED.
tradeNamestringUp to 200 characters.
municipalRegstring or nullOptional. Stored but not sent on the invoice unless sendMunicipalReg is true. null clears it.
municipalityCodestringExactly 7 digits when provided; omit to keep the existing value. Cannot be cleared.
defaultServiceCodestring or nullExactly 6 digits when provided. Omit to keep; null clears the default.
simpleNationalbooleanOmit it to keep the current value.
specialRegimestringOne of "0"–"6" (regEspTrib, RTC v1.01), same codes as on creation. Empty string clears it; omit to keep the current value.
simplesRatestringOmit it to keep the current value. Send a new value to update it (for example, each month). Ignored for MEI.
simplesIssRatestring or nullSame format as on creation. null removes it.
addressobject or nullSame 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"
  }
}
DELETE/v1/companies/:id200 OK
full_access

Deletes 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

GET/v1/cnpj/:cnpj200 OK
full_access

Public 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

FieldTypeRequiredDescription
cnpjstring✓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.

GET/v1/companies/:id/dps-sequence200 OK
full_access

The 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 } }
PUT/v1/companies/:id/dps-sequence200 OK
full_access

Continues 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.

FieldTypeRequiredDescription
lastNumberinteger✓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

GET/v1/companies/:id/fiscal-profile200 OK
full_access

The 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"
  }
] }
PUT/v1/companies/:id/fiscal-profile200 OK
full_access

Opens 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.

FieldTypeRequiredDescription
taxRegimestring✓MEI or SIMPLES_NACIONAL. Any other regime answers 422 ERROR_TAX_REGIME_NOT_SUPPORTED.
validFromdateFirst day of the period (default: today).
simpleNationalbooleanOpted for the Simples Nacional.
specialTaxRegimestringSpecial regime code, 0 to 6.
ibsCbsRegularOptionbooleanOpted for the regular IBS/CBS regime.
ibsCbsRegularFromdateFrom 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"
  }
}
POST/v1/companies/:id/fiscal-profile/:profileId/approve201 Created
full_access

Marks 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.

GET/v1/companies/:id/service-tax-profiles200 OK
full_access

The profiles effective on date (default: today in America/Sao_Paulo). Needs nfse.companies.view.

Query

FieldTypeRequiredDescription
datedateDay 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"
  }
] }
POST/v1/companies/:id/service-tax-profiles201 Created
full_access

Adds 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"
  }
}
PATCH/v1/companies/:id/service-tax-profiles/:serviceId200 OK
full_access

Changes 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"
  }
}
POST/v1/companies/:id/service-tax-profiles/:serviceId/approve201 Created
full_access

Approves 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"
  }
}
DELETE/v1/companies/:id/service-tax-profiles/:serviceId200 OK
full_access

Deletes 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.

GET/v1/companies/:companyId/accountant-package200 OK
full_access

The 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" } }
PUT/v1/companies/:companyId/accountant-package200 OK
full_access

Sets 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.

FieldTypeRequiredDescription
accountantEmailstring | 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 } }
POST/v1/companies/:companyId/accountant-package/send200 OK
full_access

Sends 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.

FieldTypeRequiredDescription
monthstring✓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" } }
GET/v1/companies/:companyId/accountant-package/sends200 OK
full_access

The 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"
} ] }