# Delete a Document and Signature Definitions Resource

# Alias

`DocumentDeletion`

# Description

Deletes a document and signature definitions resource.

# Request

`DELETE /trustedx-resources/esignsp/v2/documents/{doc_and_sigdefs_id}`

## Parameters

Name | Type | Usage | Description
`doc_and_sigdefs_id` | path | Required | Identifier of the document and signature definitions resource to be deleted.

## Authorization

The request must contain a bearer access token generated by an authorization server of the platform. This token must have a scope that includes the `urn:safelayer:eidas:sign:process:document` value and must be used as explained in RFC 6750. Basically, the access token must be included in an `Authorization` header as follows:

`Authorization: Bearer <token>`

The client application must obtain the required access token via a client credentials grant OAuth 2.0 interaction with the platform.

# Response

## Status-Line

Value | Description
`HTTP/1.1 204 No Content` | The document and signature definitions resource was successfully deleted and the response has no body.
`HTTP/1.1 404 Not Found` | The document and signature definitions resource requested for deletion does not exist (`Content-Type: application/json`).
Others | See HTTP Response Status for all the possible cases.

## Body

If the document and signature definitions resource was successfully deleted, the response has no body. Otherwise, it will have a body containing a JSON object describing the error.