add-ticket-tags
dci add-ticket-tags <ticketId> [body]
Adds one or more tags to an existing support request. The operation is surgical — only the tags listed in the request are added; existing tags on the ticket are preserved. Re-adding a tag that is already present is a successful no-op.
All submitted tags are normalized (trim + lowercase) before storage. For
customers, the system additionally applies a customer_tag/ namespace
prefix to prevent collisions with internal DoiT process tags. The
response echoes the actual stored strings so callers can verify the
transform.
ticketId— The unique identifier of the support request.
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Examples
# Add two tags; tags already on the ticket are kept, and re-adding one is a no-op.
dci add-ticket-tags <ticket-id> tags: [billing, follow-up]
`applied_tags` echoes the strings actually stored — trimmed and lowercased, and prefixed with `customer_tag/` when the caller is a customer.
# The stored tag strings as JSON, for scripts.
dci add-ticket-tags <ticket-id> tags: [billing] --output json
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
tags | array of string | yes | List of tags to add or remove. Customer-submitted tags are auto-prefixed with customer_tag/. |
Raw JSON schema
{
"type": "object",
"description": "Request body for adding (POST) or removing (DELETE) tags on a support\nrequest. The operation is surgical — only the tags listed are affected;\nany other tags on the ticket are preserved.\n",
"required": [
"tags"
],
"properties": {
"tags": {
"type": "array",
"minItems": 1,
"maxItems": 50,
"items": {
"type": "string",
"minLength": 1,
"maxLength": 80
},
"description": "List of tags to add or remove. Customer-submitted tags are auto-prefixed with `customer_tag/`."
}
}
}
Output
OK - Tags added (or already present).
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
applied_tags | array of string | The tags that were stored on (POST) or removed from (DELETE) the ticket. |
Raw JSON schema
{
"type": "object",
"description": "Response body echoing the tags the operation actually acted on, after\nserver-side transformation (trim + lowercase + customer namespace prefix\nwhere applicable).\n",
"properties": {
"applied_tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "The tags that were stored on (POST) or removed from (DELETE) the ticket."
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
Related
- remove-ticket-tags — Remove tags from a support request
- list-ticket-tags — List tags on a support request
- get-ticket — Get a request
- list-tickets — List requests
- API reference: POST /support/v1/tickets/{ticketId}/tags
Aliases: id-of-ticket-tags-add