Skip to main content
POST
/
events
/
{eventId}
/
attendees
curl -X POST -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: attendee-$(uuidgen)" \
  -d '{
    "ticket_class_id": "prod_AbCdEf",
    "contact": {
      "email": "jane@example.com",
      "first_name": "Jane",
      "last_name": "Doe"
    },
    "quantity": 2,
    "send_email": false
  }' \
  https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/attendees
{
  "data": [
    {
      "id": "tkt_AAA",
      "status": "valid",
      "ticket_class_id": "prod_AbCdEf",
      "ticket_class_name": "Early Bird",
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "created_at": "2026-05-26T12:00:00.000Z",
      "updated_at": "2026-05-26T12:00:00.000Z"
    },
    {
      "id": "tkt_BBB",
      "status": "valid",
      "ticket_class_id": "prod_AbCdEf",
      "ticket_class_name": "Early Bird",
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "created_at": "2026-05-26T12:00:00.000Z",
      "updated_at": "2026-05-26T12:00:00.000Z"
    }
  ],
  "payment_id": "pay_XYZ",
  "quantity": 2
}

Create Attendee

Creates one or more tickets (“attendees”) on an event your API key’s organization owns. Mirrors the dashboard’s manual-add flow:
  • Upserts the contact (creates or updates by email).
  • If an invited ticket exists for this email/contact on the event, it’s upgraded and counted toward the requested quantity.
  • All tickets in a single request share one payment_id so the QR ticket page groups them.
  • Capacity is enforced against quantity_total on the ticket class and the event’s capacity.
By default no confirmation email is sent — pass send_email: true to opt in. Requires the attendees: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

ticket_class_id
string
required
The ID of the ticket class to issue.
contact
object
required
quantity
integer
How many tickets to create for this contact (1..100). Defaults to 1.
status
string
Override the initial status. Allowed: valid, pending_approval, checked_in, invited. Defaults to pending_approval when the ticket class requires approval, otherwise valid.
payment_method
string
Recorded on each ticket. cash (default), free, or external. Paid tickets continue to flow through Stripe — this field is informational for manually-recorded sales.
send_email
boolean
When true, the event’s confirmation email is sent to the attendee. Default false.

Response

Returns 201 Created with:
data
array
Array of attendee (ticket) objects — see Get Attendee.
payment_id
string
Shared payment ID across all tickets in the batch.
quantity
integer
Number of tickets actually created (may differ from request when an existing invited ticket was upgraded).

Errors

  • 400 Validation failed — invalid body shape.
  • 404 Event not found / Ticket class not found — resource missing or not owned by your org.
  • 409 — capacity exceeded; the message lists how many seats remain.
curl -X POST -H "X-API-KEY: your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: attendee-$(uuidgen)" \
  -d '{
    "ticket_class_id": "prod_AbCdEf",
    "contact": {
      "email": "jane@example.com",
      "first_name": "Jane",
      "last_name": "Doe"
    },
    "quantity": 2,
    "send_email": false
  }' \
  https://www.gomry.com/api/v1/events/AbCdEfGhIjKlMnOpQrSt/attendees
{
  "data": [
    {
      "id": "tkt_AAA",
      "status": "valid",
      "ticket_class_id": "prod_AbCdEf",
      "ticket_class_name": "Early Bird",
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "created_at": "2026-05-26T12:00:00.000Z",
      "updated_at": "2026-05-26T12:00:00.000Z"
    },
    {
      "id": "tkt_BBB",
      "status": "valid",
      "ticket_class_id": "prod_AbCdEf",
      "ticket_class_name": "Early Bird",
      "first_name": "Jane",
      "last_name": "Doe",
      "email": "jane@example.com",
      "created_at": "2026-05-26T12:00:00.000Z",
      "updated_at": "2026-05-26T12:00:00.000Z"
    }
  ],
  "payment_id": "pay_XYZ",
  "quantity": 2
}