[BR] CNPJ Validation — BASIC

Check a Brazilian company's CNPJ against Receita Federal (RFB) and get back its registration data: legal name, trade name, legal form, opening date, registration status, address, email and phone. Use validation_type: "BASIC":

  • succeeded means RFB returned the CNPJ. Read company_validation_result.registration_status to know whether it is active.
  • failed means the CNPJ is invalid or doesn't exist. errors tells you which.

A CNPJ that is suspended, inapt, closed or null still returns succeeded: the lookup worked. The registration status is in the result.

Need the partners too? Use FULL.

📚

New to tax ID validations? Start with the generic guide. Testing? Use the test CNPJs.


Request

A company that isn't in Brinta yet

curl -X POST https://api.brinta.com/tax-id-validations/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": ["BR"],
    "validation_type": "BASIC",
    "company": {
      "type": "business",
      "tax_registration": {
        "number": "34238864000168",
        "type": "CNPJ",
        "level": "country",
        "location": "BR"
      }
    }
  }'

A company already in Brinta

curl -X POST https://api.brinta.com/tax-id-validations/ \
  -H "Authorization: Bearer $BRINTA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "locations": ["BR"],
    "validation_type": "BASIC",
    "company_id": "2f0e5d75-959b-4791-a201-b88ada67b3f6",
    "update_company": true
  }'

Brinta validates the CNPJ stored on the company. With update_company: true, a successful validation also saves RFB's data on the company: name, legal form, opening date, address, email, phone and the CNPJ's active flag. Without it, the company is not changed.

Required fields

FieldNotes
validation_type"BASIC". If you leave it out, Brinta runs a BASIC validation.
company.tax_registrationnumber is the CNPJ: 14 characters, no dots, slash or dash. Letters in uppercase (alphanumeric CNPJs). Also send type: "CNPJ", level: "country" and location: "BR".
locations["BR"].
company.typebusiness. Optional.

You don't need to send the legal name or the address: RFB returns them.

If the request has no tax registration, it returns 400 before running: taxRegistration (with number) is required when declaring a company via company.

💡

Alphanumeric CNPJs. Since July 2026, RFB issues CNPJs with letters, for example L9J5BYRT000101. Send them as they are, in uppercase. Don't strip the letters.


Result

The POST answers right away with the validation id and status in_process. When the validation finishes, Brinta notifies your validation webhook. Read the result with GET /tax-id-validations/{id}, and poll it every few seconds until status is succeeded or failed. The CNPJ check usually finishes in a few seconds.

Succeeded

{
  "id": "tiv2-89e04294-3d28-4bba-8c2f-755053343fb7",
  "status": "succeeded",
  "validation_type": "BASIC",
  "periods": ["2026-11"],
  "data": [
    {
      "location": "BR",
      "status": "succeeded",
      "company": {
        "legal_name": "UHIEQKX WHNHIWD NH FIXKHUUWPHMVX NH NWNXU (UHIFIX)",
        "name": "UHIFIX UHNH",
        "legal_form": "2011 - Empresa Pública",
        "business_type": "business",
        "date_of_birth": "1967-06-30",
        "total_shares": 0,
        "email": "[email protected]",
        "phone": "+556122222222",
        "tax_registrations": [
          {
            "number": "34238864000168",
            "type": "CNPJ",
            "level": "country",
            "location": "BR",
            "authority": "RFB",
            "active": true
          }
        ],
        "address": {
          "address_line_1": "SETOR NH BIWMNH WIHW MXIVH, Q.601",
          "address_line_2": "LOTE V",
          "neighborhood": "ASA NORTE",
          "city": "BRASILIA",
          "state": "BR-DF",
          "postal_code": "70836900",
          "country": "BR"
        }
      },
      "company_validation_result": {
        "registration_status": {
          "status": "active",
          "local_code": "2",
          "local_description": "Ativa",
          "date": "2019-06-19"
        },
        "share_capital_amount": 0,
        "authority": "RFB"
      },
      "registry_lists": []
    }
  ]
}

What each field means

FieldSource (RFB)Notes
company.legal_nameNome empresarial
company.nameNome fantasiaThe legal name when the company has no trade name.
company.legal_formNatureza jurídica"{code} - {description}", for example "2062 - Sociedade Empresária Limitada".
company.date_of_birthData de aberturaOpening date, YYYY-MM-DD.
company.date_of_endData da situação cadastralClosing date, YYYY-MM-DD. Only when the CNPJ is closed (cancelled, Baixada).
company.total_sharesCapital socialShare capital in BRL, rounded to a whole number.
company.email, company.phoneCorreio eletrônico, telefoneOnly when RFB has them. The phone comes in E.164 format.
company.tax_registrations[].activeSituação cadastraltrue only when registration_status.status is active.
company.tax_registrations[].authorityAlways "RFB".
company.tax_registrations[].statusOpção pelo MEI / Simples NacionalFULL only: "MEI" or "Simples nacional". See Tax regime.
company.addressEndereçoaddress_line_2 is the complemento. state is the ISO 3166-2 code, for example BR-SP.
company_validation_result.registration_statusSituação cadastralSee the table below.
company_validation_result.share_capital_amountCapital socialShare capital in BRL, with cents.

Registration status

statuslocal_codelocal_descriptiontax_registrations[].active
active2Ativatrue
irregular5Ativa Não Regularfalse
suspended3Suspensafalse
inactive4Inaptafalse
cancelled8Baixadafalse
annulled1Nulafalse

date is the date of the last status change.

When the CNPJ is closed (cancelled, Baixada), that date is also the company's closing date, in company.date_of_end. With update_company: true, Brinta saves it on the company:

"company": {
  "legal_name": "GIAZEILN ZAUZ QWSIRU",
  "date_of_birth": "1981-12-26",
  "date_of_end": "1999-12-12",
  "tax_registrations": [
    {
      "number": "31151791000184",
      "type": "CNPJ",
      "level": "country",
      "location": "BR",
      "authority": "RFB",
      "active": false
    }
  ]
},
"company_validation_result": {
  "registration_status": {
    "status": "cancelled",
    "local_code": "8",
    "local_description": "Baixada",
    "date": "1999-12-12"
  }
}

Failed

{
  "id": "tiv2-a1ccab0a-872c-49ca-83ca-e1d6eb1f6b44",
  "status": "failed",
  "validation_type": "BASIC",
  "periods": ["2026-11"],
  "data": [
    {
      "location": "BR",
      "status": "failed",
      "errors": ["Invalid CNPJ"],
      "registry_lists": []
    }
  ]
}
Message in errorsWhat to do
Invalid CNPJThe check digits are wrong or the format isn't valid. Check it with the customer.
CNPJ not foundRFB has no company with that CNPJ. Check it with the customer.
Provider unavailable: {code}RFB's service didn't answer. Send the validation again in a few minutes.

Common mistakes

MistakeFix
Stripping the letters of an alphanumeric CNPJSend it as it is, in uppercase.
Sending a CPF with type: "CNPJ"A CPF has 11 digits and belongs to an individual. BASIC and FULL validate CNPJs only.
Treating succeeded as "the company is active"Check company_validation_result.registration_status.status, or tax_registrations[].active.
Using BASIC to get the partnersPartners only come with FULL.

Did this page help you?