Delete tag
Deletes a tag and removes it from every prompt and competitor carrying it. The prompts and competitors themselves are untouched — only the label goes.
That reach is invisible from the request, so the response reports it, and dry_run lets you see it
first. A tag on 400 prompts and a tag on none look identical until you ask.
Requires the write:tags scope, and the workspace must be enabled for API writes.
DELETE /v1/brands/{brand_id}/tags/{tag_id}Authorization
| Header | Type | Required |
|---|---|---|
Authorization | Bearer asky_sk_… | required |
Idempotency-Key | string | required |
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
brand_id | uuid | required | From List brands |
tag_id | uuid | required | From List tags |
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dry_run | boolean | optional | Report what would be unassigned and delete nothing |
Unlike Delete topic there is no outcome parameter: a tag owns nothing, so there is no second decision to make.
Request
cURL
# preview first
curl --request DELETE \
--url 'https://api.askylabs.com/v1/brands/242546de-4cee-4a7d-952e-f6aa60c63ef8/tags/9f2c1d84-6b31-4a2e-9c77-1e5b0a3f8d42?dry_run=true' \
--header 'Authorization: Bearer <api-key>' \
--header 'Idempotency-Key: <unique-per-attempt>'Response
200
{
"data": {
"deleted_tag_id": "9f2c1d84-6b31-4a2e-9c77-1e5b0a3f8d42",
"name": "Bottom funnel",
"prompts_untagged": 42,
"competitors_untagged": 3,
"dry_run": false
},
"request_id": "req_7d21b0af59c34e18b6ac"
}Response fields
| Field | Type | Description |
|---|---|---|
data.deleted_tag_id | uuid | required. The tag that was removed, or would be |
data.name | string | required. Its name, so a log line reads without a second lookup |
data.prompts_untagged | integer | required. Prompts that lost the label |
data.competitors_untagged | integer | required. Competitors that lost the label |
data.dry_run | boolean | required. true means nothing was changed |
request_id | string | required |
Errors
| Status | Code | When |
|---|---|---|
| 400 | invalid_request | dry_run is not true or false |
| 401 | invalid_token | The key is missing, malformed, or does not exist |
| 403 | insufficient_scope | The key does not carry write:tags |
| 404 | not_found | The tag does not exist, was already deleted, or belongs to another brand |
| 429 | rate_limited | Over 60 requests per minute |
Notes
Deleting twice returns 404, not a second success.
The counts are the same in both modes. A dry run reports exactly what the real call will do, and the real call reports what it did.
Nothing is soft-deleted. Removing a tag from prompts and competitors is not recoverable through the API — recreate the tag and reapply it with Set prompt tags.