{"lexicon":1,"id":"tickets.atmosphere.releaseFreeTicket","defs":{"main":{"type":"procedure","description":"Release a buyer's free-claim tickets back to capacity — the inverse of claimFreeTicket for un-RSVP flows. Voids the buyer's ACTIVE free-claim tickets for the event (never checked-in or transferred tickets), returns their seats to capacity, and re-offers freed seats to the waitlist. Free claims only; paid tickets return capacity through refunds. Idempotent: releasing when nothing is active succeeds with releasedCount 0. Requires app service-auth plus a verified buyerAssertionJwt.","input":{"encoding":"application/json","schema":{"type":"object","required":["buyerDid","buyerAssertionJwt","idempotencyKey"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"eventId":{"type":"string","minLength":1,"maxLength":300},"eventUri":{"type":"string","format":"at-uri"},"buyerDid":{"type":"string","format":"did"},"buyerAssertionJwt":{"type":"string","description":"Required short-lived user service-auth JWT from buyerDid to ATM, scoped to tickets.atmosphere.releaseFreeTicket.","maxLength":8192},"idempotencyKey":{"type":"string","minLength":1,"maxLength":200,"description":"Caller-stable identity for this release gesture. Reuse the same key after an ambiguous or lost response; ATM replays the original completed result and never releases tickets claimed later. A key cannot be reused for another buyer, event, or ticketIds selector in the same app environment."},"ticketIds":{"type":"array","description":"Optional narrowing to specific tickets — OMIT the field to release EVERY active free-claim ticket the buyer holds for this event, or pass an EMPTY array (or one with no valid ids) to release NOTHING and get releasedCount 0. The two are deliberately different so an empty client selection cannot un-RSVP a buyer from everything.","items":{"type":"string","minLength":1,"maxLength":300},"maxLength":50}}}},"output":{"encoding":"application/json","schema":{"type":"object","required":["environment","releasedCount","releasedTicketIds"],"properties":{"environment":{"type":"string","knownValues":["test","live"],"maxLength":16},"releasedCount":{"type":"integer","minimum":0,"description":"Authoritative number of tickets released — may exceed releasedTicketIds.length, which is capped at 1000, so treat a shorter list as partial and re-query rather than as the complete set."},"releasedTicketIds":{"type":"array","description":"Ids of the released tickets, truncated to the first 1000 — compare against releasedCount to detect truncation.","items":{"type":"string","maxLength":300},"maxLength":1000}}}},"errors":[{"name":"AppNotRegistered","description":"Caller DID is not registered as an ATM app."},{"name":"TicketsModuleDisabled","description":"This app has not enabled ATM Tickets."},{"name":"UserAssertionRequired","description":"A verified buyer assertion (buyerAssertionJwt) is required to release free-claim tickets."},{"name":"AuthVerificationFailed","description":"The service-auth token could not be verified."},{"name":"UserDidMismatch","description":"buyerAssertionJwt issuer does not match buyerDid."},{"name":"InvalidRequest","description":"Provide eventId or eventUri."},{"name":"EventNotFound","description":"The event does not exist for this app and environment."},{"name":"IdempotencyConflict","description":"The idempotencyKey was already used for a different buyer, event, or ticketIds selector."},{"name":"TicketsBusy","description":"The inventory row is contended; retry shortly."}]}}}