---
title: "POST /setPassportDataErrors"
method: POST
path: "/setPassportDataErrors"
---

# POST /setPassportDataErrors

`POST /setPassportDataErrors`

Informs a user that some of the Telegram Passport elements they provided contains errors. The user will not be able to re-submit their Passport to you until the errors are fixed (the contents of the field for which you returned the error must change). Returns *True* on success.

Use this if the data submitted by the user doesn't satisfy the standards your service requires for any reason. For example, if a birthday date seems invalid, a submitted document is blurry, a scan shows evidence of tampering, etc. Supply some details in the error message to make sure the user knows how to correct the issues.

## Request body

- object
  - `user_id` integer, required — User identifier
  - `errors` PassportElementError[], required — A JSON-serialized array describing the errors
    - union — This object represents an error in the Telegram Passport element which was submitted that should be resolved by the user. It should be one of:
      - object — Represents an issue in one of the data fields that was provided by the user. The error is considered resolved when the field's value changes.
        - `source` string, required — Error source, must be *data*
        - `type` 'personal_details' | 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'address', required — The section of the user's Telegram Passport which has the error, one of “personal\_details”, “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “address”
        - `field_name` string, required — Name of the data field which has the error
        - `data_hash` string, required — Base64-encoded data hash
        - `message` string, required — Error message
      - object — Represents an issue with the front side of a document. The error is considered resolved when the file with the front side of the document changes.
        - `source` string, required — Error source, must be *front\_side*
        - `type` 'passport' | 'driver_license' | 'identity_card' | 'internal_passport', required — The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”
        - `file_hash` string, required — Base64-encoded hash of the file with the front side of the document
        - `message` string, required — Error message
      - object — Represents an issue with the reverse side of a document. The error is considered resolved when the file with reverse side of the document changes.
        - `source` string, required — Error source, must be *reverse\_side*
        - `type` 'driver_license' | 'identity_card', required — The section of the user's Telegram Passport which has the issue, one of “driver\_license”, “identity\_card”
        - `file_hash` string, required — Base64-encoded hash of the file with the reverse side of the document
        - `message` string, required — Error message
      - object — Represents an issue with the selfie with a document. The error is considered resolved when the file with the selfie changes.
        - `source` string, required — Error source, must be *selfie*
        - `type` 'passport' | 'driver_license' | 'identity_card' | 'internal_passport', required — The section of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”
        - `file_hash` string, required — Base64-encoded hash of the file with the selfie
        - `message` string, required — Error message
      - object — Represents an issue with a document scan. The error is considered resolved when the file with the document scan changes.
        - `source` string, required — Error source, must be *file*
        - `type` 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration', required — The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
        - `file_hash` string, required — Base64-encoded file hash
        - `message` string, required — Error message
      - object — Represents an issue with a list of scans. The error is considered resolved when the list of files containing the scans changes.
        - `source` string, required — Error source, must be *files*
        - `type` 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration', required — The section of the user's Telegram Passport which has the issue, one of “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
        - `file_hashes` string[], required — List of base64-encoded file hashes
        - `message` string, required — Error message
      - object — Represents an issue with one of the files that constitute the translation of a document. The error is considered resolved when the file changes.
        - `source` string, required — Error source, must be *translation\_file*
        - `type` 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration', required — Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
        - `file_hash` string, required — Base64-encoded file hash
        - `message` string, required — Error message
      - object — Represents an issue with the translated version of a document. The error is considered resolved when a file with the document translation change.
        - `source` string, required — Error source, must be *translation\_files*
        - `type` 'passport' | 'driver_license' | 'identity_card' | 'internal_passport' | 'utility_bill' | 'bank_statement' | 'rental_agreement' | 'passport_registration' | 'temporary_registration', required — Type of element of the user's Telegram Passport which has the issue, one of “passport”, “driver\_license”, “identity\_card”, “internal\_passport”, “utility\_bill”, “bank\_statement”, “rental\_agreement”, “passport\_registration”, “temporary\_registration”
        - `file_hashes` string[], required — List of base64-encoded file hashes
        - `message` string, required — Error message
      - object — Represents an issue in an unspecified place. The error is considered resolved when new data is added.
        - `source` string, required — Error source, must be *unspecified*
        - `type` string, required — Type of element of the user's Telegram Passport which has the issue
        - `element_hash` string, required — Base64-encoded element hash
        - `message` string, required — Error message

## Response `200`

- object
  - `ok` boolean, required
  - `result` boolean, required

## Other responses

- `default`

---

[API](https://skmtc.net/stoplight/apis/telegram-bot-api.md) · [All operations](https://skmtc.net/stoplight/apis/telegram-bot-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/stoplight/telegram-bot-api/versions/be4bbb34b64a/schema)
