create-ticket
dci create-ticket [body]
Creates a new support request
Pass the request body as name: value arguments or pipe JSON on stdin — see Command structure.
Examples
# Open a Google Cloud support request from a JSON file.
dci create-ticket < ticket.json
# ticket.json
{"ticket": {"subject": "BigQuery job stuck in PENDING",
"body": "Job bquxjob_1234 in project prod-analytics has been pending since 09:00 UTC.",
"platform": "google_cloud_platform", "product": "BigQuery", "severity": "normal"}}
# A short low-severity request about DoiT itself, written inline.
dci create-ticket ticket{subject: "Invoice question", body: "Which contract covers invoice INV-2026-08?", platform: doit, product: Billing, severity: low}
# Create the ticket and keep only its ID and console link, for scripts.
dci create-ticket --fields id,urlUI --output json < ticket.json
Add `requester` to the body only when calling as a service account; user callers must omit it — their verified email is the requester.
Request
Content-Type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
ticket | object | yes | Payload to create a support ticket via API. |
ticket.body | string | yes | The body of the ticket (can include html formatting). |
ticket.created | string | Ticket creation time. | |
ticket.platform | string | yes | Platform of the ticket. One of: "doit", "google_cloud_platform", "amazon_web_services", "microsoft_azure". |
ticket.product | string | yes | Ticket product details. |
ticket.requester | string (email) | Human contact email used as the Zendesk ticket requester. Required when the caller is a service account. User callers must omit this field; their verified email remains the requester. | |
ticket.severity | string | yes | Ticket severity. One of: "low", "normal", "high", "urgent". |
ticket.subject | string | yes | The subject of the ticket. |
Raw JSON schema
{
"type": "object",
"description": "Wrapper object for creating support tickets via the external API.",
"x-cloudflow-labels": {
"ticket": "Ticket details"
},
"properties": {
"ticket": {
"type": "object",
"description": "Payload to create a support ticket via API.",
"required": [
"body",
"platform",
"product",
"severity",
"subject"
],
"properties": {
"body": {
"type": "string",
"description": "The body of the ticket (can include html formatting).",
"x-cloudflow-format": "multiReference"
},
"created": {
"type": "string",
"description": "Ticket creation time."
},
"platform": {
"type": "string",
"description": "Platform of the ticket.",
"enum": [
"doit",
"google_cloud_platform",
"amazon_web_services",
"microsoft_azure"
]
},
"product": {
"type": "string",
"description": "Ticket product details."
},
"requester": {
"type": "string",
"format": "email",
"description": "Human contact email used as the Zendesk ticket requester. Required\nwhen the caller is a service account. User callers must omit this\nfield; their verified email remains the requester."
},
"severity": {
"type": "string",
"description": "Ticket severity.",
"enum": [
"low",
"normal",
"high",
"urgent"
],
"x-cloudflow-format": "noReference"
},
"subject": {
"type": "string",
"description": "The subject of the ticket."
}
}
}
},
"required": [
"ticket"
]
}
Output
Created - New support request created.
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 |
|---|---|---|
created | integer (int64) | Ticket creation time. |
id | integer (int64) | Ticket ID. |
platform | string | Ticket platform. One of: "doit", "google_cloud_platform", "amazon_web_services", "microsoft_azure". |
product | string | Ticket product. |
requester | string | Email address of the requester. |
severity | string | Severity of the ticket. One of: "low", "normal", "high", "urgent". |
status | string | Ticket status. |
subject | string | Ticket subject. |
urlUI | string | URL to access the ticket in DoiT console. |
Raw JSON schema
{
"type": "object",
"description": "Response returned after creating a ticket.",
"properties": {
"created": {
"type": "integer",
"description": "Ticket creation time.",
"format": "int64"
},
"id": {
"type": "integer",
"description": "Ticket ID.",
"format": "int64"
},
"platform": {
"type": "string",
"description": "Ticket platform.",
"enum": [
"doit",
"google_cloud_platform",
"amazon_web_services",
"microsoft_azure"
]
},
"product": {
"type": "string",
"description": "Ticket product."
},
"requester": {
"type": "string",
"description": "Email address of the requester."
},
"severity": {
"type": "string",
"description": "Severity of the ticket.",
"enum": [
"low",
"normal",
"high",
"urgent"
]
},
"status": {
"type": "string",
"description": "Ticket status."
},
"subject": {
"type": "string",
"description": "Ticket subject."
},
"urlUI": {
"type": "string",
"description": "URL to access the ticket in DoiT console."
}
}
}
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
- update-ticket — Update a request
- add-ticket-tags — Add tags to a support request
- API reference: POST /support/v1/tickets
Aliases: id-of-tickets-post