---
ref: tool:zendesk/create-ticket
name: Create a ticket
company: company:zendesk
workflows: []
access: [api]
tags: [capability:manage-tasks, category:support, has:api]
docs: https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#create-ticket
updated: 2026-09-27
---

# 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.

Send a `ticket` object whose only required property is `comment`; use
`html_body` instead of `body` for HTML. Set `requester` to an email or a name
and email: a requester who doesn't exist yet may be created, depending on
account settings. Send an `Idempotency-Key` header so a retry can't create a
duplicate ticket. 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/

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
