Docs
Address verifications

Check a code

Checks the code the person typed into your website or app.

POST
/verifications/{verification_id}/check

Authorization

apiKey
headerAuthorizationBearer <token>

API key in the Authorization: Bearer cf_live_... header. Create and revoke keys in the dashboard, under Desenvolvedores > Chaves de API (Developers > API keys).

Path Parameters

verification_id*string

The verification id, starting with ver_.

Request Body

application/json
  1. body
code*string

The code the person typed: 6 digits, no spaces. Strip spaces and dashes before sending.

Match^[0-9]{6}$

Response Body

The result of the check. See correct.

application/json
  1. response

The result of a code check. A wrong code is not an API error: the response is 200, with correct: false.

object*string

Object type. Always verification_check.

correct*boolean

true when the code is right: the verification moved to verified, with confirmation.method: api. false when it is wrong: attempts_remaining went down and, if it reached 0, the verification moved to failed.

verification*

The verification, already updated.

curl -X POST "https://api.cartaflow.com.br/v1/verifications/string/check" \  -H "Authorization: Bearer $CARTAFLOW_API_KEY" \  -H "Content-Type: application/json" \  -d '{  "code": "482917"}'

{  "object": "verification_check",  "correct": true,  "verification": {    "id": "ver_8Wn2Rt6Yk4Js",    "object": "verification",    "status": "verified",    "method": "code",    "source": "api",    "to": {      "name": "Destinatário Exemplo",      "street": "Praça da Sé",      "number": "128",      "complement": "Ap. 52",      "neighborhood": "Sé",      "city": "São Paulo",      "state": "SP",      "postal_code": "01001-000"    },    "document": {      "type": "template",      "title": "Confirme o seu endereço",      "body": "{{empresa}} pediu a confirmação de que você recebe correspondência neste endereço. Use o código abaixo para confirmar.",      "footer": "O código vale por 60 dias depois da postagem e só funciona para este endereço. Não compartilhe este código com ninguém.",      "include_qr_code": false,      "include_page_url": false    },    "instructions": "Abra o app, vá em Perfil > Endereço e digite o código.",    "return_url": null,    "hosted_page_url": null,    "attempts_remaining": 5,    "expires_at": "2026-12-14T16:05:00Z",    "confirmation": {      "method": "api",      "hosted_page_entry": null,      "confirmed_at": "2026-10-21T19:32:00Z",      "ip": "203.0.113.10",      "location": null,      "user_agent": "node",      "device": null,      "client": null,      "precise_location": null    },    "preview_url": "https://files.cartaflow.com.br/previews/ver_8Wn2Rt6Yk4Js.pdf?expires=1760369400&signature=a17c4e20",    "price": {      "currency": "BRL",      "total": 990,      "items": [        {          "type": "base",          "quantity": 1,          "unit_amount": 990,          "amount": 990        }      ]    },    "reference": "cliente-1842",    "metadata": {},    "status_transitions": {      "in_production_at": "2026-10-13T21:00:00Z",      "awaiting_code_at": "2026-10-15T16:05:00Z",      "verified_at": "2026-10-21T19:32:00Z",      "failed_at": null,      "expired_at": null,      "canceled_at": null,      "revoked_at": null    },    "created_at": "2026-10-13T14:20:00Z"  }}