Delete a tag

SDK platic.tags.delete()

Retire a tag by sending its tagId. It stops being available for new assignments and disappears from lists.

Example

await platic.tags.delete("tag_123");

If your credential covers several workspaces, add ?workspace=<id> to say which one you work in (list workspaces); without it the answer is 400. A single-workspace credential never needs it.

URL parameters

ParameterTypeDescriptionRequired
tagIdstringUnique identifier of the tag✓

Response

{
  "status": "success",
  "message": "Tag deleted successfully",
  "data": {
    "id": "tag_abc123",
    "deleted": true
  }
}

Response fields

FieldDescription
data.idID of the deleted tag
data.deletedAlways true

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTYour credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the ones you can use
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENThe credential does not have the Contacts module (Missing contacts permission), or it is an OAuth token without the platica:write scope
404TAG_NOT_FOUNDThe tag does not exist in the workspace or was already deleted. Deleting a tag you already deleted returns 404
{
  "code": 404,
  "error": "Not Found - The resource doesn't exist",
  "details": {
    "code": "TAG_NOT_FOUND",
    "message": "Tag tag_abc123 not found in this workspace"
  }
}

The general error format is in Errors.