Update a tag

SDK platic.tags.update()

Change a tag’s criteria, automatic application or owners. Send only the fields you want to update; other fields keep their values.

Example

await platic.tags.update("tag_123", { automatic: true });

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✓

Request body

{
  "criteria": "Apply this tag to customers with an active premium membership.",
  "automatic": true,
  "owners": ["support@acme.com"]
}

Body parameters

All parameters are optional. Only the fields included in the request are updated.

ParameterTypeDescription
criteriastringCriteria or description for when to apply the tag (max 500 characters)
automaticbooleanWhether the AI should apply the tag automatically to conversations
ownersarrayList of responsible-user emails

Response

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

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTcriteria is longer than 500 characters or an item in owners is not an email. details.issues says which field
400INVALID_REQUESTAn email in owners does not belong to a member of the workspace. details.message says which ones
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 deleted
{
  "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.

Notes

  • owners must be sent as valid emails of users in the workspace