---
title: "Create a sale"
method: POST
path: "/sales"
tags: ["Sales"]
---

# Create a sale

`POST /sales`

Creates a new ticket sale for an event. The event must have tickets enabled and belong to a Pro schedule. Tickets can be referenced by encoded ticket ID or by ticket type name. Sales are created with 'unpaid' status unless the total is zero (free tickets), in which case they are automatically marked as 'paid'.

## Request body

- object
  - `event_id` string, required — Encoded ID of the event
  - `name` string, required — Name of the ticket buyer
  - `email` string, email, required — Email of the ticket buyer
  - `tickets` object, required — Map of ticket identifier (encoded ticket ID or ticket type name) to quantity
  - `event_date` string, date — Specific date for recurring events (Y-m-d format). If omitted, defaults to the event's start date.

## Response `201`

Sale created successfully

- object
  - `data` Sale
    - `id` string — Encoded sale ID
    - `event_id` string — Encoded event ID
    - `event_name` string, nullable — Name of the associated event
    - `subdomain` string, nullable — Subdomain of the schedule where the sale was made
    - `name` string — Buyer name
    - `email` string, email — Buyer email
    - `event_date` string, date — Date of the event occurrence
    - `status` 'unpaid' | 'paid' | 'cancelled' | 'refunded' | 'expired' — Payment status
    - `payment_method` string, nullable — Payment method used
    - `payment_amount` number — Total payment amount
    - `transaction_reference` string, nullable — External transaction reference
    - `secret` string — Secret key for accessing the ticket (only visible to event owner)
    - `tickets` object[] — Tickets included in this sale
      - `ticket_id` string — Encoded ticket ID
      - `quantity` integer — Number of tickets purchased
      - `price` number — Price per ticket
      - `type` string — Ticket type name
    - `total_quantity` integer — Total number of tickets in this sale
    - `created_at` string, date-time, nullable — ISO 8601 creation timestamp
    - `updated_at` string, date-time, nullable — ISO 8601 last update timestamp
  - `meta` object
    - `message` string

## Other responses

- `401` — Missing or invalid API key
- `403` — Unauthorized
- `422` — Validation error or tickets not available

## Changes

- **2026-02-17** `c1e54e26b0db` — 3 warning, 2 info
  - added the new `cancelled` enum value to the `data/status` response property for the response status `201`
  - added the new `expired` enum value to the `data/status` response property for the response status `201`
  - added the new `refunded` enum value to the `data/status` response property for the response status `201`
  - added the optional property `data/event_name` to the response with the `201` status
  - …1 more
- **2026-02-11** `e24c8532211b` — 1 info
  - api operation id `create_sale` was added
- **2026-02-11** `36ccba39bc4d` — 2 warning, 4 info
  - removed the optional property `data/event_name` from the response with the `201` status
  - removed the optional property `data/subdomain` from the response with the `201` status
  - api operation id `create_sale` removed and replaced with ``
  - removed the `cancelled` enum value from the `data/status` response property for the response status `201`
  - …2 more

[Change history](https://skmtc.dev/eventschedule/apis/event-schedule-api/changes/sales/post.md)

---

[API](https://skmtc.dev/eventschedule/apis/event-schedule-api.md) · [All operations](https://skmtc.dev/eventschedule/apis/event-schedule-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/eventschedule/event-schedule-api/revisions/fc24d7d227c4/schema)
