Skip to content

Mutation

Fields

createAppCreateAppResult!

Create an app owned by the viewer. The handle is global and permanent; the sessions CLI creates one from sessions.app.json on first push.

Arguments (3)
handleString!
nameString!
descriptionString
updateAppUpdateAppResult!

Rename or describe an app the viewer owns, or set its icon to an uploaded image.

Arguments (4)
idID!
nameString
descriptionString
deleteAppDeleteAppResult!

Delete an app the viewer owns. Every business that installed it stops rendering its extensions.

Arguments (1)
idID!
createAppExtensionCreateAppExtensionResult!

Add an extension to an app the viewer owns.

Arguments (5)
handleString!
nameString!
descriptionString
updateAppExtensionUpdateAppExtensionResult!
Arguments (3)
idID!
nameString
descriptionString
deleteAppExtensionDeleteAppExtensionResult!
Arguments (1)
idID!
pushAppExtensionVersionPushAppExtensionVersionResult!

Upload a new version of an extension: one bundled ES module per target it renders into, each with its live query. Creates a draft; publish it to make businesses run it.

Arguments (4)
extensionEntityRef!
apiVersionString!

The extension API version the modules were written against, e.g. 2026-09.

The extension's translated strings, one entry per locale (its translations/<locale>.json files). At most 256 KB in all.

publishAppExtensionVersionPublishAppExtensionVersionResult!

Make a pushed version the one businesses run.

Arguments (1)
idID!
createDeveloperAccessTokenCreateDeveloperAccessTokenResult!

Mint a CLI credential for the viewer. The secret is returned once.

Arguments (1)
nameString!
revokeDeveloperAccessTokenRevokeDeveloperAccessTokenResult!
Arguments (1)
idID!

Price a basket, mint the order, and — when money is owed — the PaymentIntent to pay for it. The single entry point for booking a session, buying a product, booking an appointment time, or entering a team or individual into a league: one mutation, any mix of items, one order.

Two phases. This one writes a pending purchase and its lines, holding no capacity and spending no credits, and returns a CheckoutSession for the client to confirm with Stripe Elements. completePurchase (or the webhook backing it up) then fulfills it. A free or fully credit-funded basket skips Stripe entirely and comes back already completed, with a null checkoutSession — the same free-versus-paid contract the mutations it replaces had.

Works signed-out when the business allows guest checkout: pass buyer with the buyer's email and a bot-challenge token.

Arguments (16)

What is being bought.

Guest details, for a checkout with no signed-in viewer.

discountCodeString
giftCardCodeString
tipAmountInt
donationAmountInt

An optional gift to the business, in cents, added after tax beside the tip and never taxed. Refused unless every activity in the basket has RegistrationConfiguration.acceptsDonations on.

taxCalculationIdID

The tax quote the buyer was shown, handed back so they are charged what they saw rather than a freshly recomputed figure.

authorizeBalanceCardBoolean

The buyer agrees this order's balance may be charged to the card they are paying with, once the service has been delivered.

Only meaningful on a checkout that leaves a balance — a deposit. Omitted or false, the order keeps no card and the balance is collected the way every other one is: a card at the desk, the emailed link, or cash. An absent value is a no, never a default yes.

recurringConsentAcceptedBoolean

The buyer agrees to be charged again for each membership in the basket, at its price, every billing cycle, until they cancel.

Required — and must be true — for a basket holding a membership with a price: the order pays for the first period, and the card it is paid with is kept and charged for every period after. An absent value is a no, and the checkout is refused. Ignored for a basket with no membership in it.

ageRuleAcceptedBoolean

The buyer confirms that everyone they are booking for meets each session's minimum age and will bring photo ID: an activity whose registration.restrictions.age has checkedAtDoor and a minimumAge (an 18+, 19+ or 21+ night).

Required, and must be true, for a basket holding such a session, signed in or not: an absent value is a no, and the checkout is refused with field: "ageRuleAccepted". Ignored for a basket with no session checked at the door. The confirmation is recorded on each booking it covers as sessions.admission.age-confirmation block metadata.

Never asked of staff: checkoutAsStaff and every Business API request book without it, since the box office sees its customer. Appointments and league entries carry no session rule and are not asked either.

attributionAttributionInput
idempotencyKeyString

Client-supplied key that makes a retried mint return the original order instead of minting a second one.

botChallengeTokenString

The bot challenge token, for a signed-in buyer of a session whose activity is highDemand, checking out from a browser on a Sessions page. A guest sends theirs on buyer instead. Site key from Services.botChallenge.siteKey; fails open like the guest challenge. A request with no first-party Origin — a native app, an embed on another domain, a server — is not challenged and is throttled per buyer instead. A missing or failed token is refused with field: "botChallengeToken".

admissionTokens[String!]

Admission tokens from the waiting room (enterWaitingRoom), one for each session in the basket whose activity is highDemand. Every buyer of such a session waits their turn, on every client: a missing, expired or mismatched token is refused with field: "admissionTokens", and the client should enter the room again. Ignored for sessions that are not high demand.

completePurchaseCompletePurchaseResult!

Fulfill a minted purchase once its payment has been confirmed: books the sessions, mints the entitlements, spends the credits, and records how the order was funded, all in one transaction.

Idempotent, and safe to race — the Stripe webhook calls the same routine, so a buyer who closes the tab mid-confirm still gets their booking exactly once.

Authorized by possession of the unguessable purchase id, so a guest can finish their own checkout. A signed-in caller must additionally own the purchase, so a leaked id cannot be completed by a third party.

Arguments (2)
purchaseID!
paymentMethodID
collectPurchaseBalanceCheckoutResult!

Collect what a deferred order still owes.

An activity set to collect payment after the fact confirms its bookings at checkout and charges nothing, leaving the whole order owing: that shortfall is Purchase.balanceDue. This mints one more CheckoutSession against the same order for whatever is currently owed, and completePurchase records the funding once the card confirms. Nothing is booked or re-booked — the order is already complete, and collection only adds to how it was funded.

A giftCardCode that covers the whole balance settles it outright, with no Stripe leg and a null checkoutSession. One that covers only part takes its share off what the card is charged: the share is staged against the minted payment and debited only when that payment confirms, so an abandoned checkout leaves the gift card untouched. If the card no longer covers its share by then, completePurchase returns the order with an error and that part stays owing.

Authorized by possession of the unguessable purchase id, exactly as completePurchase is, so the emailed pay link works with no account behind it. A signed-in caller must own the order or be staff of the business.

Arguments (2)
purchaseID!
giftCardCodeString
cancelBookingCancelBookingResult!

Cancel a booking and, under the activity's cancellation policy, return the money and the credits it consumed. Booking.cancellationPreview says what this will do before it is called.

Arguments (1)
bookingID!
changeBookingSpotUpdateBookingSpotResult!

Move the viewer's own confirmed booking to another free spot on the same session — a different bike, mat or seat.

Pick the spot through holdSpots first, under the same holderKey, so nobody else can take it while the buyer confirms; a spot that is free but not yet held is taken here through the same hold. The hold is released once the booking sits in the spot, and the spot the booking left goes back on sale.

Refused after Session.spotChangesUntil (or when it is null), for a booking that holds more than one spot, for a spot sold or held by somebody else, and for one that isn't on the map this session sells against.

Arguments (3)
bookingID!
holderKeyString!
rescheduleBookingRescheduleBookingResult!

Move the viewer's own appointment or rental to another open time of the same activity. The booking keeps its length, its practitioner and everything it was paid with: nothing is charged and nothing is refunded.

Allowed until Booking.reschedulableUntil, which is as long as cancelling would cost nothing under the activity's cancellation policy, and only for the person the booking is for or the person who made it (a parent for their child), the same rule as changeBookingSpot. Booking.rescheduleSlots lists the starts it can move to. The new time is checked again against the activity's live availability as the move is written, so a time somebody else took in the meantime is refused rather than double-booked.

Arguments (2)
bookingID!
startAtDateTime!
respondToBookingAttendanceRespondToBookingAttendanceResult!

Say whether the viewer's booking is still on — the answer to a reminder's "I'll be there" and "Can't make it" buttons. Answering again replaces the previous answer.

Intent only: declined neither cancels nor refunds, so the place stays held until cancelBooking is called. Allowed for the person the booking is for or the person who made it (a parent for their child), on a confirmed booking for one session that has not started yet.

sessionStartAt is the start the question was asked about, as the reminder's links carry it: when the session has moved since, the answer is refused rather than recorded against the new time.

Arguments (3)
bookingID!
sessionStartAtDateTime
cancelBookingSeatsCancelBookingSeatsResult!

Cancel some of a party's places and keep the rest of the booking.

seats names the places to give back (Booking.tickets). What they cost comes back under the activity's cancellation policy — its percentage, but neither its flat fee nor its credit forfeit, because the party is still coming. Whatever of their price was still owed stops being owed. Naming every place is refused: that is cancelBooking, which applies the policy in full and emails the party.

Giving places back does not, on its own, offer them to anybody waiting; nor does cancelBooking for a confirmed booking. Places freed either way are there for the next booking, or for staff to promote someone into.

Arguments (2)
bookingID!
seats[ID!]!
shareTicketShareTicketResult!

Hand one ticket of an order to somebody in the party: returns a link that opens that ticket alone, with its own check-in code, to whoever holds it.

The booker's alone to call. Sharing a ticket that is already shared hands back its live link rather than minting a second one. The booker gets one email summarizing what they have shared, a little after the last share.

Arguments (1)
ticketID!
stopSharingTicketStopSharingTicketResult!

Turn a ticket's share link off. The link stops opening at once; sharing the ticket again mints a new one. The booker's alone to call.

Arguments (1)
ticketID!
sendTicketSendTicketResult!

Send one ticket to somebody by email. They get an email with the ticket's link; when the address belongs to a Sessions account, the ticket is also saved to it, so it shows among their tickets right away. The answer is the same either way, so it never says whether an address has an account. A ticket goes to one person: sending it stops any link already out for it, unless that link went to the same account. The booker's alone to call.

Arguments (2)
ticketID!
emailString!
addBookingSeatsAddBookingSeatsResult!

Add seats more places to a party's booking — more people are coming.

They join the booking the party already holds. A queued party is charged nothing now; letting it in prices every seat it holds. A booked party pays for the new seats through a checkout of their own: the result carries its checkoutSession to confirm, then completePurchase, whose fulfilment adds the seats — or, when they cost nothing, an already-completed purchase. An offered party accepts its offer first. The session must have room.

Refused (field: seats) on a class each buyer books only for themselves (participantMode: selfOnly, on the session or else its activity): there are no guests to bring. Staff may still add to a party.

Booking.seatAdditionPreview says what this will cost before it is called, and is null when it would be refused.

Arguments (5)
bookingID!
seatsInt!

The ticket types the new seats are sold at, for a session that sells them — the same {price, quantity} list checkout takes, whose quantities add up to seats. Without it the seats are sold at the activity's own price, which is what a session selling one kind of place charges. Only a booked party paying for its own seats is priced by ticket type; a queued party's are priced when it is let in.

spotHolderKeyString

The key the buyer's seat holds were taken under, when prices names reserved seats — the same key holdSpots was called with.

ageRuleAcceptedBoolean

The buyer's confirmation of the session's door age rule, as on checkout. Required, and must be true, on an 18+, 19+ or 21+ session: a growing party re-confirms for everyone in it. An absent value is refused with field: "ageRuleAccepted".

joinBookingWaitlistJoinWaitlistResult!

Join the queue for a full session. Writes a waitlisted booking with no order behind it — nothing is charged until a place is offered and accepted, which is why this is not checkout.

Automatic promotion charges a card the party reserved at join time: capture one with createWaitlistSetupIntent and pass it as paymentMethod. A place queued without one is promoted to an offer for the party to accept.

Arguments (7)
sessionEntityRef!

Guest details, for a visitor queueing with no signed-in viewer — the same shape checkout takes. A queued place has no order behind it, so this is the only thing that will identify the party when the place is offered weeks later: without it, an anonymous caller has nowhere to be reached and the join is refused.

intendedPaymentMethodBookingIntendedPaymentMethod

How the party intends to pay if promoted. Drives whether a promotion can charge automatically or has to wait for the buyer.

admissionsInt

How many places the party is queueing for. Defaults to one.

paymentMethodID

A Stripe PaymentMethod to hold against the queued place, so a promotion can charge off-session instead of waiting for the buyer to come back. Validated as belonging to the caller before it is stored; a place queued without one still joins, and its promotion falls through to the offer-and-pay email.

Ignored on a free session and on a demo tenant, neither of which will ever charge.

The registration form's answers, the same shape checkout takes. A waiver that requires a signature has to be signed here: a promotion confirms the queued place without asking again, so the answers are stored on the queued booking and carried onto the order when the place is let in.

acceptBookingOfferCheckoutResult!

Accept an offered place. Re-enters checkout for the amount owed, so the result carries a CheckoutSession exactly as checkout does; the existing waitlisted booking is confirmed rather than a second one inserted beside it.

Arguments (4)
bookingID!
discountCodeString
giftCardCodeString
ageRuleAcceptedBoolean

The buyer's confirmation of the session's door age rule, as on checkout. Required, and must be true, on an 18+, 19+ or 21+ session: joining the queue asks nothing, so this is where the buyer of a queued place confirms it. An absent value is refused with field: "ageRuleAccepted".

createAccountRequestAuthCodeResult!

Request an email containing a 6-digit code to confirm a new account. Always returns success regardless of whether the email is already in use (anti-enumeration). If an account already exists for the email, a sign-in code is sent instead.

When businessHandle is set, the issued code is pinned to that business and the resulting token is scoped to it (does not set a cross-account cookie). Used by the business-pinned embed sign-in flow.

When name is set and the email resolves to a brand-new account at redemption time, that name is applied to the inserted user row. Ignored for emails that already have an account.

Arguments (4)
emailString!
nameString
redirectString
businessHandleString

Request a sign-in email containing a 6-digit code. Always returns success regardless of whether the email matches an existing account (anti-enumeration).

When businessHandle is set, the issued code is pinned to that business and the resulting token is scoped to it (does not set a cross-account cookie). Used by the business-pinned embed sign-in flow.

Arguments (3)
emailString!
redirectString
businessHandleString
redeemAuthCodeSignInResult!

Redeem a 6-digit auth code and sign the user in. Returns the created or signed-in user, the JWT token, and the redirect URL stored on the code. Sets the auth cookie on success — except for codes that were issued with a business pin, which return a business-scoped token without touching the cookie session.

passkey is a finishSignUpPasskey token: a passkey made before the code arrived. It is attached to the account the code signs in to when it was made for the same address, and silently dropped otherwise — the sign-in goes ahead either way.

Arguments (3)
emailString!
codeString!
passkeyString
confirmSocialSignUpSignInResult!

Create the account a social sign-in stopped short of creating, and sign in as it. token is the pending sign-up handed to a popup opener; omit it and the pending cookie is used instead (the popup-blocked flow, which has no opener to hand anything to). name is the viewer's chosen display name, falling back to whatever the provider shared.

Resolution is re-run from scratch, so an account that appeared in the meantime — another tab, an email sign-up — is linked rather than forked. Sets the auth cookie, or returns a business-scoped token for an embed.

Arguments (2)
tokenString
nameString
cancelSocialSignUpCancelSocialSignUpResult!

Discard a pending social sign-up without creating anything. Clears the pending cookie so a later page load doesn't ask again.

Clear the auth cookie and sign out the current user.

refreshSessionRefreshSessionResult!

Exchange a native app's session token for a fresh one. The token a sign-in returns stops being accepted after 15 minutes; send it here — expired or not, and without an Authorization header — and use the returned token from then on. Renews and rotates by the same rules as the auth cookie: each token renews once, and presenting one the session has already moved past signs that session out everywhere. Refused once the session is signed out, revoked, or unused for 30 days; the app should then sign out.

Arguments (1)
tokenString!
enterWaitingRoomEnterWaitingRoomResult!

The way into a high-demand session's waiting room.

A session whose activity is highDemand sells through a waiting room: each buyer waits their turn and is let through at a rate the sale can absorb, with an admission token that checkout, holdSpots and holdSessionPlaces require. Call this when the buyer starts to book, then open a WebSocket to url (it carries a short-lived token, so call this again to reconnect) and speak the room's @quilted/threads protocol: call join({ticket}) to take a place (or keep one after a reconnect), and answer the room's update(status) calls as the line moves. The status is waiting (with ticket, position, estimatedWaitSeconds) or admitted (with admissionToken and admissionExpiresAt). An open socket keeps the place; a buyer gone for a while loses it.

url is null for a session that sells without a waiting room: check out as usual. A signed-in buyer keeps one place across devices.

Arguments (1)
sessionEntityRef!
createBankDebitMandateSetupCreateBankDebitMandateSetupResult!

Mint a SetupIntent on the business's connected account so the buyer can authorize a bank-debit mandate before the membership they're paying for exists.

For rails that cannot collect a mandate from a deferred-intent Payment Element — Canadian pre-authorized debit, which Stripe refuses there outright — this is what the bank form mounts against. Confirm it with confirmSetup, then hand the SetupIntent id to checkout as funding.mandate.

Re-runs the gates behind Membership.bankDebit server-side, plus the connected account's capability, and returns an error rather than a mandate when any of them says no — unlike the charge-time gate, there is nothing to silently fall back to here: the buyer asked for a bank form.

Arguments (1)
productEntityRef!
addFavoriteAddFavoriteResult!

Add a business, staff member (instructor), or activity to the authenticated user's favorites. Idempotent — adding an existing favorite is a no-op.

Arguments (1)
removeFavoriteRemoveFavoriteResult!

Remove a business, staff member, or activity from the authenticated user's favorites. Idempotent — removing a favorite that isn't set is a no-op.

Arguments (1)
setMyEmailMarketingConsentSetMyEmailMarketingConsentResult!

Set the signed-in viewer's own email-marketing consent for a business they participate in. grant records an affirmative opt-in and freezes the compliant disclosure the viewer was shown (only allowed while the business is collecting consent); withdraw unsubscribes. Recorded as an immutable ledger event with source = participant.

Public because the marketing opt-in on a registration form is now written separately from the order: checkout takes no emailMarketingConsent, so the embed's booking sheet grants it here once the booking lands.

Arguments (2)
setMySmsReminderConsentSetMySmsReminderConsentResult!

Agree to, or stop, a business texting the viewer session reminders — the "Text me reminders" box at checkout, written once the booking lands, the way setMyEmailMarketingConsent is. phone (as typed) sets the number first; it is saved to the account too when the account has none. A grant freezes the disclosure the viewer was shown into the consent ledger. Refused for a grant with no number.

Arguments (3)
businessEntityRef!
phoneString
consentBoolean!