Book a 1:1 appointment.
curl --request POST \
--url https://dash.dmly.io/api/v1/appointments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "c0ffee00-dead-beef-cafe-000000000001",
"service_id": "9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f",
"staff_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"datetime": "2026-07-01T14:00:00",
"timezone": "America/New_York",
"notes": "Prefers a window seat.",
"source": "api"
}
'import requests
url = "https://dash.dmly.io/api/v1/appointments"
payload = {
"contact_id": "c0ffee00-dead-beef-cafe-000000000001",
"service_id": "9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f",
"staff_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"datetime": "2026-07-01T14:00:00",
"timezone": "America/New_York",
"notes": "Prefers a window seat.",
"source": "api"
}
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({
contact_id: 'c0ffee00-dead-beef-cafe-000000000001',
service_id: '9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f',
staff_id: '1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
datetime: '2026-07-01T14:00:00',
timezone: 'America/New_York',
notes: 'Prefers a window seat.',
source: 'api'
})
};
fetch('https://dash.dmly.io/api/v1/appointments', 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/appointments",
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([
'contact_id' => 'c0ffee00-dead-beef-cafe-000000000001',
'service_id' => '9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f',
'staff_id' => '1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
'datetime' => '2026-07-01T14:00:00',
'timezone' => 'America/New_York',
'notes' => 'Prefers a window seat.',
'source' => 'api'
]),
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/appointments"
payload := strings.NewReader("{\n \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\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/appointments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/appointments")
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 \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Book a 1:1 appointment.
Re-validates the slot under a lock (no double-booking), creates the booking (confirmed), pushes the calendar event, sends the confirmation message, seeds reminders and fires booking.created + appointment_booked. If the slot is gone responds 422. datetime is parsed in timezone (default UTC). With no staff_id, an eligible staff member is auto-assigned.
POST
/
appointments
Book a 1:1 appointment.
curl --request POST \
--url https://dash.dmly.io/api/v1/appointments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"contact_id": "c0ffee00-dead-beef-cafe-000000000001",
"service_id": "9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f",
"staff_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"datetime": "2026-07-01T14:00:00",
"timezone": "America/New_York",
"notes": "Prefers a window seat.",
"source": "api"
}
'import requests
url = "https://dash.dmly.io/api/v1/appointments"
payload = {
"contact_id": "c0ffee00-dead-beef-cafe-000000000001",
"service_id": "9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f",
"staff_id": "1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"datetime": "2026-07-01T14:00:00",
"timezone": "America/New_York",
"notes": "Prefers a window seat.",
"source": "api"
}
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({
contact_id: 'c0ffee00-dead-beef-cafe-000000000001',
service_id: '9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f',
staff_id: '1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
datetime: '2026-07-01T14:00:00',
timezone: 'America/New_York',
notes: 'Prefers a window seat.',
source: 'api'
})
};
fetch('https://dash.dmly.io/api/v1/appointments', 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/appointments",
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([
'contact_id' => 'c0ffee00-dead-beef-cafe-000000000001',
'service_id' => '9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f',
'staff_id' => '1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d',
'datetime' => '2026-07-01T14:00:00',
'timezone' => 'America/New_York',
'notes' => 'Prefers a window seat.',
'source' => 'api'
]),
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/appointments"
payload := strings.NewReader("{\n \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\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/appointments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dash.dmly.io/api/v1/appointments")
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 \"contact_id\": \"c0ffee00-dead-beef-cafe-000000000001\",\n \"service_id\": \"9f2c1a7e-3b4d-4c8a-9e1f-2a6b7c8d9e0f\",\n \"staff_id\": \"1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d\",\n \"datetime\": \"2026-07-01T14:00:00\",\n \"timezone\": \"America/New_York\",\n \"notes\": \"Prefers a window seat.\",\n \"source\": \"api\"\n}"
response = http.request(request)
puts response.read_body{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"errors": {}
}{
"message": "<string>"
}Was this page helpful?
⌘I

