Create a group-class session.
curl --request POST \
--url https://dash.dmly.io/api/v1/classes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"service_id": "9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d",
"staff_id": "5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e",
"starts_at": "2026-07-15T18:00:00Z",
"ends_at": "2026-07-15T19:00:00Z",
"timezone": "Europe/London",
"capacity": 12,
"location": "Studio 2",
"waitlist_enabled": true
}
'import requests
url = "https://dash.dmly.io/api/v1/classes"
payload = {
"service_id": "9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d",
"staff_id": "5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e",
"starts_at": "2026-07-15T18:00:00Z",
"ends_at": "2026-07-15T19:00:00Z",
"timezone": "Europe/London",
"capacity": 12,
"location": "Studio 2",
"waitlist_enabled": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
service_id: '9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d',
staff_id: '5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e',
starts_at: '2026-07-15T18:00:00Z',
ends_at: '2026-07-15T19:00:00Z',
timezone: 'Europe/London',
capacity: 12,
location: 'Studio 2',
waitlist_enabled: true
})
};
fetch('https://dash.dmly.io/api/v1/classes', 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://dash.dmly.io/api/v1/classes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_id' => '9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d',
'staff_id' => '5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e',
'starts_at' => '2026-07-15T18:00:00Z',
'ends_at' => '2026-07-15T19:00:00Z',
'timezone' => 'Europe/London',
'capacity' => 12,
'location' => 'Studio 2',
'waitlist_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://dash.dmly.io/api/v1/classes"
payload := strings.NewReader("{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://dash.dmly.io/api/v1/classes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/classes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Creates one occurrence of a class Service: a fixed time window with a seat pool. service_id is required (Service uuid); staff_id is the optional host (staff uuid). If ends_at is omitted it is derived from the Service duration. capacity defaults to the Service capacity and waitlist_enabled defaults to the Service setting when not supplied. Returns the created session (201).
POST
/
classes
Create a group-class session.
curl --request POST \
--url https://dash.dmly.io/api/v1/classes \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"service_id": "9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d",
"staff_id": "5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e",
"starts_at": "2026-07-15T18:00:00Z",
"ends_at": "2026-07-15T19:00:00Z",
"timezone": "Europe/London",
"capacity": 12,
"location": "Studio 2",
"waitlist_enabled": true
}
'import requests
url = "https://dash.dmly.io/api/v1/classes"
payload = {
"service_id": "9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d",
"staff_id": "5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e",
"starts_at": "2026-07-15T18:00:00Z",
"ends_at": "2026-07-15T19:00:00Z",
"timezone": "Europe/London",
"capacity": 12,
"location": "Studio 2",
"waitlist_enabled": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
service_id: '9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d',
staff_id: '5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e',
starts_at: '2026-07-15T18:00:00Z',
ends_at: '2026-07-15T19:00:00Z',
timezone: 'Europe/London',
capacity: 12,
location: 'Studio 2',
waitlist_enabled: true
})
};
fetch('https://dash.dmly.io/api/v1/classes', 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://dash.dmly.io/api/v1/classes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'service_id' => '9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d',
'staff_id' => '5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e',
'starts_at' => '2026-07-15T18:00:00Z',
'ends_at' => '2026-07-15T19:00:00Z',
'timezone' => 'Europe/London',
'capacity' => 12,
'location' => 'Studio 2',
'waitlist_enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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://dash.dmly.io/api/v1/classes"
payload := strings.NewReader("{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://dash.dmly.io/api/v1/classes")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/classes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"service_id\": \"9b1f2c3d-0a4e-4f6b-8c1d-2e3f4a5b6c7d\",\n \"staff_id\": \"5a2e8d7c-1b3f-4c9a-9e0d-6f7a8b9c0d1e\",\n \"starts_at\": \"2026-07-15T18:00:00Z\",\n \"ends_at\": \"2026-07-15T19:00:00Z\",\n \"timezone\": \"Europe/London\",\n \"capacity\": 12,\n \"location\": \"Studio 2\",\n \"waitlist_enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Authorizations
apiKeyAuthbearerAuth
Your workspace API key. It both authenticates the caller and selects the workspace.
Body
application/json
Response
Success.
Was this page helpful?
⌘I

