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
curl -X PATCH https://api.platic.ai/v1/tags/$TAG_ID \
-H "Authorization: Bearer $PLATIC_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "automatic": true }' 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
| Parameter | Type | Description | Required |
|---|---|---|---|
tagId | string | Unique 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.
| Parameter | Type | Description |
|---|---|---|
criteria | string | Criteria or description for when to apply the tag (max 500 characters) |
automatic | boolean | Whether the AI should apply the tag automatically to conversations |
owners | array | List of responsible-user emails |
Response
{
"status": "success",
"message": "Tag updated successfully",
"data": {
"id": "tag_abc123"
}
} Errors
| Status | details.code | When it happens |
|---|---|---|
400 | INVALID_REQUEST | criteria is longer than 500 characters or an item in owners is not an email. details.issues says which field |
400 | INVALID_REQUEST | An email in owners does not belong to a member of the workspace. details.message says which ones |
400 | INVALID_REQUEST | Your 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 |
401 | UNAUTHENTICATED | The credential is missing or invalid |
403 | FORBIDDEN | The credential does not have the Contacts module (Missing contacts permission), or it is an OAuth token without the platica:write scope |
404 | TAG_NOT_FOUND | The 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
ownersmust be sent as valid emails of users in the workspace