> This page is for Internet banking (beta).

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://en.docs.api.corpx.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://en.docs.api.corpx.com/_mcp/server.

# Consume an approved identity verification

POST https://client.api.corpx.com/v1/identity-verifications/{verificationId}/consume
Content-Type: application/json

Atomically marks an approved verification as consumed. `purpose` and
`referenceId` must exactly match the values stored at creation, the
status must be `APPROVED`, and the call must arrive no later than
`consumableUntil`.

The exact retry — same `verificationId`, `purpose` and `referenceId` —
is idempotent and returns the already-consumed result. A different
purpose/reference, a competing consume, a non-approved terminal state
or an expired consumption window returns `409`.

Requires a master M2M credential, the `identity_verification.manage`
scope and `X-Tenant-Id`.


Reference: https://en.docs.api.corpx.com/ib/referencia/identity-verification/consume-identity-verification

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `verificationId` (string, required) — Standalone identity verification identifier returned by the creation endpoint.

### Headers

- `X-Tenant-Id` (string, required) — Tenant context used for authorization and routing.
- `Idempotency-Key` (string, optional) — Optional client-generated idempotency token (recommended for safe retries).
- `X-Request-Timestamp` (string, required) — Unix seconds. Required on the signed host; tolerance is 300s either way (`403 request_timestamp_skew`).
- `X-Content-SHA256` (string, required) — Lowercase hex SHA-256 of the body. An empty body hashes the empty string, so the header is always present. Mismatch returns `400 body_hash_mismatch`.
- `X-Request-Signature` (string, required) — Detached JWS (`<protected>..<signature>`, ES256 or PS256) over `METHOD\nPATH?QUERY\nTIMESTAMP\nIDEMPOTENCY_KEY_OR_EMPTY\nX_CONTENT_SHA256`.

### Body (application/json)

This endpoint expects an IdentityVerificationConsumeRequest.

- `purpose` (enum, required) — Sensitive journey that this proof is allowed to authorize.
  - Allowed values: `password_reset`, `second_factor_reset`, `high_value_transaction`, `sensitive_action`
- `referenceId` (string, required) — Must exactly equal the `referenceId` supplied at creation.

## Response

### 200

Verification consumed, or the result of an exact retry.

- `verificationId` (string, required) — Standalone verification identifier.
- `status` (enum, required) — Current state of the standalone verification.
  - Allowed values: `PENDING`, `APPROVED`, `FAILED`, `EXPIRED`
- `purpose` (enum, required) — Sensitive journey that this proof is allowed to authorize.
  - Allowed values: `password_reset`, `second_factor_reset`, `high_value_transaction`, `sensitive_action`
- `referenceId` (string, required) — Caller-owned journey identifier supplied at creation.
- `document` (string, required) — CPF verified by this journey, with 11 digits and no punctuation.
- `provider` (enum, required) — Identity provider that processed the journey.
  - Allowed values: `unico`, `dracma_trust`
- `expiresAt` (datetime, required) — RFC 3339 instant at which the pending journey expires.
- `method` (enum, optional, default: link) — How the person is captured. `link` (default) opens the provider's hosted page via `verificationLink`; `facetec_sdk` means your app embeds the FaceTec SDK v10 and sends captures to `/facetec/process`.
  - Allowed values: `link`, `facetec_sdk`
- `referenceMatch` (enum, optional, default: dracma) — Only for `method: facetec_sdk`. `none` = liveness only (proves a live person, not who they are); `dracma` (default) = liveness + 1:1 face match against DracmaTrust's reference for the CPF; `image` = liveness + 1:1 face match against the `referenceImage` you send in `/facetec/process`.
  - Allowed values: `none`, `dracma`, `image`
- `verificationLink` (string, optional) — Present only while `status` is `PENDING` and `method` is `link`.
- `attemptsRemaining` (integer, optional) — Failed captures still allowed. Only for `method: facetec_sdk`.
- `checks` (IdentityVerificationChecks, optional) — Per-capability result, read separately from the aggregate `status`. `faceMatch.result` is `not_performed` when `referenceMatch` is `none`: an `APPROVED` in that mode only proves liveness.
- `failureReason` (enum, optional) — Provider-normalized reason when the journey failed or expired; otherwise null or omitted.
  - Allowed values: `liveness_failed`, `face_mismatch`, `document_mismatch`, `provider_rejected`, `provider_error`
- `completedAt` (datetime, optional, nullable) — Terminal transition time for `APPROVED`, `FAILED` or `EXPIRED`.
- `consumableUntil` (datetime, optional, nullable) — Last instant at which an approved result may be consumed. Set for `APPROVED`.
- `consumedAt` (datetime, optional, nullable) — First successful consume time; null or omitted until consumption.

## Errors

### 400 Bad Request Error

Invalid payload.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 401 Unauthorized Error

Authentication failed or token missing.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 403 Forbidden Error

Insufficient scope or caller is not the master M2M credential.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 404 Not Found Error

Verification not found in this tenant (`verification_not_found`).

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 409 Conflict Error

Verification is not approved/consumable, the consumption window ended, or the stored/previously consumed purpose and reference do not exactly match this request. `verification_not_consumable` covers the state/window/binding; `reference_already_consumed` means another approved proof already consumed the same tenant/purpose/reference.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

### 500 Internal Server Error

Unexpected server error.

- `errorCode` (string, required) — Stable machine-readable code. See `ErrorCode` for the known values.
- `message` (string, required) — Human-readable explanation (pt-BR). Presentation only; may change.
- `docs` (string, optional) — Link to this code in the public error catalogue.
- `requestId` (string, optional) — Gateway request id. Quote it when contacting support.
- `details` (map from string to any, optional) — Optional machine-readable context for the specific `errorCode` (for example `kind` on `identity_verification_monthly_limit_exceeded`, `maxBytes` on `payload_too_large`, `attemptsRemaining` on `facetec_attempts_exhausted`). Keys are documented per operation; absent when the code carries no extra context.
- `partner` (ErrorResponsePartner, optional) — Raw error from the settlement bank, when the failure came from it. Diagnostic only.

## Types

### IdentityVerificationChecks

Per-capability result, read separately from the aggregate `status`. `faceMatch.result` is `not_performed` when `referenceMatch` is `none`: an `APPROVED` in that mode only proves liveness.

- `liveness` (enum, required) — 3D liveness (presentation-attack detection) result.
  - Allowed values: `pending`, `passed`, `failed`
- `faceMatch` (IdentityVerificationChecksFaceMatch, required)

### ErrorResponsePartner

Raw error from the settlement bank, when the failure came from it. Diagnostic only.

- `code` (string, optional)
- `message` (string, optional)
- `field` (string, optional) — Field the partner pointed at, when any.

### IdentityVerificationChecksFaceMatch

- `result` (enum, required) — 1:1 face match result against the chosen reference.
  - Allowed values: `pending`, `passed`, `failed`, `not_performed`
- `reference` (enum, optional) — Reference used. Omitted when `result` is `not_performed`.
  - Allowed values: `dracma`, `image`

## Examples

**Request**

```json
{
  "purpose": "password_reset",
  "referenceId": "usr_01J8Y6N7M8P9Q0R1S2T3"
}
```

**Response**

```json
{
  "verificationId": "idv_01J8Y7C8D9E0F1G2H3J4",
  "status": "APPROVED",
  "purpose": "password_reset",
  "referenceId": "usr_01J8Y6N7M8P9Q0R1S2T3",
  "document": "12345678909",
  "provider": "unico",
  "expiresAt": "2026-09-24T14:30:00Z",
  "completedAt": "2026-09-24T14:08:12Z",
  "consumableUntil": "2026-09-24T14:18:12Z",
  "consumedAt": "2026-09-24T14:10:05Z"
}
```

**SDK Code**

```python Identity Verification_consumeIdentityVerification_example
import requests

url = "https://client.api.corpx.com/v1/identity-verifications/verificationId/consume"

payload = {
    "purpose": "password_reset",
    "referenceId": "usr_01J8Y6N7M8P9Q0R1S2T3"
}
headers = {
    "X-Content-SHA256": "X-Content-SHA256",
    "X-Request-Signature": "X-Request-Signature",
    "X-Request-Timestamp": "X-Request-Timestamp",
    "X-Tenant-Id": "X-Tenant-Id",
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript Identity Verification_consumeIdentityVerification_example
const url = 'https://client.api.corpx.com/v1/identity-verifications/verificationId/consume';
const options = {
  method: 'POST',
  headers: {
    'X-Content-SHA256': 'X-Content-SHA256',
    'X-Request-Signature': 'X-Request-Signature',
    'X-Request-Timestamp': 'X-Request-Timestamp',
    'X-Tenant-Id': 'X-Tenant-Id',
    Authorization: 'Bearer <token>',
    'Content-Type': 'application/json'
  },
  body: '{"purpose":"password_reset","referenceId":"usr_01J8Y6N7M8P9Q0R1S2T3"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Identity Verification_consumeIdentityVerification_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://client.api.corpx.com/v1/identity-verifications/verificationId/consume"

	payload := strings.NewReader("{\n  \"purpose\": \"password_reset\",\n  \"referenceId\": \"usr_01J8Y6N7M8P9Q0R1S2T3\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Content-SHA256", "X-Content-SHA256")
	req.Header.Add("X-Request-Signature", "X-Request-Signature")
	req.Header.Add("X-Request-Timestamp", "X-Request-Timestamp")
	req.Header.Add("X-Tenant-Id", "X-Tenant-Id")
	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Identity Verification_consumeIdentityVerification_example
require 'uri'
require 'net/http'

url = URI("https://client.api.corpx.com/v1/identity-verifications/verificationId/consume")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Content-SHA256"] = 'X-Content-SHA256'
request["X-Request-Signature"] = 'X-Request-Signature'
request["X-Request-Timestamp"] = 'X-Request-Timestamp'
request["X-Tenant-Id"] = 'X-Tenant-Id'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"purpose\": \"password_reset\",\n  \"referenceId\": \"usr_01J8Y6N7M8P9Q0R1S2T3\"\n}"

response = http.request(request)
puts response.read_body
```

```java Identity Verification_consumeIdentityVerification_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://client.api.corpx.com/v1/identity-verifications/verificationId/consume")
  .header("X-Content-SHA256", "X-Content-SHA256")
  .header("X-Request-Signature", "X-Request-Signature")
  .header("X-Request-Timestamp", "X-Request-Timestamp")
  .header("X-Tenant-Id", "X-Tenant-Id")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"purpose\": \"password_reset\",\n  \"referenceId\": \"usr_01J8Y6N7M8P9Q0R1S2T3\"\n}")
  .asString();
```

```php Identity Verification_consumeIdentityVerification_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://client.api.corpx.com/v1/identity-verifications/verificationId/consume', [
  'body' => '{
  "purpose": "password_reset",
  "referenceId": "usr_01J8Y6N7M8P9Q0R1S2T3"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
    'X-Content-SHA256' => 'X-Content-SHA256',
    'X-Request-Signature' => 'X-Request-Signature',
    'X-Request-Timestamp' => 'X-Request-Timestamp',
    'X-Tenant-Id' => 'X-Tenant-Id',
  ],
]);

echo $response->getBody();
```

```csharp Identity Verification_consumeIdentityVerification_example
using RestSharp;

var client = new RestClient("https://client.api.corpx.com/v1/identity-verifications/verificationId/consume");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Content-SHA256", "X-Content-SHA256");
request.AddHeader("X-Request-Signature", "X-Request-Signature");
request.AddHeader("X-Request-Timestamp", "X-Request-Timestamp");
request.AddHeader("X-Tenant-Id", "X-Tenant-Id");
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"purpose\": \"password_reset\",\n  \"referenceId\": \"usr_01J8Y6N7M8P9Q0R1S2T3\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Identity Verification_consumeIdentityVerification_example
import Foundation

let headers = [
  "X-Content-SHA256": "X-Content-SHA256",
  "X-Request-Signature": "X-Request-Signature",
  "X-Request-Timestamp": "X-Request-Timestamp",
  "X-Tenant-Id": "X-Tenant-Id",
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "purpose": "password_reset",
  "referenceId": "usr_01J8Y6N7M8P9Q0R1S2T3"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://client.api.corpx.com/v1/identity-verifications/verificationId/consume")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```