Skip to main content
POST
Create a class type

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

Fields accepted when creating a class type. Only name is required; slug is derived from it when omitted, and suffixed if that is taken. The defaults shown are what an omitted field becomes, and unknown fields are rejected.

name
string
required
Maximum string length: 255
slug
string

Stable key. Derived from the name when omitted; send one only when something outside 1club already refers to it. An explicit slug that clashes is a 409, and a rename never moves it.

Maximum string length: 120
Pattern: ^[a-z0-9]+(-[a-z0-9]+)*$
description
string | null
Maximum string length: 2000
revenueAccountId
integer | null

Where a sale on this kind of class posts, from GET /v1/platform/revenue-accounts. Leave it unset and the sale posts to whichever account the organization has marked default, resolved at the time of the sale.

maxPartySize
integer
default:1

How many people one booking may bring, including the booker.

Required range: 1 <= x <= 1000
allowMultiDay
boolean
default:false

Whether a class of this kind may run across more than one calendar day.

cancelIfAttendanceZero
boolean
default:false

Whether a class with nobody booked cancels itself.

cancelIfAttendanceZeroHoursInAdvance
integer
default:0

Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.

Required range: 0 <= x <= 720
bookingAudience
object | null

Who something applies to, as a set of predicates a contact must match. null means everybody. The same shape a promotion segment and an automation entry condition use. membershipPlanIds is which plan the contact must HOLD, not which plan a purchase discounts.

sport
string | null

The sport classes of this kind are for, a canonical sport id such as "jiu-jitsu". A default only: each class still carries its own sport. An unrecognised value is rejected.

ageGroup
enum<string> | null

Who a class of this kind is for: an age band (infant 0–4, child 5–12, junior 13–17, adult 18–64, senior 65+), the same bands the age smart tags use, or all_ages. Marketplace search filters on it.

Available options:
infant,
child,
junior,
adult,
senior,
all_ages
difficulty
enum<string> | null

How hard a class of this kind is. Marketplace search filters on it. Not a rank: see progressionTrackId.

Available options:
beginner,
intermediate,
advanced,
all_levels
progressionTrackId
integer | null

The progression track sessions of this kind count toward, from GET /v1/platform/progression-tracks. Once any class type points at a track, only those sessions count toward its ranks; a track nothing points at counts every session. Must be a track the organization uses.

Response

Class type created

A kind of class the organization runs. Reference the id as classTypeId on a class, or in classTypeIds on a class pay rate policy. One shape for the list, get-by-id, create and update.

id
integer
name
string
slug
string

Stable key, derived from the name when a create does not send one. A rename never moves it.

description
string | null
revenueAccountId
integer | null

Where a sale on this kind of class posts. Null falls back to the organization's default account.

classCount
integer

Classes currently run as this type, past and future.

createdAt
string<date-time>
updatedAt
string<date-time>
maxPartySize
integer

How many people one booking on a class of this kind may bring, including the booker.

allowMultiDay
boolean

Whether a class of this kind may run across more than one calendar day.

cancelIfAttendanceZero
boolean

Whether a class with nobody booked cancels itself.

cancelIfAttendanceZeroHoursInAdvance
integer

Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.

bookingAudience
object | null

Who something applies to, as a set of predicates a contact must match. null means everybody. The same shape a promotion segment and an automation entry condition use. membershipPlanIds is which plan the contact must HOLD, not which plan a purchase discounts.

sport
string | null

The sport classes of this kind are for, a canonical sport id such as "jiu-jitsu". A default only: each class still carries its own sport. An unrecognised value is rejected.

ageGroup
enum<string> | null

Who a class of this kind is for: an age band (infant 0–4, child 5–12, junior 13–17, adult 18–64, senior 65+), the same bands the age smart tags use, or all_ages. Marketplace search filters on it.

Available options:
infant,
child,
junior,
adult,
senior,
all_ages
difficulty
enum<string> | null

How hard a class of this kind is. Marketplace search filters on it. Not a rank: see progressionTrackId.

Available options:
beginner,
intermediate,
advanced,
all_levels
progressionTrackId
integer | null

The progression track sessions of this kind count toward, from GET /v1/platform/progression-tracks. Once any class type points at a track, only those sessions count toward its ranks; a track nothing points at counts every session. Must be a track the organization uses.