Live API
The Live API: the customer-facing commerce surface behind the hosted box office and the embedded elements.
The Live API is Ticketlayer's customer-facing commerce API. It powers the Hosted Box
Office, embedded Elements, and any site selling tickets through the
@ticketlayer/live SDK.
It combines two things:
- Live-only endpoints -
/sessionand/queue- that exist only on this surface. - The sales surface - the
/sales/*endpoints (carts, checkout, customer tokens, my-orders, themes) mirrored from the Backstage API's low-trust sales surface.
Authentication#
The Live API is a low-trust surface authenticated with a channel publishable key
(tlpk_...), never a staff access token. The key names the channel, so nothing on a
request supplies one: GET /sales/listings is what that channel sells. Bootstrap a
session with createLiveSession. A customer
token, obtained by magic link and kept in the session, escalates that session to one
buyer; it is carried on top of the key and never authenticates a request by itself.
How sales work draws the sequence for each kind of buyer.
Versioning#
The Live API forwards the Backstage API's single dated-version timeline - see
API versions. Pin behaviour with the TL-Version header.
SDKs#
@ticketlayer/live- the JavaScript SDK most integrations use.
The code examples show both direct API calls and SDK methods.