{"lexicon":1,"id":"tickets.atmosphere.joinWaitlist","defs":{"main":{"type":"procedure","description":"Join the FIFO waitlist for a sold-out ticket tier/capacity group. Takes no capacity; ATM auto-OFFERs a freed seat (never auto-charges) when capacity reopens. Requires app service-auth.","input":{"encoding":"application/json","schema":{"type":"object","required":["tierId"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"eventId":{"type":"string","minLength":1,"maxLength":300},"eventUri":{"type":"string","format":"at-uri"},"tierId":{"type":"string","minLength":1,"maxLength":300},"buyerDid":{"type":"string","format":"did"},"buyerAssertionJwt":{"type":"string","description":"Optional short-lived user service-auth JWT from buyerDid to ATM, scoped to tickets.atmosphere.joinWaitlist. Proves the originating app saw this signed-in buyer.","maxLength":8192},"customerEmail":{"type":"string","maxLength":320,"description":"Private delivery hint for the offer email. ATM stores only a MASKED hint; the raw email is never written to protocol records."},"quantity":{"type":"integer","minimum":1,"maximum":50}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["waitlistId","status","position","quantity","eventId","capacityGroupId"],"properties":{"waitlistId":{"type":"string","maxLength":300},"status":{"type":"string","knownValues":["waiting","offered","claimed","expired","released"],"maxLength":16},"position":{"type":"integer","minimum":0},"quantity":{"type":"integer","minimum":1},"eventId":{"type":"string","maxLength":300},"capacityGroupId":{"type":"string","maxLength":300},"reused":{"type":"boolean"}}}},"errors":[{"name":"AppNotRegistered","description":"Caller DID is not registered as an ATM app."},{"name":"TicketsModuleDisabled","description":"This app has not enabled ATM Tickets."},{"name":"InvalidWaitlistIdentity","description":"A buyerDid or customerEmail is required to join the waitlist."},{"name":"TicketTierNotFound","description":"Ticket tier not found."},{"name":"QuantityTooHigh","description":"Requested quantity exceeds the per-order maximum."},{"name":"UserDidMismatch","description":"buyerAssertionJwt issuer does not match buyerDid."}]}}}