Skip to main content
PATCH
Update 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.

Path Parameters

id
integer
required

Body

application/json

Fields accepted when updating a class type. Send only what changes; null clears a nullable field, an omitted field is left alone, and at least one is required. A rename does not move slug. Every field applies to classes already scheduled as this type, not only to new ones.

name
string
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.

Response

The updated class type

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.