curl --request PATCH \
--url https://api.1club.ai/v1/platform/class-types/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"maxPartySize": 1,
"allowMultiDay": false,
"cancelIfAttendanceZero": false,
"cancelIfAttendanceZeroHoursInAdvance": 0,
"bookingAudience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
]
}
}
'import requests
url = "https://api.1club.ai/v1/platform/class-types/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"maxPartySize": 1,
"allowMultiDay": False,
"cancelIfAttendanceZero": False,
"cancelIfAttendanceZeroHoursInAdvance": 0,
"bookingAudience": {
"memberTypes": ["<string>"],
"tags": ["<string>"],
"membershipPlanIds": [123],
"membershipPlanCategoryIds": [123]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
revenueAccountId: 123,
maxPartySize: 1,
allowMultiDay: false,
cancelIfAttendanceZero: false,
cancelIfAttendanceZeroHoursInAdvance: 0,
bookingAudience: {
memberTypes: ['<string>'],
tags: ['<string>'],
membershipPlanIds: [123],
membershipPlanCategoryIds: [123]
}
})
};
fetch('https://api.1club.ai/v1/platform/class-types/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/class-types/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'revenueAccountId' => 123,
'maxPartySize' => 1,
'allowMultiDay' => false,
'cancelIfAttendanceZero' => false,
'cancelIfAttendanceZeroHoursInAdvance' => 0,
'bookingAudience' => [
'memberTypes' => [
'<string>'
],
'tags' => [
'<string>'
],
'membershipPlanIds' => [
123
],
'membershipPlanCategoryIds' => [
123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/class-types/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/class-types/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/class-types/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"classCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"maxPartySize": 123,
"allowMultiDay": true,
"cancelIfAttendanceZero": true,
"cancelIfAttendanceZeroHoursInAdvance": 123,
"bookingAudience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Update a class type
Changes a class type. Send only what changes; an omitted field is left alone, null clears a nullable one, and at least one field is required.
Every field here applies to classes already scheduled as this type, not only to new ones: lowering maxPartySize does not evict anybody already booked, but it does cap the next booking, and changing revenueAccountId moves where future sales post without rewriting the ones already taken. A rename leaves slug alone - it is a stable key, so it moves only when you send one.
curl --request PATCH \
--url https://api.1club.ai/v1/platform/class-types/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"maxPartySize": 1,
"allowMultiDay": false,
"cancelIfAttendanceZero": false,
"cancelIfAttendanceZeroHoursInAdvance": 0,
"bookingAudience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
]
}
}
'import requests
url = "https://api.1club.ai/v1/platform/class-types/{id}"
payload = {
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"maxPartySize": 1,
"allowMultiDay": False,
"cancelIfAttendanceZero": False,
"cancelIfAttendanceZeroHoursInAdvance": 0,
"bookingAudience": {
"memberTypes": ["<string>"],
"tags": ["<string>"],
"membershipPlanIds": [123],
"membershipPlanCategoryIds": [123]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
slug: '<string>',
description: '<string>',
revenueAccountId: 123,
maxPartySize: 1,
allowMultiDay: false,
cancelIfAttendanceZero: false,
cancelIfAttendanceZeroHoursInAdvance: 0,
bookingAudience: {
memberTypes: ['<string>'],
tags: ['<string>'],
membershipPlanIds: [123],
membershipPlanCategoryIds: [123]
}
})
};
fetch('https://api.1club.ai/v1/platform/class-types/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.1club.ai/v1/platform/class-types/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'slug' => '<string>',
'description' => '<string>',
'revenueAccountId' => 123,
'maxPartySize' => 1,
'allowMultiDay' => false,
'cancelIfAttendanceZero' => false,
'cancelIfAttendanceZeroHoursInAdvance' => 0,
'bookingAudience' => [
'memberTypes' => [
'<string>'
],
'tags' => [
'<string>'
],
'membershipPlanIds' => [
123
],
'membershipPlanCategoryIds' => [
123
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.1club.ai/v1/platform/class-types/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.1club.ai/v1/platform/class-types/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/class-types/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"slug\": \"<string>\",\n \"description\": \"<string>\",\n \"revenueAccountId\": 123,\n \"maxPartySize\": 1,\n \"allowMultiDay\": false,\n \"cancelIfAttendanceZero\": false,\n \"cancelIfAttendanceZeroHoursInAdvance\": 0,\n \"bookingAudience\": {\n \"memberTypes\": [\n \"<string>\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"membershipPlanIds\": [\n 123\n ],\n \"membershipPlanCategoryIds\": [\n 123\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"revenueAccountId": 123,
"classCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"maxPartySize": 123,
"allowMultiDay": true,
"cancelIfAttendanceZero": true,
"cancelIfAttendanceZeroHoursInAdvance": 123,
"bookingAudience": {
"memberTypes": [
"<string>"
],
"tags": [
"<string>"
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
]
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Path Parameters
Body
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.
255Stable 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.
120^[a-z0-9]+(-[a-z0-9]+)*$2000Where 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.
How many people one booking may bring, including the booker.
1 <= x <= 1000Whether a class of this kind may run across more than one calendar day.
Whether a class with nobody booked cancels itself.
Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.
0 <= x <= 720Who 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.
Show child attributes
Show child attributes
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.
Stable key, derived from the name when a create does not send one. A rename never moves it.
Where a sale on this kind of class posts. Null falls back to the organization's default account.
Classes currently run as this type, past and future.
How many people one booking on a class of this kind may bring, including the booker.
Whether a class of this kind may run across more than one calendar day.
Whether a class with nobody booked cancels itself.
Hours before the start that cancellation runs. Meaningless unless cancelIfAttendanceZero.
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.
Show child attributes
Show child attributes
Was this page helpful?