---
Source: https://docs.microblink.com/verify/consent
Title: Get your users' consent
Description: Collect and submit end-user consent for document verification with the BlinkID Verify cloud API
---

# Get your users' consent

:::note[Cloud only]

Consent applies to the cloud API only.

:::

You need end-user consent to verify a document with the cloud API.
Every request to `/api/v3/verify` must carry a `consent` part.
If it's missing, the request is rejected and no verification is performed.


Consent is scoped to an end user and to a duration, not to a single request.
You declare who gave consent (`userId`) and how long it's valid (`durationDays`), and each request registers a consent record against that user.

## Structure

Consent is defined as the following structure:

```json title="consent.json"
{
  "userId": "<your-id-for-the-end-user>",
  "durationDays": 365,
  "givenOn": "2026-07-31T09:00:00Z",
  "note": "User agreed to identity verification terms.",
  "customerContext": {
    "customerId": "<your-customer-id>",
    "transactionId": "<your-transaction-id>"
  }
}
```

Two fields are required:

- `userId`: Your own unique identifier for the end user granting the consent.
  This is the field that ties consent records to a person in your system, so keep it stable across requests for the same end user.
- `durationDays`: How long the consent stays valid.
  The expiry date is calculated from it, so pick a duration that matches the retention period stated in your own privacy notice.

The rest are optional:

- `givenOn`: When the end user granted the consent.
- `note`: The consent statement, agreement text, or notes associated with the consent.
  Use it to record what the end user actually agreed to.
- `customerContext.customerId`: Your own identifier for the customer entity the consent belongs to.
- `customerContext.transactionId`: Your own identifier for the transaction the consent was collected for.

## Submit the consent

Send the consent as a **text form value** named `consent`, containing the JSON object.
Unlike `configuration`, it can't be sent as a file part.

<ApiSample
  method="POST"
  url="https://us-east.verify.microblink.com/api/v3/verify"
  headers={{ Authorization: "Basic <credentials>" }}
  formData={[
    { name: "imageFirstSide", fileName: "front_id.jpg" },
    { name: "imageSecondSide", fileName: "back_id.png" },
    {
      name: "consent",
      value: {
        userId: "<your-id-for-the-end-user>",
        durationDays: 365,
      },
    },
  ]}
/>

:::note[Regions]

Code examples here use the `us-east` region.
Use the appropriate [region](./api.md#regions) for your deployment.

:::


Last updated on Aug 4, 2026
