
# Delete a tag

Delete a tag everywhere: it is removed from every page, and its title and description go with it.

```sh
DELETE https://sitepaste.com/api/v1/public/sites/{siteId}/tags/{slug}
```

Requires the `content` scope.

## Usage

```bash
curl -X DELETE "https://sitepaste.com/api/v1/public/sites/default/tags/old-tag" \
  -H "Authorization: Bearer $TOKEN"
```

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |



## Response

200 OK with the number of pages the tag was removed from:

```json
{ "deleted": 12 }
```

A tag no page carries is not a 404. It comes back as `{"deleted": 0}`, so re-sending the same deletion is safe.

## Errors

| Code | Meaning |
|------|---------|
| 400 | The slug in the path is not a valid tag |