Compliance & Background Check
POST/v1/compliance/kyc
Creates a compliance screening for an individual: PEP, sanctions (CEIS and CNEP), federal administration expulsions (CEAF), TCU lists, slave labor, federal active debt (PGFN) and international sanctions. Processing is asynchronous: the API replies 202 with a screening_id, and you read the result with GET /v1/compliance/kyc/{id} or receive the compliance.kyc.completed event at the webhook registered in the dashboard.
Request body
- cpfstringrequired
- CPF, digits only (11), no punctuation.
- descriptionstringrequired
- Purpose of the lookup, 1 to 200 characters. Example: "Anti-money laundering".
- birthdatestringrequired
- Birth date of the individual,
YYYY-MM-DD. The cadastral lookup is the same asPOST /v1/cpf/liveand checks CPF and birth date together; on a mismatch the screening ends asfailed(CPF_NOT_FOUND). It is neither returned nor stored.
20 credits per completed screening. Failed screenings are not charged.
- The birth date is required, as in
POST /v1/cpf/live; missing or invalid returns 400.basic_info(name, cadastral status and birth date) comes from the BrazID base and, if the CPF is not in it yet, is fetched with the standard cadastral lookup at no extra cost. If the CPF does not exist or the birth date does not match, the screening ends asfailedwith the codeCPF_NOT_FOUNDand nothing is charged. - Privacy (LGPD): the full CPF, name and birth date are kept for 30 days. After that they are erased and the history keeps the masked CPF, the purpose, the risk and the findings. At the data subject's request the erasure is immediate.
- The screening is not available on the Free plan: the response is 403 (
PLAN_NOT_ALLOWED), sandbox included. Without a balance for 20 credits (and no overage), the response is 402 and the screening does not start. A malformed CPF returns 400 and an invalid check digit returns 422. - If a source is unavailable, the screening ends with status
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. - Available in production and in the sandbox. In the sandbox nothing is charged and the response uses the test data.
How a screening is processed
You send the CPF, the birth date and the purpose
The API validates the input, checks the balance and replies 202 with the
screening_idand the statuspending. Nothing is charged at this step.Sources are queried in parallel
CGU (PEP, CEIS, CNEP and CEAF), TCU (unfit bidders, disqualified, irregular accounts and electoral), the slave labor registry, active debt (PGFN) and international sanctions are queried at the same time, in the background. Checks that only need the CPF start together with the registry lookup.
You follow along
Call
GET /v1/compliance/kyc/{id}until the status iscompletedorfailed, or wait for the event at your registered webhook.Charged once
The 20 credits are debited only when every source answers. The history is kept in your account and can be read at any time, at no extra cost; personal data is erased after 30 days.
202 response fields
- successboolean
- Always
truewhen the screening was accepted. - data.screening_idstring
- Screening identifier (
kyc_…). Use it to follow progress. - data.statusstring
pendingon creation. Thencompletedorfailed.- data.created_atstring
- Creation date and time, ISO 8601 (UTC).
- data.queryobject
- What was queried:
cpf(digits only) anddescription. - data.status_urlstring
- Path to follow the screening. Also sent in the
Locationheader. - credits_remainingnumber
- Current balance. It does not include the 20 credits of this screening yet. Can be hidden in the dashboard.
Test CPFs in the sandbox
In the sandbox (api-sandbox.brazid.com) the screening uses these CPFs, with no credits charged. Any other CPF ends as failed with CPF_NOT_FOUND.
| CPF | Birth date | Result |
|---|---|---|
| 529.982.247-25 | 1982-11-26 | No findings in any source (LOW). |
| 111.444.777-35 | 1985-05-12 | Active debt of R$ 12,500.50 with PGFN (LOW). |
| 168.995.350-09 | 1974-02-03 | Active debt of R$ 250,000.00 with PGFN (MEDIUM). |
| 390.533.447-05 | 1969-09-30 | Politically exposed person (MEDIUM). |
| 248.438.034-80 | 1978-12-01 | Listed in CEIS (HIGH). |
| 935.411.347-80 | 1963-07-21 | Listed in the slave labor registry (HIGH). |
| 453.178.287-91 | 1971-04-17 | Every source at once, with a slow 3 s response (HIGH). |
| 862.883.667-57 | 1990-08-25 | One source is down: the screening ends as failed, with no charge. |
| 417.258.136-61 | 1966-03-09 | Barred from public office and with irregular accounts at the TCU, including electoral implication (MEDIUM). |
| 603.192.847-78 | 1980-10-14 | Listed in CNEP, expelled from the federal administration (CEAF) and a TCU unfit bidder (HIGH). |
Webhook notice
- When the screening finishes, we send the
compliance.kyc.completedorcompliance.kyc.failedevent to the webhook registered in the dashboard (Webhook), withscreening_id, status,risk_levelandrules_version(if completed),error_code(if failed),credits_chargedand the dates. - The event carries no personal data (not even the CPF). To read the result, call
GET /v1/compliance/kyc/{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.kyc.completed