Skip to main content
POST
Create a class

Authorizations

Authorization
string
header
required

Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.

Headers

Idempotency-Key
string

Retry-safe key; a repeat of the same request replays the first response

Maximum string length: 255

Body

application/json
clubId
integer
required
name
string
required
Maximum string length: 100
startTime
string<date-time>
required

ISO 8601 instant with an explicit offset.

endTime
string<date-time>
required

ISO 8601 instant with an explicit offset.

areaId
integer | null
classTypeId
integer | null
instructorIds
integer[]
Maximum array length: 20
description
string | null
Maximum string length: 5000
priceBeforeTax
number

The price to store, excluding tax - the same field reads return. The tax-inclusive price a class reads back with is computed and cannot be written: sending it is a 400, because posting it back would re-apply tax on every round trip.

Required range: x >= 0
isFree
boolean
maxCapacity
integer | null
Required range: x >= 1
visibility
enum<string>
Available options:
Private,
Member_only,
Public
sport
string | null
Maximum string length: 60
color
string
Pattern: ^#[0-9a-fA-F]{6}$

Response

Class created

One class occurrence. A weekly class materializes a row per session, linked by recurrenceId and occurrenceIndex, so id is what a booking's classId points at - and what distinguishes two groups running in the same hour. Read the roster with GET /v1/platform/classes/{id}/bookings.

id
integer
name
string
slug
string | null
description
string | null
images
string[]
classTypeId
integer | null
classType
object | null
clubId
integer
club
object | null
areaId
integer | null

Room or court the class occupies, when one is assigned.

area
object | null
startTime
string<date-time>
endTime
string<date-time>
durationMinutes
integer
isMultiDay
boolean
status
enum<string>

A cancelled occurrence keeps its bookings and roster.

Available options:
active,
cancelled
visibility
enum<string>
Available options:
Public,
Member_only,
Private
sport
string | null
color
string | null
price
number<float> | null

Price including the organization's default tax - what a member is charged.

priceBeforeTax
number<float> | null

The price as stored on the class, before tax.

isFree
boolean
maxCapacity
integer | null

Seats; null when uncapped.

maxPartySize
integer

Largest party one booking may bring, from the class type.

bookedCount
integer

Seats taken: attendee bookings plus standalone walk-in check-ins.

currentBookings
integer

Legacy alias of bookedCount.

spotsLeft
integer | null

maxCapacity - bookedCount, floored at 0; null when capacity is unlimited.

waitlistCount
integer

Entries waiting (pending or notified).

allowWaitlist
boolean
timeStatus
enum<string>
Available options:
past,
upcoming
availabilityStatus
enum<string>
Available options:
available,
full
recurrenceId
integer | null

The series this occurrence belongs to; null for a one-off class.

occurrenceIndex
integer | null

Position within the series, as materialized.

recurrence
object | null

The series rule, when this occurrence belongs to one.

instructors
object[]

Who teaches the occurrence. The instructor's own weekly availability is not included; read it from GET /v1/platform/instructors.

externalSource
string | null

Import provenance - set when the occurrence came from an external system rather than being created in 1club.

externalId
string | null

The source system's id for this occurrence, for reconciliation against it.

createdAt
string<date-time>
updatedAt
string<date-time>
translations
object | null

Every locale's copy, keyed by language code (e.g. 'es', 'fr'). Returned alongside the locale-resolved name/description, so an integration syncing a multilingual timetable can read all of them in one call.