{"openapi":"3.1.0","info":{"title":"HOTDROP for agents","version":"1.0.0","description":"HOTDROP is a self-guided sauna and cold plunge venue in Battersea, London. Before you book for someone you are not signed in for, offer them two ways once and remember their answer: sign in once (they approve you on HOTDROP's own page, by email code or Apple or Google; you then book with their credits or membership, and later bookings and cancellations need only their yes in the chat until they disconnect you), or book as a guest (quick_book with their name, paid by card; nothing to sign in to; the desk confirms their details when they arrive; it cannot use credits or a membership). If they say they have a HOTDROP account, credits or a membership, suggest signing in. Do not ask again once you are signed in or they have said which they prefer. search_sessions lists bookable sessions with prices in pence; when the person names a day, time or length, send date, days: 1, around (like 15:00) and minutes so it returns a few rows, not a week; get_session gives one session with its exact free cancellation deadline. Prices and times are facts from the live timetable; quote prices only from get_prices or search_sessions, never from memory (get_prices says the First Drop price and, signed in, whether this person can still buy it). Signed in, every money operation gives a payUrl, a pay link on HOTDROP's own page; only quick_book takes a payment token. Offer the person two plain ways to pay and do not name wallets or payment brands: they pay on the link themselves, or, if you can, you pay it for them. If you can open web pages, you may pay a payUrl yourself once the person approves: open it and fill its card form with a one-time card your own platform issues for this payment; never ask for, type or repeat the person's own card details in the chat. Signed out, send the person to the session bookUrl to book. Signed in (OAuth, see /.well-known/oauth-protected-resource), get_account shows their credits and visits, book_session books with their credits, preview_cancel then cancel_booking cancels, buy_credits opens a purchase whose payUrl the person opens to pay by card, and get_purchase says when it is paid. Send an idempotencyKey (any unique string) on book_session, cancel_booking and buy_credits so a retry never acts twice. All three need the person's approval (Poppy Operations v3): the first call returns isError with structuredContent.operation; show its summary, and when the person agrees call again with the same arguments plus approval, sent exactly as structuredContent.approval gives it: { operation_id, revision, approver: \"user\" }. Over REST the 403 gives approval_header, the Poppy-Approval header value to send as is. If the person will not sign in, quick_book books one place, like a partner booking: send sub, your stable id for the person, agentName, your own name, the guest's givenName and familyName (required: the desk checks them in by name, so ask in the chat), their email only if they give it (optional, never mailed), and the same approval round. The person never has to leave the chat. To pay yourself, send agentPays: true from the first call; once the person approves, get a Stripe shared payment token (spt_) for totalMinor GBP from your own platform wallet (your agent platform issues it after the person confirms there), then call again with the same arguments, the approval and paymentToken. If your platform cannot issue one, do not send agentPays: use the pay link. Never ask the person to paste a token into the chat. It returns state booked; a refused payment charges nothing and releases the place. Without agentPays it returns state awaiting_payment and booked false: the place is held, not booked, until they pay by payBy, so never say it is booked before get_quick_book says so; give them payUrl, or pay it yourself as above, then straight away call get_quick_book with statusToken and wait: true, without waiting for them to say they paid; it answers as soon as the payment lands (or after about 25 seconds), so call it again while it still says awaiting_payment, then tell them it is booked. quick_book, get_quick_book, buy_credits and get_purchase also return checkout, the order as a UCP checkout object (https://ucp.dev, amounts in pence): its continue_url is the same pay link as payUrl. Either way the desk confirms the guest's name and email and has the waiver signed on arrival. Offer sign-in first. Each agent may make 60 requests a minute; RateLimit headers say what is left and a 429 says when to retry. Register with webhook_url to be told of booking.confirmed, booking.cancelled and booking.moved: a POST signed in the Poppy-Signature header (t=<unix>,v1=<hex HMAC-SHA256 of \"t.body\" with webhook_secret>). Worked quick_book example (signed out, REST): (1) POST /v1/agent/quick-bookings with header Idempotency-Key: <unique-id> and body {\"sessionId\":\"<from search_sessions>\",\"sub\":\"muse:<stable-user-id>\",\"agentName\":\"Muse\",\"credits\":2,\"givenName\":\"Ada\",\"familyName\":\"Lovelace\",\"agentPays\":false} (set agentPays: true only if your platform wallet issues an spt_ token; credits is optional, matching the session length). This returns 403 approval_required with operation.summary and approval_header. (2) Show operation.summary to the person; when they agree, repeat the exact same POST with header Poppy-Approval: <approval_header> (and paymentToken: \"spt_...\" if agentPays was true). Without agentPays this returns 200 awaiting_payment with payUrl, orderId and statusToken. (3) Give the person payUrl (or pay it yourself as above) and call GET /v1/agent/quick-bookings/{orderId}?statusToken={statusToken}&wait=true until state is booked. Over MCP, pass the same fields to quick_book (plus idempotencyKey and, on call 2, approval: structuredContent.approval) and poll with get_quick_book. Cancel before a session's freeCancellationUntil and the credits come back with their original expiry; later, they are kept. Card payments are refunded under the same cancellation policy, otherwise at the venue's discretion: ask hello@hotdropsauna.uk."},"servers":[{"url":"https://hotdropsauna.uk/v1"}],"paths":{"/agent/sessions":{"get":{"operationId":"search_sessions","summary":"Search sessions","description":"For a personal AI agent: the public sessions from a venue date (default today) for up to 7 days, soonest first, each with its price in pence (price.amountMinor, GBP: 2200 is £22) for someone with no credits, places left, whether it can be booked now and a link a person opens to book it, plus the free cancellation notice. To keep the list short, send around (a venue time like 15:00: only sessions starting within two hours of it each day, closest first) and minutes (one length, like 50), and days: 1 for one day.","parameters":[{"name":"date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},{"name":"days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1,"maximum":7},{"type":"null"}]}},{"name":"around","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"null"}]}},{"name":"minutes","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1,"maximum":600},{"type":"null"}]}}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/sessions/{sessionId}":{"get":{"operationId":"get_session","summary":"Get a session","description":"For a personal AI agent: one public session, with its price in pence (price.amountMinor, GBP: 2200 is £22), places left, the exact moment free cancellation ends and why it cannot be booked when it cannot.","parameters":[{"name":"sessionId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/prices":{"get":{"operationId":"get_prices","summary":"Read prices","description":"For a personal AI agent: what HOTDROP costs. The single-credit price, each session length in credits and pence (amountMinor, GBP: 2200 is £22), and The First Drop with its rule; signed in, whether this person may still buy it. Quote from here, not from the public site.","parameters":[],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/account":{"get":{"operationId":"get_account","summary":"Read the person's account","description":"For a signed-in personal AI agent: the person's credit balance, each batch of credits with when it expires, their membership and their upcoming visits with the moment free cancellation ends.","parameters":[],"security":[{"oauth":["account:read"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"The token lacks the account:read scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/bookings":{"post":{"operationId":"book_session","summary":"Book with credits","description":"For a signed-in personal AI agent: book a session with the person's credits, now. credits picks the length on a session sold in several lengths. Fails in words when they have too few credits or it is full. Free cancellation until the session's freeCancellationUntil.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Any unique string per intended action. A retry with the same key answers with the first result and never acts twice."}},{"name":"Poppy-Approval","in":"header","required":false,"description":"Send approval_header from the 403 approval_required as is. It is JSON with three required members, {\"operation_id\":\"op_…\",\"revision\":\"r_…\",\"approver\":\"user\"}, plain or base64url encoded; operation_id and revision come from the 403 operation.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"maxLength":64},"places":{"default":1,"type":"integer","minimum":1,"maximum":24},"credits":{"type":"integer","minimum":1,"maximum":12}},"required":["sessionId"],"additionalProperties":false}}}},"security":[{"oauth":["bookings:write"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"approval_required: { error: \"approval_required\", message, operation: { operation_id, revision, summary, terms, expires_at }, approval_header }; show the summary, and when the person agrees repeat the same call with header Poppy-Approval: <approval_header>. Or the token lacks the bookings:write scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/bookings/{bookingId}/cancel":{"get":{"operationId":"preview_cancel","summary":"Preview a cancellation","description":"For a signed-in personal AI agent: what cancelling this visit now would do, free or late, and the credits back. Read it, tell the person, then cancel with expectFree set to what it said.","parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"security":[{"oauth":["bookings:write"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"The token lacks the bookings:write scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}},"post":{"operationId":"cancel_booking","summary":"Cancel a booking","description":"For a signed-in personal AI agent: cancel a visit, once the person approved the operation it returns (free or late, credits back). If the free window closes in between, the terms change and it asks again rather than forfeit credits the person did not agree to lose.","parameters":[{"name":"bookingId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Any unique string per intended action. A retry with the same key answers with the first result and never acts twice."}},{"name":"Poppy-Approval","in":"header","required":false,"description":"Send approval_header from the 403 approval_required as is. It is JSON with three required members, {\"operation_id\":\"op_…\",\"revision\":\"r_…\",\"approver\":\"user\"}, plain or base64url encoded; operation_id and revision come from the 403 operation.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectFree":{"type":"boolean"}},"required":[],"additionalProperties":false}}}},"security":[{"oauth":["bookings:write"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"approval_required: { error: \"approval_required\", message, operation: { operation_id, revision, summary, terms, expires_at }, approval_header }; show the summary, and when the person agrees repeat the same call with header Poppy-Approval: <approval_header>. Or the token lacks the bookings:write scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/purchases":{"post":{"operationId":"buy_credits","summary":"Buy credits","description":"For a signed-in personal AI agent: buy credits for the person (6 is The First Drop while they may still have it). Once the person approves the price, it returns payUrl: give it to the person to pay by card. Then read the purchase until paid.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Any unique string per intended action. A retry with the same key answers with the first result and never acts twice."}},{"name":"Poppy-Approval","in":"header","required":false,"description":"Send approval_header from the 403 approval_required as is. It is JSON with three required members, {\"operation_id\":\"op_…\",\"revision\":\"r_…\",\"approver\":\"user\"}, plain or base64url encoded; operation_id and revision come from the 403 operation.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"qty":{"type":"integer","minimum":1,"maximum":30}},"required":["qty"],"additionalProperties":false}}}},"security":[{"oauth":["purchases:write"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"approval_required: { error: \"approval_required\", message, operation: { operation_id, revision, summary, terms, expires_at }, approval_header }; show the summary, and when the person agrees repeat the same call with header Poppy-Approval: <approval_header>. Or the token lacks the purchases:write scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/purchases/{orderId}":{"get":{"operationId":"get_purchase","summary":"Read a purchase","description":"For a signed-in personal AI agent: where a credit purchase stands, awaiting_payment until the person pays on the pay page, then paid with the credits on their account.","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"security":[{"oauth":["purchases:write"]}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"401":{"description":"Sign in first: an OAuth access token as Authorization: Bearer."},"403":{"description":"The token lacks the purchases:write scope."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/quick-bookings":{"post":{"operationId":"quick_book","summary":"Quick book, signed out","description":"For a personal AI agent whose person has not signed in: book one place. sub is your stable id for the person; the same sub is the same guest at HOTDROP. agentName is your app's name, shown to staff. givenName and familyName are required: the desk checks the guest in by name, as for ClassPass, so ask the person in the chat. email is optional: the desk confirms it on arrival, nothing is sent to it. Two ways to pay. You pay (agentPays: true): once the person approves the price, your own platform wallet issues you a Stripe shared payment token (spt_) for totalMinor GBP, and you send the same call with the approval and paymentToken: it charges the token and returns state booked. If your platform cannot issue one, use the pay link; never ask the person to paste a token. Or the person pays: it returns state awaiting_payment, booked false, payUrl for them to pay and statusToken to read it; the place is held, not booked, until they pay by payBy. Either way the person never leaves the chat: the desk checks the guest in by name and has the waiver signed on arrival. Offer sign-in first: a signed-in person books with credits.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":128,"description":"Any unique string per intended action. A retry with the same key answers with the first result and never acts twice."}},{"name":"Poppy-Approval","in":"header","required":false,"description":"Send approval_header from the 403 approval_required as is. It is JSON with three required members, {\"operation_id\":\"op_…\",\"revision\":\"r_…\",\"approver\":\"user\"}, plain or base64url encoded; operation_id and revision come from the 403 operation.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sessionId":{"type":"string","minLength":1,"maxLength":64},"sub":{"type":"string","minLength":8,"maxLength":128},"agentName":{"anyOf":[{"type":"string","minLength":1,"maxLength":60},{"type":"null"}]},"credits":{"type":"integer","minimum":1,"maximum":12},"givenName":{"type":"string","minLength":1,"maxLength":80},"familyName":{"type":"string","minLength":1,"maxLength":80},"email":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"agentPays":{"type":["boolean","null"]},"paymentToken":{"anyOf":[{"type":"string","pattern":"^spt_[A-Za-z0-9_]{6,200}$"},{"type":"null"}]}},"required":["sessionId","sub","givenName","familyName"],"additionalProperties":false}}}},"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}},"/agent/quick-bookings/{orderId}":{"get":{"operationId":"get_quick_book","summary":"Read a quick book","description":"For a personal AI agent: where a quick book stands, read with the statusToken it returned: awaiting_payment until the person pays, then paid and booked. Send wait: true right after you give the person payUrl: it answers as soon as the payment lands, or after about 25 seconds if not, so call again while it says awaiting_payment.","parameters":[{"name":"orderId","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"name":"statusToken","in":"query","required":true,"schema":{"type":"string","minLength":16,"maxLength":64}},{"name":"wait","in":"query","required":false,"schema":{"type":["boolean","null"]}}],"responses":{"200":{"description":"The answer, as JSON."},"400":{"description":"The input was wrong: { error: { code, message } }."},"404":{"description":"Not found: { error: { code, message } }."},"409":{"description":"Refused in words, for example full, too few credits or the free window closed: { error: { code, message } }."}}}}},"components":{"securitySchemes":{"oauth":{"type":"oauth2","description":"Public clients with PKCE, or the device grant for agents without a browser. Register at /oauth/register.","flows":{"authorizationCode":{"authorizationUrl":"https://hotdropsauna.uk/oauth/authorize","tokenUrl":"https://hotdropsauna.uk/oauth/token","refreshUrl":"https://hotdropsauna.uk/oauth/token","scopes":{"account:read":"See your credits, membership and upcoming bookings","bookings:write":"Book and cancel sessions for you, within the cancellation rules","purchases:write":"Buy credits, memberships and tickets for you, after you approve each payment"}},"deviceAuthorization":{"deviceAuthorizationUrl":"https://hotdropsauna.uk/oauth/device","tokenUrl":"https://hotdropsauna.uk/oauth/token","refreshUrl":"https://hotdropsauna.uk/oauth/token","scopes":{"account:read":"See your credits, membership and upcoming bookings","bookings:write":"Book and cancel sessions for you, within the cancellation rules","purchases:write":"Buy credits, memberships and tickets for you, after you approve each payment"}}}}}}}