Skip to main content

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

FieldTypeRequiredDescription
tagsarray of stringyesList 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.

FieldTypeDescription
applied_tagsarray of stringThe 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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.

Aliases: id-of-ticket-tags-add