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

# Update an event

> Edits an event in any state. Send only what changes; an empty body is refused. Wall-clock times are read in the timezone of the club the event will belong to after the edit. A live event's change of time or areas takes effect on the schedule at once.

`tickets`, `instructorIds` and `areaIds` each **replace** the whole set when sent, so read the event first. Resend every ticket you keep with its `id`; a ticket without one is new, and an `id` the event does not have is refused (`EVENT_TICKET_NOT_ON_EVENT`). A ticket left out is retired: deactivated when it has bookings, so they keep it, deleted when it has none. Changing the title changes the slug, and with it `publicUrl`.




## OpenAPI

````yaml /openapi-platform.json patch /v1/platform/events/{id}
openapi: 3.0.0
info:
  title: 1club Platform API
  version: 1.0.0
  description: >-
    The 1club Platform API lets you programmatically access and manage your
    organization's data.


    ## Official API Contract


    This documentation is the official source of truth for the 1club Platform
    API.

    If an integration relies on undocumented endpoints, fields, response shapes,
    or internal behavior outside this spec, we can't guarantee backward
    compatibility.

    Build against what's documented here to stay stable as the platform evolves.


    ## Authentication


    All requests require a customer API key passed as a Bearer token:


    ```

    Authorization: Bearer 1club_sk_live_...

    ```


    Generate API keys from the admin portal under **Settings > API Tokens**.

    The key is tied to your organization - all responses are scoped to your
    org's data.


    Agents and MCP connectors can instead send an OAuth access token (the
    `platformOAuth` scheme), requesting only the scopes the task needs.


    ## Rate Limiting


    - **100 requests per minute** per API key

    - When exceeded, the API returns `429 Too Many Requests` with a
    `Retry-After` header

    - Rate limit headers are included in every response:
      - `X-RateLimit-Limit` - max requests per window
      - `X-RateLimit-Remaining` - requests remaining
      - `X-RateLimit-Reset` - seconds until the window resets

    ## Errors


    | Status | Meaning |

    |--------|---------|

    | `400` | Invalid request parameters |

    | `401` | Missing or invalid API key |

    | `404` | Resource not found (or doesn't belong to your organization) |

    | `429` | Rate limit exceeded |

    | `500` | Internal server error |


    ## Versioning and deprecation


    The API is versioned in the path (`/v1`). Changes within a version are
    additive: new endpoints, new optional parameters and new response fields can
    appear at any time, so clients should ignore fields they do not recognise.

    A breaking change ships as a new version.

    An operation due to be removed is first marked `deprecated: true` in this
    spec and announced in the changelog at https://docs.1club.ai/changelog, with
    advance notice before it is withdrawn.
  contact:
    name: 1club API Support
    email: support@1club.ai
servers:
  - url: https://api.1club.ai
    description: Production API
security:
  - customerApiAuth: []
  - platformOAuth: []
tags: []
paths:
  /v1/platform/events/{id}:
    patch:
      tags:
        - Events
      summary: Update an event
      description: >
        Edits an event in any state. Send only what changes; an empty body is
        refused. Wall-clock times are read in the timezone of the club the event
        will belong to after the edit. A live event's change of time or areas
        takes effect on the schedule at once.


        `tickets`, `instructorIds` and `areaIds` each **replace** the whole set
        when sent, so read the event first. Resend every ticket you keep with
        its `id`; a ticket without one is new, and an `id` the event does not
        have is refused (`EVENT_TICKET_NOT_ON_EVENT`). A ticket left out is
        retired: deactivated when it has bookings, so they keep it, deleted when
        it has none. Changing the title changes the slug, and with it
        `publicUrl`.
      operationId: updateEvent
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: integer
          description: 1club event id
        - in: header
          name: Idempotency-Key
          schema:
            type: string
            maxLength: 255
          description: >-
            Retry-safe key; a repeat of the same request replays the first
            response
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlatformEventUpdate'
      responses:
        '200':
          description: The updated event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformEvent'
        '400':
          $ref: '#/components/responses/PlatformBadRequest'
        '401':
          $ref: '#/components/responses/PlatformUnauthorized'
        '403':
          description: API key is missing the required `events:write` scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlatformError'
        '404':
          $ref: '#/components/responses/PlatformNotFound'
        '409':
          $ref: '#/components/responses/PlatformConflict'
        '429':
          $ref: '#/components/responses/PlatformRateLimited'
      security:
        - customerApiAuth: []
components:
  schemas:
    PlatformEventUpdate:
      type: object
      description: >-
        Fields accepted when updating an event. Send only what changes. Unknown
        fields are refused.
      minProperties: 1
      additionalProperties: false
      properties:
        title:
          type: string
          minLength: 1
          maxLength: 200
          description: Changing it changes the slug, and with it the public URL.
        summary:
          type: string
          nullable: true
          maxLength: 500
          description: Plain-text teaser shown on cards and in notifications.
        description:
          nullable: true
          description: >-
            Plain text (a blank line starts a new paragraph) or an Editor.js
            document. null clears it.
          oneOf:
            - type: string
              maxLength: 20000
            - type: object
              description: 'An Editor.js document: { blocks: [{ type, data }] }.'
              required:
                - blocks
              properties:
                time:
                  type: number
                blocks:
                  type: array
                  items:
                    type: object
                    required:
                      - type
                      - data
                    properties:
                      id:
                        type: string
                      type:
                        type: string
                        example: paragraph
                      data:
                        type: object
                      tunes:
                        type: object
                version:
                  type: string
        coverImage:
          type: string
          format: uri
          nullable: true
          description: Image URL, e.g. from the media library.
        location:
          type: string
          nullable: true
          maxLength: 300
          description: Free text; the event may take place away from any club.
        clubId:
          type: integer
          nullable: true
          description: >-
            The club it belongs to; null for an organization-wide or off-site
            event. Decides the timezone wall-clock times are read in, and on
            create must still be taking events.
        startTime:
          type: string
          description: >-
            Start. With an offset or Z it is an exact instant; without one
            (2026-06-01T18:00:00) it is the wall clock at the event's club, in
            the club's timezone - or the organization's when the event names no
            club.
          example: '2026-06-01T18:00:00'
        endTime:
          type: string
          description: >-
            End, after the start. With an offset or Z it is an exact instant;
            without one (2026-06-01T18:00:00) it is the wall clock at the
            event's club, in the club's timezone - or the organization's when
            the event names no club.
          example: '2026-06-01T18:00:00'
        visibility:
          type: string
          enum:
            - Public
            - Member_only
            - Private
          description: >-
            Who sees it once live: anyone, signed-in members only, or nobody
            (reachable by staff only). Defaults to Public.
        featured:
          type: boolean
          description: Promote it on the website and portal.
        bookable:
          type: boolean
          description: >-
            Whether places can be booked. An event with tickets always is, and a
            bookable event must have at least one ticket.
        paymentCollection:
          type: string
          enum:
            - online
            - on_arrival
            - member_choice
          description: >-
            How paid tickets are paid: online at booking, at the desk on
            arrival, or the buyer chooses. Free tickets never charge.
        sports:
          type: array
          items:
            type: string
          description: Sport ids, e.g. padel, tennis.
        translations:
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          description: >-
            Per-locale wording, as { "es": { "title": "...", "summary": "..." }
            }. Replaces the whole map when sent; null clears it.
        instructorIds:
          type: array
          items:
            type: integer
          description: >-
            Coaches running it. Each must belong to the organization. Replaces
            the whole list when sent.
        areaIds:
          type: array
          items:
            type: integer
          description: >-
            Areas (courts, rooms) it occupies for its whole window while live.
            Each must belong to the organization. Replaces the whole list when
            sent.
        tickets:
          type: array
          maxItems: 50
          items:
            $ref: '#/components/schemas/PlatformEventTicketWrite'
          description: >-
            Every ticket the event should sell. Replaces the set: resend each
            ticket you keep with its id; one without an id is new; one left out
            is retired (deactivated if it has bookings, deleted if not).
        notifyStaff:
          type: boolean
          description: >-
            Email admins and managers when a booking for this event is
            confirmed.
    PlatformEvent:
      type: object
      description: >-
        A one-off occasion a club puts on, sold through tickets. Counts only:
        who booked is not part of an event.
      properties:
        id:
          type: integer
        slug:
          type: string
          description: The last part of the public URL; follows the title.
        title:
          type: string
        summary:
          type: string
          nullable: true
        description:
          type: object
          description: 'An Editor.js document: { blocks: [{ type, data }] }.'
          required:
            - blocks
          properties:
            time:
              type: number
            blocks:
              type: array
              items:
                type: object
                required:
                  - type
                  - data
                properties:
                  id:
                    type: string
                  type:
                    type: string
                    example: paragraph
                  data:
                    type: object
                  tunes:
                    type: object
            version:
              type: string
          nullable: true
        descriptionText:
          type: string
          nullable: true
          description: '`description` as plain text.'
        coverImage:
          type: string
          nullable: true
        location:
          type: string
          nullable: true
        clubId:
          type: integer
          nullable: true
        club:
          type: object
          nullable: true
          properties:
            id:
              type: integer
            name:
              type: string
        startTime:
          type: string
          format: date-time
        endTime:
          type: string
          format: date-time
        status:
          type: string
          enum:
            - draft
            - live
            - cancelled
          description: >-
            draft: members see nothing. live: published. cancelled: called off,
            its bookings cancelled.
        visibility:
          type: string
          enum:
            - Public
            - Member_only
            - Private
        featured:
          type: boolean
        bookable:
          type: boolean
        paymentCollection:
          type: string
          enum:
            - online
            - on_arrival
            - member_choice
        sports:
          type: array
          items:
            type: string
        notifyStaff:
          type: boolean
        translations:
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          description: >-
            Per-locale wording, as { "es": { "title": "..." } }. Replaces the
            whole map when sent.
        publishedAt:
          type: string
          format: date-time
          nullable: true
          description: When it was first published.
        publicUrl:
          type: string
          nullable: true
          description: >-
            The member-facing page. null unless the event is live, or when the
            organization publishes neither a website nor a member portal.
        instructors:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
                nullable: true
        areas:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
        tickets:
          type: array
          items:
            $ref: '#/components/schemas/PlatformEventTicket'
          description: Active tickets, in display order.
        bookedCount:
          type: integer
          description: Active bookings (confirmed, pending, checked in) across all tickets.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    PlatformError:
      type: object
      properties:
        error:
          type: string
        code:
          type: string
          description: >-
            A stable, machine-readable reason, when the error has one (e.g.
            `CONTACT_EXISTS`).
        details:
          type: object
          additionalProperties: true
          description: >-
            Structured values behind the error. A 409 naming an existing record
            carries its id here, e.g. `contactId`.
    PlatformEventTicketWrite:
      type: object
      required:
        - name
      additionalProperties: false
      properties:
        id:
          type: integer
          description: >-
            An existing ticket of this event, to keep and update it. Leave out
            for a new ticket.
        name:
          type: string
          minLength: 1
          maxLength: 200
        description:
          type: string
          nullable: true
          maxLength: 500
        price:
          type: number
          minimum: 0
          nullable: true
          description: Net price; 0 or omitted is free.
        capacity:
          type: integer
          minimum: 1
          nullable: true
          description: Places this ticket sells; omit for unlimited.
        revenueAccountId:
          type: integer
          nullable: true
          description: Must belong to the organization.
        sortOrder:
          type: integer
          description: Display order; defaults to the position in the list.
        translations:
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          description: >-
            Per-locale wording, as { "es": { "title": "..." } }. Replaces the
            whole map when sent.
    PlatformEventTicket:
      type: object
      description: A way in to an event, at a fixed price.
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
          nullable: true
        price:
          type: number
          description: Net price; 0 is free.
        capacity:
          type: integer
          nullable: true
          description: Places this ticket sells; null when unlimited.
        revenueAccountId:
          type: integer
          nullable: true
          description: Where its income is booked, from GET /v1/platform/revenue-accounts.
        sortOrder:
          type: integer
        translations:
          type: object
          nullable: true
          additionalProperties:
            type: object
            additionalProperties:
              type: string
          description: >-
            Per-locale wording, as { "es": { "title": "..." } }. Replaces the
            whole map when sent.
        soldCount:
          type: integer
          description: >-
            Active bookings holding this ticket. On a single-event read and on
            writes; not in the list.
  responses:
    PlatformBadRequest:
      description: Invalid request (bad parameters, or a body that fails validation)
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformUnauthorized:
      description: Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformNotFound:
      description: The requested resource does not exist in this organization
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformConflict:
      description: >-
        The request conflicts with existing state, or reuses an Idempotency-Key
        with a different body
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
    PlatformRateLimited:
      description: Rate limit exceeded
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PlatformError'
  securitySchemes:
    customerApiAuth:
      type: http
      scheme: bearer
      description: >-
        Organization-scoped bearer credential: a customer API key
        (1club_sk_live_...) or an MCP OAuth access token.
    platformOAuth:
      type: oauth2
      description: >-
        OAuth 2.1 authorization code flow with PKCE (S256), as used by MCP
        connectors. Register a client dynamically (RFC 7591) at
        https://api.1club.ai/v1/mcp/oauth/register. Each scope grants one
        capability; request only what the integration needs.
      flows:
        authorizationCode:
          authorizationUrl: https://auth.1club.ai/oauth/authorize
          tokenUrl: https://api.1club.ai/v1/mcp/oauth/token
          scopes:
            '*': >-
              Full access - read and manage everything in this organization,
              including capabilities added later
            classes:read: View classes, class types, schedules and progression tracks
            classes:write: >-
              Create, reschedule, and cancel classes, and maintain the class
              types they are run as
            checkins:read: View check-ins
            checkins:write: Check people in, to a booking or on their membership
            content:read: View published content
            content:write: >-
              Create, edit and delete content - posts, FAQs, documents and
              reusable blocks
            website:read: >-
              View your website: pages, sections, layout, styles and publish
              history
            website:write: >-
              Edit your website - pages, sections, navigation and styles. Edits
              stay unpublished until published.
            website:publish: >-
              Publish your website, making unpublished edits visible to the
              public, and roll back to an earlier version
            media:read: View your media library
            media:write: >-
              Add images and videos to your media library and edit their names
              and descriptions
            media:delete: Permanently delete files from your media library
            clubs:read: View club information
            clubs:write: >-
              Edit your clubs' details - name, contact details, address, opening
              hours, amenities and sports. Live on your website, member portal,
              app and 1club.me at once; a club listed on 1club.me sends its
              listing's changes for review.
            transactions:read: View transactions, revenue reports and your chart of accounts
            transactions:write: >-
              Record revenue collected outside 1club, such as a marketplace
              payout for your bookings, and refunds of it. Nothing is charged to
              anyone.
            invoices:read: >-
              View your invoices - who they were issued to, their amounts and
              status - and how much was invoiced over a period
            areas:read: View areas, area types, blocks and availability
            areas:write: >-
              Create and update areas and area types, and block or unblock an
              area
            bookings:read: View bookings
            bookings:write: >-
              Create, change, reschedule and cancel bookings, and add or remove
              participants
            contacts:read: >-
              View contacts, their tags and custom field values, and your sales
              pipeline stages and sources
            contacts:write: >-
              Create and update contacts and tag them, and maintain your tags,
              smart tag rules and contact custom fields
            contacts:delete: >-
              Archive contacts, which cancels their active memberships and all
              their future bookings. Separate from creating and updating because
              those cancellations are not undone by restoring the contact.
            instructors:read: View instructors and their availability
            instructors:write: >-
              Create and update instructors (coaches) and the instructor types
              they are grouped by, including what members pay for a one-to-one
              session and how you pay the coach. Does not grant admin-portal
              access: an instructor created this way has no login and is never
              invited to your staff portal.
            plans:read: View plans and pricing
            plans:write: Create, edit and delete plans and plan categories
            memberships:read: View memberships
            memberships:write: >-
              Sell memberships, set their price and whether they are paid, and
              pause, resume or cancel them
            products:read: >-
              View the product catalogue and its categories, including prices
              and how many are left to sell
            products:write: Create and edit products and product categories
            forms:read: >-
              View your forms and their questions, and how many people have
              completed each. Not the answers themselves.
            forms:write: >-
              Create and edit forms and their questions, including sign-up forms
              that sell your plans and products. Forms are public as soon as
              they are created or changed. Does not delete forms.
            organization:write: >-
              Change organization-wide settings, which take effect immediately.
              That includes which languages you offer, across your website, the
              member portal, the mobile app and email, and what your clubs call
              their booking cards (private training, group activities, areas)
              wherever members book.
            revenue-accounts:write: >-
              Add accounts to your chart of accounts and edit them, including
              which one sales post to by default. Reading the chart needs no
              scope of its own - any of plans, products or transactions admits
              it.
            pricing-rules:read: >-
              View pricing rules - the surcharges, discounts and set prices
              applied when a booking is priced - and quote what a booking would
              cost
            pricing-rules:write: >-
              Create, edit, turn off and delete pricing rules. Changes apply to
              every booking priced afterwards.
            booking-policies:read: >-
              View booking policies: cancellation and refund rules, payment
              timing and booking windows
            booking-policies:write: >-
              Create, edit, duplicate and delete booking policies. Changes apply
              to every booking they cover from then on.
            document-rules:read: >-
              View document rules - which members are asked to sign or accept
              which documents, such as waivers
            document-rules:write: >-
              Create, edit and delete document rules, which decide who must sign
              or accept a document and whether it is required for entry
            templates:read: View your email and SMS templates
            templates:write: Create, edit and delete email and SMS templates
            events:read: View events, their tickets and how many are sold
            events:write: >-
              Create, edit, duplicate and delete events, and publish, unpublish
              or cancel them. Cancelling an event also cancels its attendees'
              bookings.
            messages:read: >-
              View messages sent to and received from your members, and their
              delivery status
            messages:write: >-
              Prepare draft messages to members. Drafts are never sent from
              here: someone at your club reviews and sends them from 1club.
            analytics:read: >-
              View statistics over a period - revenue, bookings, check-ins, how
              full your classes, courts and coaches were, memberships added and
              cancelled, and new members - as totals, never the people or sales
              behind them
            payment-methods:write: >-
              Add, rename and remove the payment methods staff record by hand,
              such as cash or a bank transfer, and choose which ones members may
              pick when paying for a booking. Reading them needs no scope of its
              own - transactions:read admits it.
            staff:read: >-
              View your staff accounts, their roles, and what each role is
              allowed to do
            staff:write: >-
              Change a staff member's role, and what the manager, front desk and
              instructor roles are allowed to do. Only a signed-in person can
              use it, with the same limits as in 1club: an API key is always
              refused.
            notifications:read: >-
              View which notifications each role gets by default, and on which
              channels
            notifications:write: >-
              Change which notifications each role gets and on which channels,
              and apply those defaults to everyone in a role, replacing their
              own choices

````

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