> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete a Tag

> Delete a tag by ID or name, with soft/hard delete options

# Delete a Tag

Delete a tag by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

## Delete by ID

**id** `string` *required*

UUID of the tag to delete.

**recursive** `boolean` (default: false)

Recursively delete child tags.

**hardDelete** `boolean` (default: false)

Permanently delete the tag. If `false`, the tag is soft-deleted and can be restored.

## Delete by Name

Use `DELETE /v1/tags/name/{fqn}` to delete by fully qualified name.

**fqn** `string` *required*

Fully qualified name of the tag, for example `Certification.Bronze`.

**recursive** `boolean` (default: false)

Recursively delete child tags.

**hardDelete** `boolean` (default: false)

Permanently delete the tag.

## Restore a Soft-Deleted Tag

Use `PUT /v1/tags/restore` to restore a soft-deleted tag.

**id** `string` *required*

UUID of the soft-deleted tag to restore.

```python DELETE /v1/tags/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Tags

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Tags.delete("68ec158c-5f5e-4277-8a19-5e9e0cd5294f")

# Hard delete
Tags.delete(
    "68ec158c-5f5e-4277-8a19-5e9e0cd5294f",
    hard_delete=True
)

# Delete by name
Tags.delete(Tags.retrieve_by_name("Certification.Bronze").id)

# Restore a soft-deleted tag
Tags.restore("68ec158c-5f5e-4277-8a19-5e9e0cd5294f")
```

```java DELETE /v1/tags/{id} theme={null}
import java.util.Map;

// client is an initialized OpenMetadataClient.
var id = "68ec158c-5f5e-4277-8a19-5e9e0cd5294f";

// Soft delete
client.tags().delete(id);

// Restore
client.tags().restore(id);

// Hard delete
client.tags().delete(id, Map.of("hardDelete", "true"));

// Delete by name: look up the ID first
var tag = client.tags().getByName("Certification.Bronze");
client.tags().delete(tag.getId().toString());
```

```bash DELETE /v1/tags/{id} theme={null}
# Soft delete by ID
curl -X DELETE "{base_url}/api/v1/tags/68ec158c-5f5e-4277-8a19-5e9e0cd5294f" \
  -H "Authorization: Bearer {access_token}"

# Hard delete
curl -X DELETE "{base_url}/api/v1/tags/68ec158c-5f5e-4277-8a19-5e9e0cd5294f?hardDelete=true" \
  -H "Authorization: Bearer {access_token}"

# Delete by name
curl -X DELETE "{base_url}/api/v1/tags/name/Certification.Bronze" \
  -H "Authorization: Bearer {access_token}"

# Restore soft-deleted tag
curl -X PUT "{base_url}/api/v1/tags/restore" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{"id": "68ec158c-5f5e-4277-8a19-5e9e0cd5294f"}'
```

```json Response (Soft Delete) theme={null}
{
  "id": "68ec158c-5f5e-4277-8a19-5e9e0cd5294f",
  "name": "Bronze",
  "fullyQualifiedName": "Certification.Bronze",
  "description": "Bronze certified Data Asset.",
  "style": {
    "color": "#C08320"
  },
  "version": 0.2,
  "updatedAt": 1769982619666,
  "updatedBy": "admin",
  "classification": {
    "id": "06d90883-6be9-4f7e-9475-753f10a95e94",
    "type": "classification",
    "name": "Certification",
    "fullyQualifiedName": "Certification"
  },
  "deleted": true,
  "owners": [],
  "provider": "system",
  "mutuallyExclusive": false
}
```

***

## Returns

Soft delete returns the tag object with `deleted: true`. Hard delete returns no content (204). Restore returns the restored tag object.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to delete this tag |
| `404` | `NOT_FOUND` | Tag with given ID or FQN does not exist |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.