# Public API

Section: API
Page: https://docs.konecto.ltd/api/public

Browser-safe endpoints for event data, availability, checkout and attendee sign-in.

Called with a publishable key from an allowed origin.

| Method | Path | Returns |
| --- | --- | --- |
| GET | /public/events/{slug} | Published event, venue, dates, page settings |
| GET | /public/events/{slug}/sessions | Agenda |
| GET | /public/events/{slug}/speakers | Speakers |
| GET | /public/events/{slug}/sponsors | Sponsors and tiers |
| GET | /public/events/{slug}/ticket-types | Ticket types with live availability |
| POST | /public/checkout/sessions | A Konecto checkout URL |
| GET | /public/checkout/sessions/{id} | Checkout status and tickets once paid |
| POST | /public/interactions | Batched page-view and sponsor interaction events |

## Create a checkout session
``bash
curl https://api.konecto.ltd/v1/public/checkout/sessions \
  -H "Authorization: Bearer pk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "event": "acme-summit",
    "items": [{ "ticket_type": "standard", "quantity": 2 }],
    "promo_code": "EARLY",
    "success_url": "https://acmesummit.com/thanks",
    "cancel_url": "https://acmesummit.com/tickets"
  }'
`
`json
{ "id": "cs_4Rt...", "url": "https://checkout.konecto.ltd/cs_4Rt..." }
``

Prices, capacity and promo codes are always checked on the server. The client only asks for a checkout.
