{"openapi":"3.1.0","info":{"title":"TicketText Agent API","version":"1.0.0","description":"Lets AI agents book event tickets for a person. TicketText is demand-led: the buyer names a max price per ticket and verified sellers accept. Flow: 1) GET /v1/events to find the event. 2) POST /v1/pricing for a market range. 3) POST /v1/requests with the buyer's email. 4) The buyer gets an email link to place a card hold (agents never handle card data). 5) Poll GET /v1/requests/{id}. No API key needed."},"servers":[{"url":"https://nvvxuhmqitwqfjwjjrbn.supabase.co/functions/v1/agent-api"}],"paths":{"/v1/events":{"get":{"operationId":"searchEvents","summary":"Search upcoming events","parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string"},"description":"Artist, team, show or event, e.g. 'Lakers' or 'Taylor Swift'"},{"name":"city","in":"query","schema":{"type":"string"},"description":"Optional city to focus results"}],"responses":{"200":{"description":"Events","content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string","description":"Id from GET /v1/events"},"name":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"date":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["concert","sports","theater","comedy","other"]},"image_url":{"type":["string","null"]}},"required":["event_id","name"]}}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/v1/tiers":{"get":{"operationId":"listSeatingTiers","summary":"List seating tiers","responses":{"200":{"description":"Tiers"}}}},"/v1/pricing":{"post":{"operationId":"getPriceRange","summary":"Market price range for an event and seating tier","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"event":{"type":"object","properties":{"event_id":{"type":"string","description":"Id from GET /v1/events"},"name":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"date":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["concert","sports","theater","comedy","other"]},"image_url":{"type":["string","null"]}},"required":["event_id","name"]},"seating_tier":{"type":"string"},"section":{"type":"string"}},"required":["event"]}}}},"responses":{"200":{"description":"Price range: get-in (lowest), average and top listed prices per ticket in USD"}}}},"/v1/requests":{"post":{"operationId":"createTicketRequest","summary":"Create a ticket request for a buyer","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string"}},{"name":"X-Agent-Name","in":"header","schema":{"type":"string"},"description":"Name of your assistant, shown to the buyer"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["event","quantity","max_price_per_ticket","buyer_email"],"properties":{"event":{"type":"object","properties":{"event_id":{"type":"string","description":"Id from GET /v1/events"},"name":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"date":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["concert","sports","theater","comedy","other"]},"image_url":{"type":["string","null"]}},"required":["event_id","name"]},"quantity":{"type":"integer","minimum":1,"maximum":20},"max_price_per_ticket":{"type":"number","minimum":1,"maximum":50000,"description":"USD, all-in per ticket"},"seating_tier":{"type":"string","enum":["any","upper","lower","club","floor","vip"]},"sections":{"type":"array","items":{"type":"string"},"description":"Optional exact sections, e.g. ['112','113']"},"duration_hours":{"type":"integer","enum":[1,6,12,24,48,72],"description":"How long the offer stays open once confirmed"},"buyer_email":{"type":"string","format":"email"},"buyer_name":{"type":"string"},"special_requests":{"type":"string"}}}}}},"responses":{"201":{"description":"Created. Save request_token; it is shown once.","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["awaiting_payment","live","accepted","delivered","expired","cancelled","disputed"]},"status_help":{"type":["string","null"]},"event":{"type":"object","properties":{"event_id":{"type":"string","description":"Id from GET /v1/events"},"name":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"date":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["concert","sports","theater","comedy","other"]},"image_url":{"type":["string","null"]}},"required":["event_id","name"]},"seating_tier":{"type":"string"},"sections":{"type":"array","items":{"type":"string"}},"quantity":{"type":"integer"},"max_price_per_ticket":{"type":"number"},"total_offer_amount":{"type":"number"},"currency":{"type":"string"},"expires_at":{"type":"string"},"created_at":{"type":"string"}}},"request_token":{"type":"string"},"next_step":{"type":"string"}}}}}},"400":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}},"429":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}},"/v1/requests/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"X-Request-Token","in":"header","required":true,"schema":{"type":"string"}}],"get":{"operationId":"getTicketRequest","summary":"Get request status","responses":{"200":{"description":"Request","content":{"application/json":{"schema":{"type":"object","properties":{"request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["awaiting_payment","live","accepted","delivered","expired","cancelled","disputed"]},"status_help":{"type":["string","null"]},"event":{"type":"object","properties":{"event_id":{"type":"string","description":"Id from GET /v1/events"},"name":{"type":"string"},"venue":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"date":{"type":"string","format":"date-time"},"category":{"type":"string","enum":["concert","sports","theater","comedy","other"]},"image_url":{"type":["string","null"]}},"required":["event_id","name"]},"seating_tier":{"type":"string"},"sections":{"type":"array","items":{"type":"string"}},"quantity":{"type":"integer"},"max_price_per_ticket":{"type":"number"},"total_offer_amount":{"type":"number"},"currency":{"type":"string"},"expires_at":{"type":"string"},"created_at":{"type":"string"}}}}}}}},"404":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}},"delete":{"operationId":"cancelTicketRequest","summary":"Cancel before the buyer confirms","responses":{"200":{"description":"Cancelled"},"409":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}}}}}}