# Delete a document

Delete records of a created document object

Endpoint: DELETE /documents/{document_id}
Version: 1.0
Security: API-Key

## Security:

  - `API-Key` (unknown)
    apiKey in header API-Key

## Path parameters:

  - `document_id` (string, required)

## Response 200:

  - `200` (unknown)
    **OK**
The request was successful, and our system returned an expected response.

## Response 200 fields (application/json):

  - `document_id` (string)
    A unique identifier of a document, that is assigned by our system after a document object was created with a “Create a document” request
    Example: 27c5caea93ee4656881ef9a30fadd21a3768

## Response 404:

  - `404` (unknown)
    **Not Found**
The requested resource does not exist or can’t be found in our system.

## Response 404 fields (application/json):

  - `type` (string)
    Example: not_found

  - `errors` (array)

  - `errors.parameter` (string)
    Example: document_id

  - `errors.message` (string)
    Example: Document was not found

## Response 409:

  - `409` (unknown)
    409 Conflict

## Response 409 fields (application/json):

  - `type` (string)
    Example: delete_denied

  - `errors` (array)

  - `errors.parameter` (string)
    Example: document_id

  - `errors.message` (string)
    Example: Document under verification can not be deleted

## Response 422:

  - `422` (unknown)
    **Unprocessable Content**
Our system understands the request but can’t process it due to invalid fields in the request body.

## Response 422 fields (application/json):

  - `type` (string)
    Example: validation

  - `errors` (array)

  - `errors.parameter` (string)
    Example: document_id

  - `errors.message` (string)
    Example: Document ID is not valid.

## Response 429:

  - `429` (unknown)
    **Too Many Requests**
This response indicates that a user has sent too many requests in a given amount of time.

## Response 429 fields (application/json):

  - `type` (string)
    Example: limit_exceeded

  - `errors` (array)

## Response 500:

  - `500` (unknown)
    **Internal Server Error**
This response indicates that our system encountered an unexpected condition that prevented it from fulfilling the request.

## Response 500 fields (application/json):

  - `type` (string)
    Example: internal_server

  - `errors` (array)

## Response 502:

  - `502` (unknown)
    **Bad Gateway**
This response indicates that our system is unable to reach or communicate properly with an upstream server it relies on, the URL provided is incorrect, or a required token is missing from the request.

