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
const response = await fetch(
"https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/ticket-classes",
{
method: "POST",
headers: {
"X-API-KEY": "your_api_key",
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
name: "Early Bird",
currency: "USD",
cost: 25,
quantity_total: 100,
}),
}
);
const { data } = await response.json();
{
"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,
"remove_service_fees": null,
"remove_service_fees_effective": false,
"created_at": "2026-05-26T12:00:00.000Z",
"updated_at": "2026-05-26T12:00:00.000Z"
}
}
Ticket Classes
Create Ticket Class
Create a new ticket class (tier) on an event
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
const response = await fetch(
"https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/ticket-classes",
{
method: "POST",
headers: {
"X-API-KEY": "your_api_key",
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
name: "Early Bird",
currency: "USD",
cost: 25,
quantity_total: 100,
}),
}
);
const { data } = await response.json();
{
"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,
"remove_service_fees": null,
"remove_service_fees_effective": 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 theticket_classes:write scope.
Idempotency
Pass anIdempotency-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
string
required
The unique identifier of the event.
Request Body
string
required
Ticket class name (1..120 chars). Must be unique among active ticket classes on the event.
string
Optional description shown to attendees (max 10000 chars).
string
required
ISO 4217 currency code (
USD, EUR, …).number
required
Price per ticket. Pass
0 for free tickets.boolean
Marks the class as free. Defaults to
true when cost is 0.integer
Total tickets available. Pass
0 (default) for unlimited.string
ISO 8601 datetime when ticket sales open.
string
ISO 8601 datetime when ticket sales close.
integer
Minimum tickets per order (default
1).integer
Maximum tickets of this class allowed in a single order.
0 or omitted means unlimited, which is the default. Not a per-person limit: the same buyer can place another order.boolean
When
true, new registrations land in pending_approval instead of valid. Default false.boolean
Absorb the Gomry service fee on this ticket class instead of adding it at checkout,
overriding the event-level
remove_service_fees.Omit it to inherit the event — there is no default on purpose. Sending an explicit
value pins this class, so later changes to the event-wide setting no longer move it.Because the setting is per class, one event can absorb the fee on some tiers and pass it on
for others (e.g. cover it on a members tier while general admission still pays it).boolean
Hide this ticket class from the public event page. Default
false.Response
Returns201 Created with the newly created ticket class in the same shape as Get Ticket Class.
Errors
400 Validation failed— invalid body shape (seedetailsfor 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
const response = await fetch(
"https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/ticket-classes",
{
method: "POST",
headers: {
"X-API-KEY": "your_api_key",
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({
name: "Early Bird",
currency: "USD",
cost: 25,
quantity_total: 100,
}),
}
);
const { data } = await response.json();
{
"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,
"remove_service_fees": null,
"remove_service_fees_effective": false,
"created_at": "2026-05-26T12:00:00.000Z",
"updated_at": "2026-05-26T12:00:00.000Z"
}
}

