{"openapi":"3.1.0","info":{"title":"Play Tickets","version":"1","description":"Read a client’s events, orders, and tickets, create an event, and admit a guest. Send the client’s API key as a bearer token."},"servers":[{"url":"https://playticketing.fun"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A client API key. It starts with pwmt_."}}},"security":[{"bearer":[]}],"paths":{"/api/v1/me":{"get":{"summary":"Who this key belongs to.","responses":{"200":{"description":"{\n  \"client\": { \"id\": \"…\", \"name\": \"The Rooftop\", \"slug\": \"the-rooftop\" },\n  \"key\": { \"name\": \"Door app\", \"prefix\": \"pwmt_a1B2c3D\" }\n}"}}}},"/api/v1/events":{"get":{"summary":"Every event for this client, newest first, with ticket types and how many are left.","responses":{"200":{"description":"{\n  \"events\": [\n    {\n      \"id\": \"…\",\n      \"name\": \"Rooftop Friday\",\n      \"slug\": \"rooftop-friday\",\n      \"venue\": \"The Rooftop\",\n      \"startsAt\": \"2026-11-01T02:00:00.000Z\",\n      \"summary\": \"\",\n      \"merchant\": \"stripe\",\n      \"paused\": false,\n      \"promoUrl\": \"https://playticketing.fun/go/the-rooftop/rooftop-friday\",\n      \"sold\": 2,\n      \"capacity\": 100,\n      \"grossCents\": 5000,\n      \"ticketTypes\": [\n        { \"id\": \"…\", \"name\": \"General admission\", \"priceCents\": 2500, \"qty\": 100, \"sold\": 2, \"remaining\": 98 }\n      ]\n    }\n  ]\n}"}}},"post":{"summary":"Create an event and its ticket types. Price is cents, and 0 is a free ticket. One to six types. merchant is stripe or 3thix and defaults to stripe.","responses":{"200":{"description":"{ \"event\": { \"id\": \"…\", \"name\": \"Rooftop Friday\", \"slug\": \"rooftop-friday\" } }"}}}},"/api/v1/events/{id}":{"get":{"summary":"One event. A missing event, or another client’s event, is a 404.","responses":{"200":{"description":"{ \"event\": { \"id\": \"…\", \"name\": \"Rooftop Friday\", \"ticketTypes\": [] } }"}}}},"/api/v1/events/{id}/orders":{"get":{"summary":"Orders for one event, newest first. limit is 1 to 100 and defaults to 50. status is paid, pending, expired, or failed.","responses":{"200":{"description":"{\n  \"orders\": [\n    {\n      \"id\": \"…\",\n      \"eventId\": \"…\",\n      \"email\": \"fan@example.com\",\n      \"method\": \"apple\",\n      \"detail\": \"Apple Pay\",\n      \"status\": \"paid\",\n      \"totalCents\": 5000,\n      \"createdAt\": \"2026-10-09T22:00:00.000Z\",\n      \"tickets\": [\n        { \"code\": \"PWMT-LZF4ESNW\", \"name\": \"General admission\", \"usedAt\": null }\n      ]\n    }\n  ]\n}"}}}},"/api/v1/orders/{id}":{"get":{"summary":"One order and its tickets.","responses":{"200":{"description":"{ \"order\": { \"id\": \"…\", \"status\": \"paid\", \"tickets\": [] } }"}}}},"/api/v1/tickets/{code}":{"get":{"summary":"Look up a ticket by its code, such as PWMT-LZF4ESNW.","responses":{"200":{"description":"{\n  \"ticket\": {\n    \"code\": \"PWMT-LZF4ESNW\",\n    \"name\": \"General admission\",\n    \"eventId\": \"…\",\n    \"eventName\": \"Rooftop Friday\",\n    \"venue\": \"The Rooftop\",\n    \"startsAt\": null,\n    \"email\": \"fan@example.com\",\n    \"usedAt\": null\n  }\n}"}}}},"/api/v1/tickets/{code}/admit":{"post":{"summary":"Mark the ticket used. A second call returns the same usedAt and alreadyUsed true. It does not admit the guest again.","responses":{"200":{"description":"{\n  \"alreadyUsed\": false,\n  \"ticket\": { \"code\": \"PWMT-LZF4ESNW\", \"usedAt\": \"2026-10-09T23:10:00.000Z\" }\n}"}}}}}}