Delete Tag POST
Deletes a tag from your account. Deleted tags no longer appear in List Tags and cannot be assigned to contacts.
Authorization
API Key (Authentication) — send the header Authorization: Bearer <API_KEY> (API keys start with smsk_)
HTTP Request
http
POST https://public-api.smsup-plus.com/Tag/deleteTagContent Type
application/json
Parameter Description
| Property | Type | Required | Description |
|---|---|---|---|
tagId | string | Required | ID of the tag to delete (must belong to your account) |
Response Description
| Property | Type | Description |
|---|---|---|
status | number | 200 on success |
description | string | Tag deleted. |
Request Example
bash
curl -X POST 'https://public-api.smsup-plus.com/Tag/deleteTag' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"tagId": "a1c2e3f4-5b6d-4e7f-8a9b-0c1d2e3f4a5b"
}'js
const res = await fetch('https://public-api.smsup-plus.com/Tag/deleteTag', {
method: 'POST',
headers: { Authorization: 'Bearer <API_KEY>', 'Content-Type': 'application/json' },
body: JSON.stringify({ tagId: 'a1c2e3f4-5b6d-4e7f-8a9b-0c1d2e3f4a5b' }),
})
console.log(await res.json())Response Example
json
{
"status": 200,
"description": "Tag deleted."
}Possible Errors
| HTTP | Response | Cause |
|---|---|---|
| 200 | {"status":400,"description":"tagId is required."} | tagId missing or body is not JSON |
| 200 | {"status":404,"description":"Tag not found."} | Tag does not exist, was already deleted, or belongs to another account |
| 200 | {"status":500,"description":"Failed to delete tag."} | Delete failed — retry |
| 401 | {"error":"invalid api key"} | Invalid API key — see Errors |
WARNING
Once authenticated, this endpoint always answers HTTP 200. Check the status field in the body.
INFO
Deleting a tag does not delete contacts and does not remove existing assignments. If needed, call Unassign Tag before deleting the tag.
