Delete a tag
DELETE
/v1/tags/{id}
const url = 'https://api.adversarial.com/api/v1/tags/123';const options = { method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{"force":true,"reassign_to_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api.adversarial.com/api/v1/tags/123 \ --header 'Content-Type: application/json' \ --data '{ "force": true, "reassign_to_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string format: uuid
The ID of the tag to delete
Example
123Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
force
Delete the tag even when it is still applied to resources, cascading the
removal from every associated risk, incident, and organization. Ignored
when reassign_to_id is set (reassignment always takes precedence).
boolean | null
reassign_to_id
string | null format: uuid
Examplegenerated
{ "force": true, "reassign_to_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}Responses
Section titled “Responses”Tag deleted successfully
Media typeapplication/json
object
status
required
string
Examplegenerated
{ "status": "example"}Invalid reassignment target
Tag not found
Tag is in use; provide reassign_to_id or force=true to delete