# Delete document tags

{% delete /%}
{% path text="/v1/document/deleteTags" /%}

Each document has its own set of tags that can be used for searching the document. This API allows users to delete tags from the document that are no longer supported.

## Code snippet

{% codetab %}

cURL

```shell 
curl -X DELETE "https://api.boldsign.com/v1/document/deleteTags" 
     -H 'X-API-KEY: {your API key}'  
     -H "Content-Type: application/json" 
     -d "{\"DocumentId\": \"{documentId}\", \"Tags\": [\"test\", \"api\"]}"
```

C#

```csharp
var apiClient = new ApiClient("https://api.boldsign.com", "Your_API_Key");

var documentClient = new DocumentClient(apiClient);

var deletetag = new DocumentTags()
{
    DocumentId = "YOUR_DOCUMENT_ID",
    Tags = new List<string>() { "test", "api" },
};

documentClient.DeleteTag(deletetag);
```

Python

```python
import boldsign

configuration = boldsign.Configuration(host = "https://api.boldsign.com", api_key="YOUR_API_KEY")

with boldsign.ApiClient(configuration) as api_client:

    document_api = boldsign.DocumentApi(api_client)
	
    document_tags = boldsign.DocumentTags(
        documentId="YOUR_DOCUMENT_ID",
        tags=["test", "api"])
    
    document_api.delete_tag(document_tags)
```

PHP

```php
<?php require_once "vendor/autoload.php";

use BoldSign\Configuration;
use BoldSign\Api\DocumentApi;
use BoldSign\Model\DocumentTags;

$config = new Configuration();
$config->setHost('https://api.boldsign.com');
$config->setApiKey('YOUR_API_KEY');

$document_api = new DocumentApi($config);

$document_tags = new DocumentTags(); 
$document_tags->setDocumentId('YOUR_DOCUMENT_ID');
$document_tags->setTags(['test', 'api']);

$document_api->deleteTag($document_tags);
```

Java

```java
ApiClient client = Configuration.getDefaultApiClient();
client.setBasePath("https://api.boldsign.com");
client.setApiKey("YOUR_API_KEY");
        
DocumentApi documentApi = new DocumentApi(client);

DocumentTags documentTags = new DocumentTags();
documentTags.setDocumentId("YOUR_DOCUMENT_ID"); 
documentTags.setTags(Arrays.asList("test", "api")); 

documentApi.deleteTag(documentTags);
```

NodeJS

```js
import { DocumentApi, DocumentTags } from "boldsign";

const documentApi = new DocumentApi("https://api.boldsign.com");
documentApi.setApiKey("YOUR_API_KEY");

const documentTags = new DocumentTags();
documentTags.documentId = "YOUR_DOCUMENT_ID";
documentTags.tags = ["test","api"];

documentApi.deleteTag(documentTags);
```

{% /codetab %}

## Request body

{% nestedtable %}

- {% arguments name="DocumentId" /%}{% batch datatype="string" /%}{% required /%} 
- ID of the requested document

---

- {% arguments name="Tags" /%}{% batch datatype="string" /%}{% required /%} 
- A collection of tags that will be removed from the document. Each tag cannot exceed 255 characters and cannot contain white space.

{% /nestedtable %}

## Example response

***200 Success***
