Skip to main content
DELETE
/
v1
/
asset
/
{asset_id}
/
labels
Delete labels of an asset
curl --request DELETE \
  --url https://api.projectdiscovery.io/v1/asset/{asset_id}/labels \
  --header 'X-API-Key: <api-key>'
{
  "message": "<string>"
}
This endpoint removes ALL labels from an asset. If you want to remove specific labels while keeping others, use PATCH /v1/asset/{asset_id}/labels with update_type=delete instead.

Overview

Remove all labels from a specific asset. This endpoint provides a quick way to completely clear an asset’s labels, useful when:
  • Resetting asset categorization
  • Cleaning up before re-labeling
  • Removing assets from all label-based groups
  • Decommissioning or archiving assets

Quick Example

curl -X DELETE "https://api.projectdiscovery.io/v1/asset/123456/labels" \
  -H "X-Api-Key: YOUR_API_KEY"

Response

Success Response

{
  "message": "All labels removed successfully"
}

Error Responses

Asset Not Found:
{
  "message": "Asset not found",
  "code": "NOT_FOUND"
}
Invalid Asset ID:
{
  "message": "Invalid asset ID format",
  "code": "INVALID_ID"
}

Behavior

Complete Label Removal

This endpoint removes all labels from the asset: Before:
{
  "id": 123456,
  "name": "https://example.com",
  "labels": ["production", "api", "critical", "monitored"]
}
Request:
curl -X DELETE "https://api.projectdiscovery.io/v1/asset/123456/labels" \
  -H "X-Api-Key: YOUR_API_KEY"
After:
{
  "id": 123456,
  "name": "https://example.com",
  "labels": []
}

Authorizations

X-API-Key
string
header
required

Headers

X-Team-Id
string

Path Parameters

asset_id
integer
required

Response

Example response

message
string
required