POST /api/v1/bureau/runs
Creates and immediately triggers a new bureau run for the subject document you specify. The run executes asynchronously against all sources configured in the template. You always receive a202 Accepted response with a run_id you can use to poll for completion.
Authentication: X-API-Key with runs:write scope. You may also pass the key as Authorization: Bearer <key>.
Request body
The ID of the published KYC template to execute. The template must belong to your account or be a global template. You can find template IDs in the kycert dashboard under Templates.
An object containing the subject’s data. The required fields depend on the template’s
parametros_schema. At minimum, you must include the document field (typically cpf for PF templates or cnpj for PJ templates).Your system’s reference ID for this run. Stored in
flags.external_id and returned on every response. Use this to correlate runs with your internal records without additional lookups. You can also filter the list endpoint by external_id.Custom key-value pairs attached to the run. Keys and values must both be strings. Maximum 10 keys; each value must not exceed 500 characters. Metadata is returned on
GET /runs, GET /runs/{id}, and GET /runs/{id}/analysis responses.Idempotency
Pass anIdempotency-Key: <your-unique-key> request header to make POST /api/v1/bureau/runs idempotent. If kycert receives a second request with the same key within 24 hours for the same tenant, it returns the original run_id and status without triggering a new run. Use a UUID or a hash of your external_id.
Response — 202 Accepted
The run is always enqueued asynchronously. You receive202 immediately.
Unique identifier for the run. Use this to poll
GET /api/v1/bureau/runs/{id} for completion.Always
"queued" on creation.Estimated seconds until the run completes, calculated from the slowest enabled source in the template. Treat this as a hint for your polling interval — actual duration may vary.
true when the run executes against live data sources. false in the sandbox environment, where results are simulated.curl example
Error responses
| HTTP status | error.code | Cause |
|---|---|---|
400 | missing_template_id | template_id was omitted or not a string. |
400 | template_not_found | Template does not exist or is not active for your account. |
400 | invalid_parametros | One or more required parametros fields are missing or unknown. The response includes an invalid_params array. |
400 | missing_document | The document field (e.g., cpf or cnpj) was not found in parametros. |
400 | invalid_document | The document does not have 11 digits (CPF) or 14 digits (CNPJ). |
402 | billing_suspended | Your account is suspended or has insufficient credit. |
403 | insufficient_scope | The API key does not have runs:write scope. |
429 | rate_limit_exceeded | The API key has exceeded its usage limit. |
GET /api/v1/bureau/runs
Lists all bureau runs for your account in reverse chronological order. Results are paginated using a cursor. Authentication:X-API-Key with runs:read scope.
Query parameters
Opaque pagination cursor returned as
next_cursor in the previous response. Pass this value to retrieve the next page.Number of runs to return per page. Minimum
1, maximum 100, default 20.Filter by run status. Accepted values:
pending, running, em_analise, completed, failed, partial, cancelado.Filter runs to those executed against a specific template.
Filter runs by your reference ID, set via
external_id at creation time.ISO 8601 timestamp. Returns only runs created at or after this time (e.g.,
2024-01-15T00:00:00Z).ISO 8601 timestamp. Returns only runs created before or at this time.
Response — 200 OK
Array of run summary objects.
true if additional pages exist. Pass next_cursor to retrieve the next page.Opaque cursor for the next page. Only present when
has_more is true.true when the results come from live runs.curl example
GET /api/v1/bureau/runs/{id}
Retrieves a single bureau run by itsrun_id. While the run is still executing, this endpoint returns 202 with status: "running" and a retry_after_seconds hint. Once completed, it returns 200 with the full result.
Authentication: X-API-Key with runs:read scope.
Path parameters
The
run_id returned when the run was created.Response — 202 (run still executing)
Response — 200 (run completed)
Unique run identifier.
Final run status. One of:
completed, failed, partial, cancelado. For in-progress runs, see the 202 response above.Overall compliance decision computed from the decision rules in the template:
approved, rejected, or review.The operative decision after accounting for incomplete critical sources. Returns
hold when one or more tier-1 sources failed to return data, regardless of the overall decision.Aggregate risk band assigned to the subject:
baixo, medio, or alto.Your reference ID, echoed back from creation.
Custom key-value metadata set at creation time.
ISO 8601 timestamp.
ISO 8601 timestamp of completion.
null when the run is still in progress.Environment indicator.
curl example
GET /api/v1/bureau/runs/{id}/analysis
Returns the full risk analysis for a completed run. The analysis is computed deterministically from the source results — it includes the structured risk dimensions, per-finding detail, and a subject profile extracted from identity sources. If the run is still executing, this endpoint returns202.
Authentication: X-API-Key with runs:read scope.
Path parameters
The
run_id of a completed run.Response — 200 OK
Envelope metadata for the analysis response.
Custom key-value metadata attached to the run at creation.
The full
BureauRunAnalysis object.curl example
GET /api/v1/bureau/runs/{id}/report
Downloads the PDF compliance report for a completed bureau run. The report is generated on demand and stored immutably — subsequent calls for the samerun_id and mode return the identical document.
Authentication: X-API-Key with runs:read scope.
Report generation is triggered separately from the run. Use
POST /api/v1/bureau/runs/{id}/report (dashboard-only) to generate the PDF before downloading. Once generated, GET returns it immediately via a 302 redirect to a time-limited signed URL.Path parameters
The
run_id of a completed run.Query parameters
Report format. Either
"resumido" (summary, ~3 pages) or "completo" (full dossier, 20+ pages).- resumido — overall decision, risk band, key findings, and analyst sign-off block.
- completo — all source data, partner graphs, legal processes, complete check details, and appendix.
Response — 302 Redirect → application/pdf
The endpoint redirects to a signed download URL valid for 1 hour. Your HTTP client follows the redirect and streams the binary PDF.
Requesting
mode=completo may take a few seconds longer on the first call, as the full dossier renders all source data, QSA partner runs, and appendix pages. Subsequent requests for the same run return the cached PDF instantly.curl example
Error responses
| HTTP status | Cause |
|---|---|
400 | Missing or invalid mode parameter. |
400 | Run has not reached a terminal status yet. |
404 | Report has not been generated yet. Use the dashboard or the POST endpoint to generate it first. |