Skip to content

KYB (Company Compliance)

POST/v1/compliance/kyb

Creates a KYB check of a company and its individual partners using only public sources: CEIS, CNEP, CEPIM, TCU (unfit bidders), leniency agreements, international sanctions on companies, the slave labor registry and active federal debt (PGFN) for the company, federal government contracts (for information), the registered email, domain and website of the company and, for each partner, PEP, CEAF, active debt, slave labor and international sanctions. Processing is asynchronous: the API returns 202 with a screening_id and you read the result with GET /v1/compliance/kyb/{id} or receive the compliance.kyb.completed event at the webhook registered in the dashboard.

Request body

cnpjstringrequired
CNPJ without punctuation (14 characters), numeric or alphanumeric.
descriptionstringrequired
Purpose of the check, 1 to 200 characters. Example: "Supplier onboarding".
optionsobject
What goes into the KYB (all optional): partners (check the partners, default true; false charges only the 20 base credits and lists the partners without checks), digital_presence (email, domain and website, default true), government_contracts (default true) and news (adverse news: none, the default, company or company_and_partners, which requires partners). Sanctions, watchlists, tax debt and registry are always checked. Anything turned off shows in not_checked.

20 credits + 5 per individual partner checked (up to 10 partners, 70 credits at most), only when the KYB completes. With `options.partners` = `false`, only the 20 credits. News, online presence and contracts do not change the price. The exact amount comes in `credits_estimated` in the 202.

  • The company is read right away from the CNPJ open data. A CNPJ that does not exist returns 404 (CNPJ_NOT_FOUND) and a registry source outage returns 503; in both cases nothing is created or charged.
  • Only individual partners (foreigners included) are checked, up to 10. Corporate partners are listed without a check. A company with more than 10 individual partners gets the PARTNERS_TRUNCATED alert.
  • The Federal Revenue publishes partners' CPF masked: PEP, CEAF, active debt and slave labor match the 6 visible digits with the name, and international sanctions match the name only. These are indications: verify before deciding. Partners' CEIS, CNEP and TCU are not checked, because they require the full CPF.
  • KYB is not available on the Free plan: the response is 403 (PLAN_NOT_ALLOWED), sandbox included. Without a balance for the KYB cost (and no overage), the response is 402 and nothing starts.
  • If any source is unavailable, the KYB ends as failed and nothing is charged. Just submit it again.
  • Idempotency (optional): send the Idempotency-Key header (1 to 255 characters) to retry the request without risk of duplicates. For 24 h, the same key with the same body returns the same 202 response (header Idempotent-Replayed: true), without creating another check or charging again; with a different body it returns 422 IDEMPOTENCY_KEY_REUSED; while the first request is still running, 409 IDEMPOTENCY_IN_PROGRESS. Error responses are not stored.
  • Not part of the KYB: lawsuits, notary protests and credit score. The result lists what was not checked in not_checked.
  • Privacy (LGPD): partners' names and masked documents stay in the history for 30 days; then they are deleted and the company, risk, alerts and findings remain.
  • Adverse news (options.news): AI web search, at no extra cost. Only links that came from the search are kept; each item has outlet, date, the entity's role (accused, investigated, convicted, victim, only mentioned) and whether the text links it to the company or partner (confirmed) or it may be a namesake (possible_homonym). A confirmed item accusing the entity raises a MEDIUM alert (HIGH with a conviction or 3 or more confirmed accusations or investigations); namesakes and mentions are listed without an alert. Always review before deciding. If the search does not respond, it shows UNAVAILABLE and the KYB completes.

How the KYB is processed

  1. You send the CNPJ and the purpose

    The API checks the format, reads the company and its partners, computes the cost, checks the balance and returns 202 with the screening_id and credits_estimated. Nothing is charged at this step.

  2. Company and partners are checked

    The company's sources and each individual partner's sources respond in parallel, in the background. A source outage ends the KYB as failed, with no charge.

  3. You follow along

    Call GET /v1/compliance/kyb/{id} until completed or failed or wait for the event at your registered webhook. In the dashboard, the list refreshes on its own.

  4. The charge happens once

    Credits are debited only when every source responds. The history stays in your account and can be read later at no extra cost.

202 response fields

successboolean
Always true when the KYB was accepted.
data.screening_idstring
KYB identifier (kyb_…). Use it to follow along.
data.statusstring
pending on creation. Then completed or failed.
data.created_atstring
Creation date and time, ISO 8601 (UTC).
data.queryobject
What was checked: cnpj and description.
data.credits_estimatednumber
Credits debited if the KYB completes: 20 + 5 per individual partner checked.
data.optionsobject
What was requested, with the defaults applied: partners, digital_presence, government_contracts and news.
data.companyobject
Company record at request time: legal name, trade name, status, opening date, legal nature, size, share capital, main CNAE, tax regime, head office or branch and city.
data.status_urlstring
Path to follow the KYB. Also in the Location header.
credits_remainingnumber
Current balance, not yet including the KYB cost. Can be hidden in the dashboard.

Test CNPJs in the sandbox

In the sandbox (api-sandbox.brazid.com) the KYB uses the sandbox CNPJ data and these scenarios, with no credits charged. Any other CNPJ in the test data (or test prefixes) ends with no findings.

CNPJResult
12.345.678/0001-95Active company, no findings (LOW).
11.222.333/0001-81Company active debt of R$ 80,000.00 and a PEP partner (MEDIUM).
12.ABC.345/01DE-35Company in CEIS and an unfit bidder at TCU (HIGH).
11.444.777/0001-61Closed company, no partners (HIGH).
10.000.000/0001-45Company in the slave labor registry and a partner with a possible international sanctions match (HIGH).
10.000.000/0003-07Entity in CEPIM, with a leniency agreement and a possible match in international sanctions on companies (HIGH).
10.000.000/0004-98Federal government supplier with 12 contracts: for information only, risk stays LOW.
10.000.000/0005-79Email domain without MX, registered a few weeks ago, and the website is offline (MEDIUM).
10.000.000/0006-50With options.news on, a simulated news item about a police operation cites the company's CNPJ and, with company_and_partners, another links the partner to the same operation (MEDIUM). Without news (default), LOW.
10.000.000/0002-26One source down: the KYB ends as failed, with no charge.

Webhook notice

  • When the KYB finishes, we send the compliance.kyb.completed or compliance.kyb.failed event to the webhook registered in the dashboard (Webhook), with screening_id, cnpj, status, risk_level and rules_version (if completed), error_code (if failed), credits_charged and the dates.
  • The event carries neither the partners nor the findings. To read the result, call GET /v1/compliance/kyb/{id}.
  • Same rules as the other webhooks: signature in the x-brazid-signature header, up to 3 attempts (right away, +5 min and +1 h) and history under "Latest events sent". With no webhook registered, nothing is sent: follow along with the GET.

cURL

1curl -X POST https://api.brazid.com/v1/compliance/kyb \2 -H "x-api-key: $BRAZID_API_KEY" \3 -H "Content-Type: application/json" \4 -d '{"cnpj":"11222333000181","description":"Onboarding de fornecedor","options":{"news":"company"}}'

202 Accepted

1{2 "success": true,3 "data": {4 "screening_id": "kyb_4b7e1a9c2d8f6035",5 "status": "pending",6 "created_at": "2026-11-17T14:00:00.000Z",7 "query": {8 "cnpj": "11222333000181",9 "description": "Onboarding de fornecedor"10 },11 "credits_estimated": 30,12 "options": {13 "partners": true,14 "digital_presence": true,15 "government_contracts": true,16 "news": "company"17 },18 "company": {19 "cnpj": "11222333000181",20 "legal_name": "EMPRESA EXEMPLO COMERCIO DE ALIMENTOS LTDA",21 "trade_name": "EXEMPLO ALIMENTOS",22 "status": "ATIVA",23 "status_date": "2015-04-10",24 "opening_date": "2015-04-10",25 "legal_nature": "206-2 - Sociedade Empresária Limitada",26 "company_size": "Empresa de Pequeno Porte (EPP)",27 "share_capital": 250000,28 "main_cnae": {29 "code": "4639701",30 "text": "Comércio atacadista de produtos alimentícios em geral"31 },32 "tax_regime": "SIMPLES_NACIONAL",33 "branch_type": "MATRIZ",34 "address": {35 "city": "SAO PAULO",36 "state": "SP"37 }38 },39 "status_url": "/v1/compliance/kyb/kyb_4b7e1a9c2d8f6035"40 }41}

webhook · compliance.kyb.completed

1{2 "id": "evt_7c2e9a41f0b358d6e1a4c90b",3 "type": "compliance.kyb.completed",4 "screening_id": "kyb_4b7e1a9c2d8f6035",5 "cnpj": "11222333000181",6 "status": "completed",7 "risk_level": "MEDIUM",8 "rules_version": 0,9 "credits_charged": 30,10 "created_at": "2026-11-17T14:00:00.000Z",11 "completed_at": "2026-11-17T14:00:07.000Z"12}