Skip to main content

update-ticket

dci update-ticket <ticketId> [body]

Partially updates a support request. Supports setting the request status and/or assignee. DoiT employees may set any of open, pending, hold, or solved and may set the assignee; customers may set only solved (parity with the console "mark as resolved" action) and may not set an assignee. closed is not settable via the API (Zendesk auto-closes from solved). The assignee is a DoiT-employee email, resolved server-side to a Zendesk agent; an email that does not resolve to an active agent returns 400. At least one mutable field must be present. The response echoes the fields that were applied.

  • 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

# Mark a request as resolved (the only status customers may set).
dci update-ticket <ticket-id> status: solved
# Reopen a request and assign it to a DoiT employee (DoiT employees only).
dci update-ticket <ticket-id> assignee: [email protected], status: open
# Put a request on hold and read back the applied fields as JSON.
dci update-ticket <ticket-id> status: hold --output json

Request

Content-Type: application/json

FieldTypeRequiredDescription
statusstringThe status to set on the request. One of: "open", "pending", "hold", "solved".
assigneestring (email)Email of the DoiT employee to assign the request to, resolved to a Zendesk agent. DoiT employees only.
Raw JSON schema
{
"type": "object",
"minProperties": 1,
"properties": {
"status": {
"type": "string",
"description": "The status to set on the request.",
"enum": [
"open",
"pending",
"hold",
"solved"
]
},
"assignee": {
"type": "string",
"format": "email",
"description": "Email of the DoiT employee to assign the request to,\nresolved to a Zendesk agent. DoiT employees only."
}
}
}

Output

OK - Request updated. Echoes the fields that were applied.

By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.

FieldTypeDescription
idinteger (int64)
statusstring
assigneestring
Raw JSON schema
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "int64"
},
"status": {
"type": "string"
},
"assignee": {
"type": "string"
}
}
}

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-update