Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/zendesk

src/create-ticket.ts

11 lines · 502 B · TypeScript
import { createTicket, parseCreateTicket } from './tickets.ts'

/**
 * Create a Zendesk ticket. Requires `confirm: true`, or use `dryRun: true`.
 * @example
 * import createTicket from 'kody:@kody/zendesk/create-ticket'
 * const preview = await createTicket({ subject: 'Reset password', comment: 'User cannot sign in.', dryRun: true, subdomain: 'acme' })
 */
export default async function createTicketEntrypoint(params: Record<string, unknown> = {}) {
	return createTicket(parseCreateTicket(params))
}