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).
# 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
| Field | Type | Required | Description |
|---|---|---|---|
status | string | The status to set on the request. One of: "open", "pending", "hold", "solved". | |
assignee | string (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.
| Field | Type | Description |
|---|---|---|
id | integer (int64) | |
status | string | |
assignee | string |
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 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
- get-ticket — Get a request
- list-tickets — List requests
- create-ticket-comment — Add a comment
- API reference: PATCH /support/v1/tickets/{ticketId}
Aliases: id-of-ticket-update