> ## Documentation Index
> Fetch the complete documentation index at: https://docs.laces.run/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Laces is event registration software for every kind of event, not only races. Use the event's own wording.
> There is one environment, production: payments made through the API are real. Money is integer minor units; read the event's currency.
> Collecting payments with no Laces event uses POST /payments, then POST /orders/{orderId}/pay: start at /guides/collect-payments. Never call pay to test: there is no sandbox.
> Never put a client secret in browser code or an LLM chat. Branch on error_code, not on message.
> Overview of Laces: https://laces.run/llms.txt

# Create a draft event with the Laces API

> POST /events: create a Laces event as a draft from your server. Needs the events:write scope and an Idempotency-Key. Paid tickets are added separately.



## OpenAPI

````yaml api-reference/v1/openapi.json POST /events
openapi: 3.1.0
info:
  title: Laces Partner API
  version: 1.0.0
  summary: >-
    Sell tickets, or collect payments for anything you sell, from your own
    website.
  description: >-
    The Laces Partner API, served at `https://connect.laces.run/v1`. Every path
    is relative to that server URL, which already ends in `/v1`.


    Authenticate with a **bearer token** from `POST /oauth/token` (server side)
    or, on the routes that allow it, a **publishable key** in
    `X-Laces-Publishable-Key` (browser side, from an allowed domain). Keys are
    uppercase and case-sensitive: send them exactly as issued.


    There is one environment, production. Payments made through the API are
    real.


    Money is integer minor units. Every route except the token endpoint answers
    in the Laces envelope `{ code, message, data | error, error_code }`; branch
    on `error_code`, never on `message` or `error`.


    Every response carries an `X-Request-Id` header (`req_…`). Quote it to
    support@laces.run when something goes wrong. Browsers can read
    `X-Request-Id` and `Retry-After` (both are CORS-exposed). Rate-limited
    routes also send the standard `RateLimit-Limit`, `RateLimit-Remaining` and
    `RateLimit-Reset` headers.


    Partner credentials are accepted on this host only. Sent to `api.laces.run`
    (the Laces app's own API), any partner credential is refused with `401
    partner_credential_not_accepted`.
  contact:
    name: Laces support
    email: support@laces.run
    url: https://docs.laces.run
  license:
    name: Proprietary
    identifier: LicenseRef-Proprietary
servers:
  - url: https://connect.laces.run/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Authentication
    description: OAuth 2.0 client credentials.
  - name: Events
    description: >-
      Your organization's events that are on sale, and, with `events:write`,
      creating and publishing them.
  - name: Checkout sessions
    description: 'Laces-hosted checkout: redirect or embedded.'
  - name: Payments
    description: >-
      Collect payments on your own site, with no Laces event. Paid and read as
      orders.
  - name: Orders
    description: Create, pay and read orders from your own UI.
  - name: Webhook events
    description: Requests Laces sends to your webhook endpoint.
  - name: Health
    description: Liveness probe.
paths:
  /events:
    post:
      tags:
        - Events
      summary: Create an event
      description: >-
        Creates an event as a **draft** in your organization. Add [paid ticket
        types](/api-reference/v1/events/create-ticket-type), then [publish
        it](/api-reference/v1/events/publish). Read the
        [guide](/guides/create-events) first: there is no sandbox, so use
        `visibility: "unlisted"` for tests.


        Bearer token only, scope `events:write` (off by default; a publishable
        key is `403 credential_not_permitted`). `Idempotency-Key` is required. A
        retry with the same key and body returns `200` "Already created
        (idempotent replay)"; the same key with another body is `422
        idempotency_key_reuse`. If a create times out for more than 2 minutes,
        check your organization's drafts in the Laces app before retrying: the
        API cannot find a lost draft in v1 (list never returns drafts and has no
        `partner_reference` filter).


        Limits: 20 API-created events per organization per UTC day (`429
        event_limit_reached`, `Retry-After` is the seconds until 00:00 UTC) and
        25 unpublished drafts per API client (`409 draft_limit_reached`).
      operationId: createEvent
      parameters:
        - name: Idempotency-Key
          in: header
          required: true
          description: >-
            1 to 255 visible ASCII characters (a UUID is ideal), reused on every
            retry of the same action. Scoped to your API client and this route.
            Missing is `400 idempotency_key_required`; any other bad value is
            `400 invalid_idempotency_key`.
          schema:
            type: string
            minLength: 1
            maxLength: 255
          example: 6f1c3c9e-2f4b-4c64-9a2f-0d1c5a8b7e11
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateEventRequest'
            example:
              name: Saturday Park Run
              timezone: Africa/Kampala
              starts_at: '2027-03-27T07:00:00'
              ends_at: '2027-03-27T10:00:00'
              venue: Kololo Airstrip
              visibility: unlisted
              partner_reference: run-2027-03-27
      responses:
        '200':
          description: >-
            Already created (idempotent replay): the stored response of the
            first call.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                    description: HTTP status, repeated in the body.
                  message:
                    type: string
                    examples:
                      - Already created (idempotent replay)
                  data:
                    $ref: '#/components/schemas/EventDetail'
        '201':
          description: The event, as a draft with no ticket types.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                    description: HTTP status, repeated in the body.
                  message:
                    type: string
                    examples:
                      - Event created as a draft
                  data:
                    $ref: '#/components/schemas/EventDetail'
              example:
                code: 201
                message: Event created as a draft
                data:
                  event_id: q3Zk9mVx
                  name: Saturday Park Run
                  handle: saturday-park-run
                  short_code: SPR
                  description: ''
                  cover: https://cdn.example.org/saturday-park-run.jpg
                  event_type: running
                  status: draft
                  visibility: unlisted
                  starts_at: '2027-03-27T04:00:00.000Z'
                  ends_at: '2027-03-27T07:00:00.000Z'
                  timezone: Africa/Kampala
                  currency: UGX
                  reg_closes_at: '2027-03-27T04:00:00.000Z'
                  payments_enabled: true
                  venue: Kololo Airstrip
                  organizer_name: Kampala Road Runners
                  payment_methods:
                    - momo
                    - airtel
                    - card
                  ticket_types: []
                  additional_questions: []
                  waiver_required: false
                  waiver_version: ''
                  registration_url: null
                  registration_mode: laces
                  created_via_api: true
                  partner_reference: run-2027-03-27
        '400':
          description: >-
            The request was refused before anything was created. A `400` does
            not use up the `Idempotency-Key`. Codes: `unknown_field`,
            `validation_failed`, `invalid_timezone`, `invalid_starts_at`,
            `invalid_ends_at`, `invalid_event_type`, `invalid_visibility`,
            `invalid_cover_url`, `invalid_registration_url`,
            `invalid_partner_reference`, `idempotency_key_required`,
            `invalid_idempotency_key`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                unknown_field:
                  summary: unknown_field
                  value:
                    code: 400
                    message: Bad request
                    error: 'Unknown field: status'
                    error_code: unknown_field
                    error_details:
                      field: status
                validation_failed:
                  summary: validation_failed
                  value:
                    code: 400
                    message: Bad request
                    error: name must be a string
                    error_code: validation_failed
                    error_details:
                      field: name
                invalid_timezone:
                  summary: invalid_timezone
                  value:
                    code: 400
                    message: Bad request
                    error: timezone must be an IANA zone name such as Africa/Kampala
                    error_code: invalid_timezone
                    error_details:
                      field: timezone
                invalid_starts_at:
                  summary: invalid_starts_at
                  value:
                    code: 400
                    message: Bad request
                    error: >-
                      starts_at must be an ISO 8601 string between 5 minutes ago
                      and 3 years ahead
                    error_code: invalid_starts_at
                    error_details:
                      field: starts_at
                invalid_ends_at:
                  summary: invalid_ends_at
                  value:
                    code: 400
                    message: Bad request
                    error: >-
                      ends_at must not be before starts_at or more than 31 days
                      after it
                    error_code: invalid_ends_at
                    error_details:
                      field: ends_at
                invalid_registration_url:
                  summary: invalid_registration_url
                  value:
                    code: 400
                    message: Bad request
                    error: >-
                      registration_url must be an https URL whose origin is
                      listed in this key's registration domains
                    error_code: invalid_registration_url
                    error_details:
                      field: registration_url
                invalid_event_type:
                  summary: invalid_event_type
                  value:
                    code: 400
                    message: Bad request
                    error: event_type must be an existing event type id
                    error_code: invalid_event_type
                    error_details:
                      field: event_type
                invalid_visibility:
                  summary: invalid_visibility
                  value:
                    code: 400
                    message: Bad request
                    error: visibility must be public or unlisted
                    error_code: invalid_visibility
                    error_details:
                      field: visibility
                invalid_cover_url:
                  summary: invalid_cover_url
                  value:
                    code: 400
                    message: Bad request
                    error: >-
                      cover_url must be a clean https image link that is not a
                      shortener or shared host
                    error_code: invalid_cover_url
                    error_details:
                      field: cover_url
                invalid_partner_reference:
                  summary: invalid_partner_reference
                  value:
                    code: 400
                    message: Bad request
                    error: >-
                      partner_reference must be a string of at most 128
                      characters
                    error_code: invalid_partner_reference
                    error_details:
                      field: partner_reference
                invalid_idempotency_key:
                  summary: invalid_idempotency_key
                  value:
                    code: 400
                    message: invalid_idempotency_key
                    error: Idempotency-Key must be 1 to 255 visible ASCII characters
                    error_code: invalid_idempotency_key
                idempotency_key_required:
                  summary: idempotency_key_required
                  value:
                    code: 400
                    message: idempotency_key_required
                    error: Idempotency-Key header is required
                    error_code: idempotency_key_required
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: A draft limit or an in-flight key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                draft_limit_reached:
                  summary: draft_limit_reached
                  value:
                    code: 409
                    message: Conflict
                    error: This API key already has 25 unpublished draft events
                    error_code: draft_limit_reached
                idempotency_in_progress:
                  summary: idempotency_in_progress
                  value:
                    code: 409
                    message: Conflict
                    error: >-
                      A request with this Idempotency-Key is still being
                      processed
                    error_code: idempotency_in_progress
        '422':
          description: The key was already used with a different body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                idempotency_key_reuse:
                  summary: idempotency_key_reuse
                  value:
                    code: 422
                    message: Unprocessable
                    error: Idempotency-Key reused with different parameters
                    error_code: idempotency_key_reuse
        '429':
          description: >-
            Rate limited (`rate_limited`), or the daily event limit
            (`event_limit_reached`). Wait `Retry-After` seconds.
          headers:
            Retry-After:
              $ref: '#/components/headers/Retry-After'
            X-Request-Id:
              $ref: '#/components/headers/X-Request-Id'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                rate_limited:
                  summary: rate_limited
                  value:
                    code: 429
                    message: Too many requests, please slow down
                    error: rate_limited
                    error_code: rate_limited
                event_limit_reached:
                  summary: event_limit_reached
                  value:
                    code: 429
                    message: Too many requests
                    error: The daily limit of 20 API-created events was reached
                    error_code: event_limit_reached
        '500':
          $ref: '#/components/responses/ServerError'
      security:
        - bearerAuth: []
        - oauth2:
            - events:write
components:
  schemas:
    CreateEventRequest:
      type: object
      description: >-
        A flat body: every field is a top-level string or null. An unknown key
        is `400 unknown_field`; a wrong type is `400 validation_failed`; both
        name the field in `error_details.field`. Laces sets the status (draft),
        the currency (your organization's), the handle and the registration
        close time (the start).
      required:
        - name
        - timezone
        - starts_at
        - ends_at
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 200
          examples:
            - Saturday Park Run
        timezone:
          type: string
          description: >-
            An IANA zone name. Abbreviations and bare offsets are `400
            invalid_timezone`. No default.
          examples:
            - Africa/Kampala
        starts_at:
          type: string
          description: >-
            ISO 8601 string. With an offset or `Z` it is that instant; without,
            it is wall-clock time in `timezone`. At most 5 minutes in the past
            and 3 years ahead (`400 invalid_starts_at`). Numbers are refused.
          examples:
            - '2027-03-27T07:00:00'
        ends_at:
          type: string
          description: >-
            Same format. Not before `starts_at`, at most 31 days after it (`400
            invalid_ends_at`).
          examples:
            - '2027-03-27T10:00:00'
        venue:
          type: string
          maxLength: 300
          description: Blank counts as not sent.
        description:
          type: string
          maxLength: 10000
        event_type:
          type: string
          description: >-
            An event type id. Default `running`. Unknown is `400
            invalid_event_type`.
        visibility:
          type: string
          enum:
            - public
            - unlisted
          description: >-
            Default `public`. Use `unlisted` for tests. Anything else is `400
            invalid_visibility`.
        cover_url:
          type: string
          maxLength: 2048
          format: uri
          description: >-
            An `https` image link. Laces does not copy or host it. A stable URL
            you control, about 1600x900 landscape, JPEG, PNG or WebP; a new
            image needs a new URL. Shorteners and shared hosts are `400
            invalid_cover_url`.
        waiver_text:
          type: string
          maxLength: 20000
          description: Any text turns the waiver on.
        registration_url:
          type:
            - string
            - 'null'
          maxLength: 2048
          format: uri
          description: >-
            `https`, and its origin must be one of this key's registration
            domains (`400 invalid_registration_url`). `null` or omitted means
            Laces registration.
        partner_reference:
          type: string
          maxLength: 128
          description: >-
            Your own id for the event, up to 128 characters (longer is `400
            invalid_partner_reference`). Returned to the key that created it. It
            cannot be used to find an event: the API has no lookup by
            `partner_reference` and never lists drafts.
    EventDetail:
      allOf:
        - $ref: '#/components/schemas/EventSummary'
        - type: object
          properties:
            organizer_name:
              type: string
              examples:
                - Kampala Road Runners
            support_email:
              type: string
              description: Omitted when the organization has none.
              format: email
            payment_methods:
              type: array
              items:
                type: string
                enum:
                  - momo
                  - card
                  - airtel
              description: >-
                The payment methods you can sell for this event right now. For
                example `["momo", "airtel", "card"]`: MTN Mobile Money, Airtel
                Money and card. Card appears only when it is offered for the
                event; an event in a card-only region (US, UK, EU) lists only
                `card`. Offer only these methods: at order creation, card where
                it is not offered is `400 rail_unavailable`, and mobile money
                for a card-only event is `422 no_rate_for_method`.
              examples:
                - - momo
                  - airtel
            ticket_types:
              type: array
              items:
                $ref: '#/components/schemas/TicketType'
            additional_questions:
              type: array
              items:
                $ref: '#/components/schemas/AdditionalQuestion'
            waiver_required:
              type: boolean
              description: >-
                When true, collect the participant's agreement and send
                `waiver_accepted: true` and `waiver_version` on order creation.
            waiver_version:
              type:
                - string
                - 'null'
              examples:
                - '2026-09-01'
          required:
            - organizer_name
            - payment_methods
            - ticket_types
            - additional_questions
            - waiver_required
    Error:
      type: object
      properties:
        code:
          type: integer
          description: HTTP status, repeated in the body.
        message:
          type: string
          description: Short outcome. Do not branch on it; it may be reworded.
        error:
          type: string
          description: Human-readable detail. May be reworded; never parse it.
        error_code:
          type: string
          description: >-
            Stable machine-readable code. **Branch on this.** Present on every
            Partner API error, including `429 rate_limited`, `404 not_found` for
            unknown routes and `500 server_error`. See the [error
            reference](/concepts/errors).
        details:
          type: object
          properties:
            retry_after_seconds:
              type: integer
            masked_msisdn:
              type: string
              description: >-
                `charge_pending_same_number` only: the number, masked to its
                last digits.
            network:
              type: string
              description: '`charge_pending_same_number` only, when known.'
          description: >-
            Only on `409 prompt_in_progress`, `409 charge_pending_same_number`
            and `429 payer_prompt_limit`.
        request_id:
          type: string
          description: >-
            On `500 server_error` only: the same id as the `X-Request-Id`
            header. A 500 carries a generic `error` message, never the
            underlying cause, so quote this id to support.
        error_details:
          type: object
          additionalProperties:
            type: string
          description: >-
            Extra detail on some refusals, as string values: `field` names the
            offending body field on `unknown_field`, `validation_failed` and the
            `invalid_*` codes; `price_below_minimum` carries
            `minimum_price_minor` and `currency`; `registration_external`
            carries `registration_url`.
      required:
        - code
        - message
        - error
        - error_code
      description: The Laces error envelope.
    EventSummary:
      type: object
      properties:
        event_id:
          type: string
          examples:
            - q3Zk9mVx
        name:
          type: string
          examples:
            - Kampala City 10K
        handle:
          type: string
          examples:
            - kampala-city-10k
        short_code:
          type: string
          examples:
            - K10
        description:
          type: string
        cover:
          type: string
          description: Cover image URL.
          format: uri
        venue:
          type: string
          description: Omitted when not set.
        event_type:
          type: string
          examples:
            - run
        status:
          type: string
          enum:
            - draft
            - scheduled
            - open
          description: >-
            `draft` appears only for an event your key created, before you
            publish it.
        visibility:
          type: string
          description: Unlisted events are included on purpose.
          enum:
            - public
            - unlisted
        starts_at:
          type: string
          format: date-time
        ends_at:
          type: string
          format: date-time
        timezone:
          type: string
          examples:
            - Africa/Kampala
        currency:
          type: string
          examples:
            - UGX
        reg_opens_at:
          type: string
          description: Omitted when not set.
          format: date-time
        reg_closes_at:
          type: string
          description: Omitted when not set.
          format: date-time
        payments_enabled:
          type: boolean
          description: >-
            Organization-level. `false` means your organization is not yet
            cleared to take payments: the event stays readable, but orders and
            checkout sessions are refused with `403 payments_disabled`.
        registration_url:
          type:
            - string
            - 'null'
          format: uri
          description: >-
            Where buyers register, when the event registers on the partner's own
            site. `null` means Laces registration.
        registration_mode:
          type: string
          enum:
            - laces
            - external
          description: >-
            `external` when `registration_url` is set. Anonymous Laces checkout
            for an `external` event is refused with `409 registration_external`.
        created_via_api:
          type: boolean
          description: '`true` when the event was created through the Partner API.'
        partner_reference:
          type: string
          description: >-
            Your reference from `POST /events`. Returned only to the API client
            that created the event, on a bearer token.
      required:
        - event_id
        - name
        - handle
        - short_code
        - description
        - cover
        - event_type
        - status
        - visibility
        - starts_at
        - ends_at
        - timezone
        - currency
        - payments_enabled
        - registration_url
        - registration_mode
        - created_via_api
    TicketType:
      type: object
      properties:
        ticket_type_id:
          type: string
          examples:
            - tt_10k
        name:
          type: string
          examples:
            - 10K
        description:
          type: string
        currency:
          type: string
          examples:
            - UGX
        price_minor:
          type: integer
          description: The organizer's price, minor units.
        laces_fee_minor:
          type:
            - integer
            - 'null'
          description: >-
            Laces fee by MTN mobile money (`momo`, the default method). `null` =
            could not be priced; treat the ticket as unavailable.
        total_minor:
          type:
            - integer
            - 'null'
          description: >-
            What the participant pays by mobile money: `price_minor +
            laces_fee_minor`.
        card:
          oneOf:
            - type: object
              properties:
                laces_fee_minor:
                  type: integer
                total_minor:
                  type: integer
              required:
                - laces_fee_minor
                - total_minor
            - type: 'null'
          description: >-
            Card fee and total for one ticket bought on its own. `null` when
            card isn't offered for the event. When it is, `card` is listed in
            the event's `payment_methods` and this holds the card quote.
        airtel:
          oneOf:
            - type: object
              properties:
                laces_fee_minor:
                  type: integer
                total_minor:
                  type: integer
              required:
                - laces_fee_minor
                - total_minor
            - type: 'null'
          description: >-
            Fee and total for this payment method, for one ticket bought on its
            own. `null` if it could not be priced.
        is_free:
          type: boolean
          description: >-
            `price_minor` is 0. A free order needs no payment and no phone
            number.
        capacity:
          type: integer
        distance_km:
          type: number
          description: Omitted when not set.
        remaining:
          type: integer
          description: Present only when the organizer shows remaining places.
        sales_start:
          type: string
          format: date-time
        sales_end:
          type: string
          format: date-time
        min_age:
          type: integer
        max_age:
          type: integer
      required:
        - ticket_type_id
        - name
        - description
        - currency
        - price_minor
        - laces_fee_minor
        - total_minor
        - card
        - airtel
        - is_free
        - capacity
      description: A ticket type with server-computed fees. Never calculate fees yourself.
    AdditionalQuestion:
      type: object
      properties:
        key:
          type: string
          examples:
            - kit_size
        label:
          type: string
          examples:
            - T-shirt size
        type:
          type: string
          enum:
            - text
            - select
        required:
          type: boolean
        options:
          type: array
          items:
            type: string
        help:
          type: string
      required:
        - key
        - label
        - type
        - required
        - options
        - help
      description: An order-level question. Send answers in `custom_fields` keyed by `key`.
  headers:
    X-Request-Id:
      description: >-
        Unique id of this request (`req_…`). On every response, readable from
        browsers. Quote it to support.
      schema:
        type: string
      example: req_V1StGXR8Z5jdHi6BmyTq
    Retry-After:
      description: Whole seconds to wait before retrying. Readable from browsers.
      schema:
        type: integer
  responses:
    Unauthorized:
      description: >-
        No credential, an invalid or expired token, or an invalid publishable
        key. Comes with `WWW-Authenticate: Bearer realm="laces-partner"`.
        Revoking or regenerating keys can take up to a minute to reach every
        server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            unauthorized:
              summary: unauthorized
              value:
                code: 401
                message: Unauthorized
                error: Missing credentials
                error_code: unauthorized
            invalid_token:
              summary: invalid_token
              value:
                code: 401
                message: Unauthorized
                error: Invalid or expired access token
                error_code: invalid_token
            invalid_key:
              summary: invalid_key
              value:
                code: 401
                message: Unauthorized
                error: Invalid publishable key
                error_code: invalid_key
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    Forbidden:
      description: >-
        The credential is not allowed here: a missing scope (scope changes take
        up to about a minute to apply), a publishable key on a bearer-only
        route, or a publishable key from an origin that is not an allowed
        domain.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            insufficient_scope:
              summary: insufficient_scope
              value:
                code: 403
                message: Forbidden
                error: 'Missing scope: orders:read'
                error_code: insufficient_scope
            credential_not_permitted:
              summary: credential_not_permitted
              value:
                code: 403
                message: Forbidden
                error: This endpoint does not accept a publishable key
                error_code: credential_not_permitted
            origin_not_allowed:
              summary: origin_not_allowed
              value:
                code: 403
                message: Forbidden
                error: This origin is not allowed for this key
                error_code: origin_not_allowed
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    NotFound:
      description: >-
        Not found, or it belongs to another organization (the same answer, so
        existence never leaks).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            not_found:
              summary: not_found
              value:
                code: 404
                message: Not found
                error: Event not found
                error_code: not_found
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
    ServerError:
      description: >-
        Unexpected failure. Retry with backoff, reusing the same
        `Idempotency-Key`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          examples:
            server_error:
              summary: server_error
              value:
                code: 500
                message: An unexpected error occurred
                error: Something went wrong
                error_code: server_error
      headers:
        X-Request-Id:
          $ref: '#/components/headers/X-Request-Id'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: LCSTOK-…-X (opaque)
      description: >-
        A token from `POST /oauth/token`, valid 1 hour. Paste it as `LCSTOK-…-X`
        (without the word Bearer).
    oauth2:
      type: oauth2
      description: >-
        OAuth 2.0 client credentials. The token it yields is the `bearerAuth`
        token.
      flows:
        clientCredentials:
          tokenUrl: https://connect.laces.run/v1/oauth/token
          scopes:
            events:read: List and read events
            orders:write: Create and pay orders
            orders:read: >-
              List and read orders, including buyer personal data (off by
              default)
            checkout_sessions:write: Create and read checkout sessions
            events:write: >-
              Create, price and publish events, and set a registration URL (off
              by default)
            payments:write: >-
              Create and quote payments for sales on your own site (off by
              default; Laces must also turn payments on for the organization)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.