# Reject a KYC document

Rejects a KYC document and changes the `status` to `rejected`.
The review time and reviewer information is also updated.
> **Note:** Use this operation for manual overrides.

Endpoint: POST /kyc-documents/{id}/rejection
Version: latest
Security: SecretApiKey, JWT

## Path parameters:

  - `id` (string, required)
    ID of the resource.

## Request fields (application/json):

  - `type` (string, required)
    Reason the document is rejected.
    Enum: "document-unreadable", "document-expired", "document-was-valid-but-expired", "document-not-matching", "document-duplicate", "document-invalid", "document-not-open", "underage-person", "third-party-or-mismatch", "expiration-date-missing", "issue-date-missing", "subtype-missing", "dob-mismatch", "name-mismatch", "name-and-dob-mismatch", "critical-info-missing", "old-address-on-id", "tampered-document", "other"

  - `message` (string)
    KYC document rejection message.
    Example: Provided document is unreadable

## Response 201 fields (application/json):

  - `id` (string)
    ID of the KYC document.
    Example: kyc_doc_0YV7JHY705C6DA487BFTAA33V8

  - `fileIds` (array, required)
    IDs of linked file objects.
Uploaded `identity-proof` files must have the following tags attached to be used for KYC purposes:
`['kyc', 'id-front']`, `['kyc', 'id-back']`, `['kyc', 'face-proof']`.
Permitted file types for `identity-proof` files: `.jpg`, `.png`, and `.pdf`.

  - `documentType` (string, required)
    Enum: "identity-proof", "address-proof", "funds-proof", "purchase-proof", "credit-file-proof"

  - `documentSubtype` (string | null)
    Enum: "passport", "id-card", "driver-license", "birth-certificate", "utility-bill", "rental-receipt", "lease-agreement", "copy-credit-card", "credit-card-statement", "bank-statement", "inheritance-documentation", "tax-return", "salary-slip", "sale-of-assets", "public-health-card", "proof-of-age-card", "reverse-of-id", "public-service", "ewallet-holder-details", "ewallet-transaction-statement", "marriage-certificate", "firearms-license", "insurance-letter", "income-statement", "debtors-letter", "other", null

  - `status` (string, required)
    Status of the validation.
    Enum: "pending", "in-progress", "accepted", "rejected", "archived"

  - `rejectionReason` (object | null)
    Reason the document is rejected.

  - `rejectionReason.type` (string, required)
    Reason the document is rejected.
    Enum: "document-unreadable", "document-expired", "document-was-valid-but-expired", "document-not-matching", "document-duplicate", "document-invalid", "document-not-open", "underage-person", "third-party-or-mismatch", "expiration-date-missing", "issue-date-missing", "subtype-missing", "dob-mismatch", "name-mismatch", "name-and-dob-mismatch", "critical-info-missing", "old-address-on-id", "tampered-document", "other"

  - `rejectionReason.message` (string)
    KYC document rejection message.
    Example: Provided document is unreadable

  - `requestId` (string | null)
    ID of the KYC request.
    Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

  - `createdTime` (string)
    Date and time when the resource is created.
This value is set automatically when the resource is created.

  - `updatedTime` (string)
    Date and time when the resource is updated.
This value is set automatically when the resource is updated.

  - `processedTime` (string | null)
    Date and time when the KYC document is processed.

  - `customerId` (string, required)
    ID of the customer resource.
    Example: cus_0YV7DDSDD1C8DA64KHH2W33CPF

  - `reviewerId` (string | null)
    ID of the KYC document reviewer.
    Example: 44433322-2c4y-483z-a0a9-158621f77a21

  - `reviewerName` (string | null)
    First and last name of the KYC document reviewer.

  - `reviewStartTime` (string | null)
    Date and time when the manual review starts.

  - `reviewTime` (string | null)
    Date and time of manual review.

  - `notes` (string | null)
    Reviewer notes.

  - `tags` (array)
    List of KYC document tags.

  - `tags.id` (string)
    Unique resource ID.
    Example: 4f6cf35x-2c4y-483z-a0a9-158621f77a21

  - `tags.name` (string, required)
    Unique name for the tag.
Tag names are not case-sensitive.
    Example: New

  - `tags.type` (string, required)
    Type of tag.
Tags of a specific type can only be assigned to corresponding entity types.
For example, you can only use customer tags on customers.
    Enum: "customer", "kyc-document", "aml-check"

  - `tags._links` (array)
    Related links.

  - `tags._links.href` (string)
    Link URL.

  - `tags._links.rel` (string)
    Type of link.
    Enum: "self"

  - `reason` (string | null)
    Reason for uploading.

  - `matchLevel` (integer)
    Document verification level.
    Enum: 1, 2, 3

  - `revision` (integer)
    Number of times the KYC document data has been modified.

Use this value when analyzing webhook data to determine if a change must take precedence over the current representation.

  - `documentMatches` (object | null)
    Proof of identity document matches.

  - `documentMatches.version` (string)
    Version of the document matches.
    Example: 2.0

  - `documentMatches.score` (integer)
    Calculated score that represents the percentage of confidence that this ID document represents the customer.
    Example: 75

  - `documentMatches.checkList` (array | null)
    List of checks executed against the document during KYC verification.

  - `documentMatches.checkList.name` (string)
    Name of the document check.
    Enum: "city", "containsImage", "date", "dateIsInvalid", "dateOfBirth", "decision", "documentNumber", "documentSubtype", "expirationDate", "firstName", "hasMatchingFaceProof", "hasMinimalAge", "isIdentityDocument", "isPublishedOnline", "isTampered", "issuanceCountry", "issuanceRegion", "issueDate", "lastName", "line1", "matchesDateOfBirth", "phone", "postalCode", "region"

  - `documentMatches.checkList.failed` (boolean)
    Specifies if a document check has failed.
When a check fails,
the score value associated with the check is subtracted from the overall score of the proof document.
The overall score together with accept and reject thresholds determine whether an proof document passes or fails verification.
For more information, see [KYC](https://www.rebilly.com/docs/kyc-and-aml/kyc).
    Example: true

  - `documentMatches.checkList.score` (integer)
    Specifies the number of points to deduct from the proof document when a check fails during the verification process.
    Example: 75

  - `documentMatches.checkList.reason` (string | null)
    Specifies the reason why the KYC check failed.
    Example: closed_eyes

  - `documentMatches.data` (object)
    Matched identity data.

  - `documentMatches.data.containsImage` (boolean)
    Specifies if the document includes an image that contains a face.
    Example: true

  - `documentMatches.data.isIdentityDocument` (boolean)
    Specifies if the document resembles an ID.
    Example: true

  - `documentMatches.data.isPublishedOnline` (boolean)
    Specifies if an exact match of the document has been found online.
    Example: false

  - `documentMatches.data.matchingImages` (array)
    URLs where matching images have been found online.

  - `documentMatches.data.firstName` (string | null)
    First name of the customer.
This value is null if no match is found.
    Example: John

  - `documentMatches.data.lastName` (string | null)
    Last name of the customer.
This value is null if no match is found.
    Example: Doe

  - `documentMatches.data.dateOfBirth` (string | null)
    Date of birth detected on the document.
This value is null if no match is detected.

  - `documentMatches.data.expirationDate` (string | null)
    Expiration date detected on the document.
This value is null if no expiration date is detected.

  - `documentMatches.data.issueDate` (string | null)
    Issue date detected on the document.
This value is null if no issue date is detected.

  - `documentMatches.data.hasMinimalAge` (boolean | null)
    Specifies that the individual is older than the minimal age limit.
The minimal age is 21+ the for USA and 18+ for all other countries.
This value is null if `dateOfBirth` is not determined.
    Example: true

  - `documentMatches.data.nationality` (string | null)
    Nationality detected on a passport or citizenship document.
This value is null if no nationality is detected.
    Example: US

  - `documentMatches.data.issuanceCountry` (string | null)
    Country that issued the document.
    Example: CA

  - `documentMatches.data.issuanceRegion` (string | null)
    Region, state, province, or territory that issued the document.
    Example: Ontario

  - `documentMatches.data.documentNumber` (string | null)
    Unique number on the identity document.
This value may contain alphanumeric characters.
    Example: 1234567890

  - `documentMatches.data.sex` (string | null)
    MRZ sex code (ICAO 9303).
`M`, `F`, or `X`.
Null if not extracted.
    Example: M

  - `documentMatches.data.mrzChecksumValid` (boolean | null)
    MRZ check digits validation.
Null if there is no MRZ, no check data, or a non-standard layout.
    Example: true

  - `documentMatches.data.hasMatchingFaceProof` (boolean)
    Specifies if an identity document has matching face proof.
    Example: false

  - `documentMatches.data.isTampered` (boolean)
    Specifies if an identity document has been tampered with.
    Example: false

  - `documentMatches.data.isDigitallyTampered` (boolean)
    Specifies if an identity document has been digitally tampered with (experimental).
    Example: false

  - `documentMatches.data.isPhotocopy` (boolean)
    Specifies if an identity document is detected as a photocopy.
    Example: false

  - `documentMatches.data.hasCompletedFaceLiveness` (boolean)
    Specifies if the face liveness session completed.
    Example: false

  - `documentMatches.data.expiryDate` (string | null)
    Use `expirationDate` field instead.

  - `parsedData` (object | null)
    Parsed data.

  - `settings` (any)
    Settings used to score the document.

  - `settings.weights` (object)
    Property weights that are used for the KYC document verification process.
All KYC documents start the verification process with a score of 100.
If a check fails, the score is reduced by the corresponding weight.
For example, if the `firstName` check weight is set to `5`, and the check fails,
the KYC document score becomes `95`.

  - `settings.weights.containsImage` (integer)
    Weight added if the document does not include an image that contains a face.

  - `settings.weights.isIdentityDocument` (integer)
    Weight added if the document does not resemble an ID.

  - `settings.weights.isPublishedOnline` (integer)
    Weight added if an exact match of the document is not found online.

  - `settings.weights.firstName` (integer)
    Weight added if the customer's first name is not matched.

  - `settings.weights.lastName` (integer)
    Weight added if the customer's last name is not matched.

  - `settings.weights.expirationDate` (integer)
    Weight added if an expiration date is not detected on the document.

  - `settings.weights.dateOfBirth` (integer)
    Weight added if a date of birth is not detected on the document, or if the date of birth detected on the document is not matched.

  - `settings.weights.issueDate` (integer)
    Weight added if an issue date is not detected on the document.

  - `settings.weights.hasMinimalAge` (integer)
    Weight added if the document does not verify the minimal age limit.
Minimal age is 21+ the for USA and 18+ for all other countries.

  - `settings.weights.hasMatchingFaceProof` (integer)
    Weight added if an identity document does not have matching face proof.

  - `settings.weights.nationality` (integer)
    Weight added if a nationality is not detected on the document.

  - `settings.weights.documentSubtype` (integer)
    Weight added if the document is not one of the recognized document subtypes.

  - `settings.weights.isTampered` (integer)
    Weight added if the document has been tampered with.

  - `settings.weights.isPhotocopy` (integer)
    Weight added if the document is detected as a photocopy.

  - `settings.weights.mrzChecksum` (integer)
    Weight added when MRZ check digits fail validation.

  - `settings.weights.documentNumber` (integer)
    Weight added if a document number is not detected on the document.

  - `settings.weights.issuanceCountry` (integer)
    Weight added if the country that issued the document is not detected.

  - `settings.weights.issuanceRegion` (integer)
    Weight added if the region, state, province, or territory that issued the document is not detected.

  - `settings.thresholds` (object)
    Pass and fail threshold definition for the document verification process.

  - `settings.thresholds.rejectBelow` (integer)
    Overall score by which an identity proof document fails the verification process.

  - `settings.thresholds.acceptAbove` (integer)
    Overall score by which an identity proof document passes the verification process.

  - `settings.minimumAgeSettings` (object)
    Minimum age settings for identity proof documents.

  - `settings.minimumAgeSettings.defaultMinimumAge` (integer)
    Default minimum age requirement for identity proof documents.
This is used when no location-specific override is configured.

  - `settings.minimumAgeSettings.locationOverrides` (array)
    Location-specific minimum age.
Each item specifies a minimum age for a specific location.
For country-wide rules, omit the state field.
For state-specific rules, include the state field.
    Example: [{"country":"US","minimumAge":21},{"country":"US","state":"AL","minimumAge":19}]

  - `settings.minimumAgeSettings.locationOverrides.country` (string, required)
    Country code in ISO 3166 alpha-2 format.
    Example: US

  - `settings.minimumAgeSettings.locationOverrides.state` (string)
    Name or code of the state or region.
    Example: AZ

  - `settings.minimumAgeSettings.locationOverrides.minimumAge` (integer, required)
    Minimum age requirement for this location.
    Example: 21

  - `_links` (array)
    Related links.

  - `_links.href` (string)
    Link URL.

  - `_links.rel` (string)
    Type of link.
    Enum: "self", "customer"

  - `_embedded` (object)
    Embedded objects that are requested by the `expand` query parameter.

  - `_embedded.customer` (object)

  - `_embedded.files` (array)
    Linked files.

  - `documentMatches` (object | null)

  - `documentMatches.data` (object)
    Matched address data.

  - `documentMatches.data.line1` (string | null)
    Address of the customer's residence.
This value is null if no match is found.
    Example: 36 Craven St

  - `documentMatches.data.city` (string | null)
    Customer's city of residence.
This value is null if no match is found.
    Example: London

  - `documentMatches.data.region` (string | null)
    Customer's region of residence.
This value is null if no match is found.
    Example: London

  - `documentMatches.data.postalCode` (string | null)
    Postal code of the customer's residence.
This value is null if no match is found.
    Example: WC2N 5NF

  - `documentMatches.data.wordCount` (integer)
    Total number of words in the document.
    Example: 350

  - `documentMatches.data.uniqueWords` (integer)
    Total number of unique words in the document.
    Example: 175

  - `documentMatches.data.date` (string | null)
    Date detected on the document.
Use this field to determine if the document is recent.
    Example: 2021-01-01T00:00:00+00:00

  - `documentMatches.data.phone` (string | null)
    Phone number of the company or agency that issued the document.
    Example: (123) 456-7890

  - `documentMatches.data.isTampered` (boolean)
    Specifies if an address proof document has been tampered with.
    Example: false

  - `parsedData` (object | null)

  - `documentMatches` (object | null)
    Proof of funds document matches.

  - `documentMatches.data` (object)

  - `documentMatches` (object | null)
    Proof of purchase document matches.

  - `documentMatches` (object | null)
    Proof of credit document matches.

## Response 401 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 403 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 404 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

## Response 422 fields (application/json):

  - `status` (integer)
    HTTP status code.

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

  - `invalidFields` (array)
    Invalid field details.
    Example: [{"field":"field1","message":"field1 is invalid"},{"field":"subObject.field2","message":"field2 is invalid"},{"field":"subObject.field2","message":"another error in the field2"}]

  - `invalidFields.field` (string)
    Name of the field.
Dot notation is used for nested object field names.

  - `invalidFields.message` (string)
    Message field.

## Response 429 fields (application/json):

  - `type` (string)
    Problem type in the form of a [URI](https://tools.ietf.org/html/rfc3986) reference.
It should provide human-readable documentation for the problem type.
When this member is not present, its value is assumed to be "about:blank".
    Example: about:blank

  - `title` (string)
    Short, human-readable summary of the problem type.
Other than for the purposes of localization, this should not change from occurrence to occurrence of the problem.
    Example: Rate Limit Exceeded

  - `status` (integer)
    HTTP status code.

  - `detail` (string)
    Human-readable explanation that is specific to this occurrence of the problem.
    Example: A request cannot be executed because the user has sent too many requests within a certain period of time

  - `instance` (string)
    URI reference that identifies the specific occurrence of the problem.
It may or may not yield further information if dereferenced.

