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, defaulttrue;falsecharges only the 20 base credits and lists the partners without checks),digital_presence(email, domain and website, defaulttrue),government_contracts(defaulttrue) andnews(adverse news:none, the default,companyorcompany_and_partners, which requirespartners). Sanctions, watchlists, tax debt and registry are always checked. Anything turned off shows innot_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_TRUNCATEDalert. - 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
failedand nothing is charged. Just submit it again. - Idempotency (optional): send the
Idempotency-Keyheader (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 (headerIdempotent-Replayed: true), without creating another check or charging again; with a different body it returns 422IDEMPOTENCY_KEY_REUSED; while the first request is still running, 409IDEMPOTENCY_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 showsUNAVAILABLEand the KYB completes.
How the KYB is processed
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_idandcredits_estimated. Nothing is charged at this step.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.You follow along
Call
GET /v1/compliance/kyb/{id}untilcompletedorfailedor wait for the event at your registered webhook. In the dashboard, the list refreshes on its own.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
truewhen the KYB was accepted. - data.screening_idstring
- KYB identifier (
kyb_…). Use it to follow along. - data.statusstring
pendingon creation. Thencompletedorfailed.- data.created_atstring
- Creation date and time, ISO 8601 (UTC).
- data.queryobject
- What was checked:
cnpjanddescription. - 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_contractsandnews. - 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
Locationheader. - 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.
| CNPJ | Result |
|---|---|
| 12.345.678/0001-95 | Active company, no findings (LOW). |
| 11.222.333/0001-81 | Company active debt of R$ 80,000.00 and a PEP partner (MEDIUM). |
| 12.ABC.345/01DE-35 | Company in CEIS and an unfit bidder at TCU (HIGH). |
| 11.444.777/0001-61 | Closed company, no partners (HIGH). |
| 10.000.000/0001-45 | Company in the slave labor registry and a partner with a possible international sanctions match (HIGH). |
| 10.000.000/0003-07 | Entity in CEPIM, with a leniency agreement and a possible match in international sanctions on companies (HIGH). |
| 10.000.000/0004-98 | Federal government supplier with 12 contracts: for information only, risk stays LOW. |
| 10.000.000/0005-79 | Email domain without MX, registered a few weeks ago, and the website is offline (MEDIUM). |
| 10.000.000/0006-50 | With 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-26 | One source down: the KYB ends as failed, with no charge. |
Webhook notice
- When the KYB finishes, we send the
compliance.kyb.completedorcompliance.kyb.failedevent to the webhook registered in the dashboard (Webhook), withscreening_id, cnpj, status,risk_levelandrules_version(if completed),error_code(if failed),credits_chargedand 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-signatureheader, 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
202 Accepted
webhook · compliance.kyb.completed