by Zendesk
Create a ticket
Creates a support ticket from a first comment, with an optional subject, requester, priority, tags and custom fields, and returns the ticket.
Updated Sep 27, 2026
create-ticket.md
Create a ticket
Creates a support ticket from a first comment, with an optional subject, requester, priority, tags and custom fields, and returns the ticket.
Note: Send an Idempotency-Key header so a retry can't create a duplicate ticket. A requester who doesn't exist yet may be created, depending on account settings. Needs an agent's token.
Set up
Use the first option your agent supports.
API (official)
- Base URL: https://{subdomain}.zendesk.com
- Endpoint:
POST /api/v2/tickets - Auth: send the header
Authorization: Bearer $ZENDESK_OAUTH_TOKEN - Get a key: https://developer.zendesk.com/documentation/authentication/oauth-migration/#getting-your-first-token
- Docs: https://developer.zendesk.com/api-reference/ticketing/introduction/
Note: {subdomain} is your Zendesk subdomain, as in acme.zendesk.com. Tokens from OAuth clients created since April 30, 2026 expire after 30 minutes.
Before anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.
Rules
- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
Ways in
| Route | Source | Call | Required | Docs |
|---|---|---|---|---|
| Official | POST /api/v2/tickets | API key in $ZENDESK_OAUTH_TOKEN | Docs |