Skip to main content
POST
/
events
/
{eventId}
/
ticket-classes
curl -X POST -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ticket-class-$(uuidgen)" \
  -d '{
    "name": "Early Bird",
    "description": "Limited release",
    "currency": "USD",
    "cost": 25,
    "quantity_total": 100,
    "minimum_per_order": 1,
    "maximum_per_order": 4
  }' \
  https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/ticket-classes
{
  "data": {
    "id": "prod_AbCdEf",
    "name": "Early Bird",
    "description": "Limited release",
    "status": "active",
    "currency": "USD",
    "cost": 25,
    "free": false,
    "quantity_total": 100,
    "quantity_sold": 0,
    "sales_start": null,
    "sales_end": null,
    "minimum_per_order": 1,
    "maximum_per_order": 4,
    "require_approval": false,
    "created_at": "2026-05-26T12:00:00.000Z",
    "updated_at": "2026-05-26T12:00:00.000Z"
  }
}

Create Ticket Class

Creates a new ticket class (a tier — General Admission, VIP, Early Bird, …) on an event your API key’s organization owns. Requires the ticket_classes:write scope.

Idempotency

Pass an Idempotency-Key header (max 255 chars) to make POST retries safe. The first request executes the create; subsequent requests with the same key within 24 hours replay the original response verbatim — including the original status code — and add an Idempotent-Replay: true response header. Keys are scoped per API key. Two concurrent requests with the same key return 409 idempotent_request_in_progress to the second caller.

Path Parameters

eventId
string
required
The unique identifier of the event.

Request Body

name
string
required
Ticket class name (1..120 chars). Must be unique among active ticket classes on the event.
description
string
Optional description shown to attendees (max 10000 chars).
currency
string
required
ISO 4217 currency code (USD, EUR, …).
cost
number
required
Price per ticket. Pass 0 for free tickets.
free
boolean
Marks the class as free. Defaults to true when cost is 0.
quantity_total
integer
Total tickets available. Pass 0 (default) for unlimited.
sales_start
string
ISO 8601 datetime when ticket sales open.
sales_end
string
ISO 8601 datetime when ticket sales close.
minimum_per_order
integer
Minimum tickets per order (default 1).
maximum_per_order
integer
Maximum tickets per order (default 10).
require_approval
boolean
When true, new registrations land in pending_approval instead of valid. Default false.
hide_on_event_page
boolean
Hide this ticket class from the public event page. Default false.

Response

Returns 201 Created with the newly created ticket class in the same shape as Get Ticket Class.

Errors

  • 400 Validation failed — invalid body shape (see details for the Zod error).
  • 404 Event not found — the event does not belong to your organization, or does not exist.
  • 409 A ticket class with this name already exists — another active class on this event already uses this name.
curl -X POST -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: ticket-class-$(uuidgen)" \
  -d '{
    "name": "Early Bird",
    "description": "Limited release",
    "currency": "USD",
    "cost": 25,
    "quantity_total": 100,
    "minimum_per_order": 1,
    "maximum_per_order": 4
  }' \
  https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/ticket-classes
{
  "data": {
    "id": "prod_AbCdEf",
    "name": "Early Bird",
    "description": "Limited release",
    "status": "active",
    "currency": "USD",
    "cost": 25,
    "free": false,
    "quantity_total": 100,
    "quantity_sold": 0,
    "sales_start": null,
    "sales_end": null,
    "minimum_per_order": 1,
    "maximum_per_order": 4,
    "require_approval": false,
    "created_at": "2026-05-26T12:00:00.000Z",
    "updated_at": "2026-05-26T12:00:00.000Z"
  }
}