curl --request POST \
--url https://{clinic}.{region}.practicehub.io/v3/api/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_id": 1,
"location_id": 2,
"appointment_type_id": 2,
"practitioner_id": 2,
"starts_at": "2026-09-09T10:30:00",
"resource_id": 2,
"ends_at": "2026-09-09T10:30:00",
"note": "<string>",
"columns": 50,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/appointments"
payload = {
"patient_id": 1,
"location_id": 2,
"appointment_type_id": 2,
"practitioner_id": 2,
"starts_at": "2026-09-09T10:30:00",
"resource_id": 2,
"ends_at": "2026-09-09T10:30:00",
"note": "<string>",
"columns": 50,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_id: 1,
location_id: 2,
appointment_type_id: 2,
practitioner_id: 2,
starts_at: '2026-09-09T10:30:00',
resource_id: 2,
ends_at: '2026-09-09T10:30:00',
note: '<string>',
columns: 50,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/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://{clinic}.{region}.practicehub.io/v3/api/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([
'patient_id' => 1,
'location_id' => 2,
'appointment_type_id' => 2,
'practitioner_id' => 2,
'starts_at' => '2026-09-09T10:30:00',
'resource_id' => 2,
'ends_at' => '2026-09-09T10:30:00',
'note' => '<string>',
'columns' => 50,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/appointments"
payload := strings.NewReader("{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://{clinic}.{region}.practicehub.io/v3/api/appointments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 6350,
"appointment_type_id": 1,
"practitioner_id": 109,
"resource_id": 4,
"patient_id": 340,
"location_id": 81,
"starts_at": "2026-09-01T09:00:00",
"ends_at": "2026-09-01T09:30:00",
"status": "pending",
"note": "New patient assessment.",
"is_group": false,
"group_master_id": null,
"group_total_attendees": null,
"cancelled_at": null,
"cancel_note": null,
"columns": 1,
"updated_at": "2026-08-19T14:22:05Z",
"created_at": "2026-01-15T10:30:00Z",
"patient": {
"id": 340,
"first_name": "Augusta",
"last_name": "Lovelace",
"preferred_name": "Ada",
"name": "Ada Lovelace"
}
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Create appointments
curl --request POST \
--url https://{clinic}.{region}.practicehub.io/v3/api/appointments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"patient_id": 1,
"location_id": 2,
"appointment_type_id": 2,
"practitioner_id": 2,
"starts_at": "2026-09-09T10:30:00",
"resource_id": 2,
"ends_at": "2026-09-09T10:30:00",
"note": "<string>",
"columns": 50,
"metadata": {}
}
'import requests
url = "https://{clinic}.{region}.practicehub.io/v3/api/appointments"
payload = {
"patient_id": 1,
"location_id": 2,
"appointment_type_id": 2,
"practitioner_id": 2,
"starts_at": "2026-09-09T10:30:00",
"resource_id": 2,
"ends_at": "2026-09-09T10:30:00",
"note": "<string>",
"columns": 50,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
patient_id: 1,
location_id: 2,
appointment_type_id: 2,
practitioner_id: 2,
starts_at: '2026-09-09T10:30:00',
resource_id: 2,
ends_at: '2026-09-09T10:30:00',
note: '<string>',
columns: 50,
metadata: {}
})
};
fetch('https://{clinic}.{region}.practicehub.io/v3/api/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://{clinic}.{region}.practicehub.io/v3/api/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([
'patient_id' => 1,
'location_id' => 2,
'appointment_type_id' => 2,
'practitioner_id' => 2,
'starts_at' => '2026-09-09T10:30:00',
'resource_id' => 2,
'ends_at' => '2026-09-09T10:30:00',
'note' => '<string>',
'columns' => 50,
'metadata' => [
]
]),
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://{clinic}.{region}.practicehub.io/v3/api/appointments"
payload := strings.NewReader("{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", 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.post("https://{clinic}.{region}.practicehub.io/v3/api/appointments")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{clinic}.{region}.practicehub.io/v3/api/appointments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"patient_id\": 1,\n \"location_id\": 2,\n \"appointment_type_id\": 2,\n \"practitioner_id\": 2,\n \"starts_at\": \"2026-09-09T10:30:00\",\n \"resource_id\": 2,\n \"ends_at\": \"2026-09-09T10:30:00\",\n \"note\": \"<string>\",\n \"columns\": 50,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": 6350,
"appointment_type_id": 1,
"practitioner_id": 109,
"resource_id": 4,
"patient_id": 340,
"location_id": 81,
"starts_at": "2026-09-01T09:00:00",
"ends_at": "2026-09-01T09:30:00",
"status": "pending",
"note": "New patient assessment.",
"is_group": false,
"group_master_id": null,
"group_total_attendees": null,
"cancelled_at": null,
"cancel_note": null,
"columns": 1,
"updated_at": "2026-08-19T14:22:05Z",
"created_at": "2026-01-15T10:30:00Z",
"patient": {
"id": 340,
"first_name": "Augusta",
"last_name": "Lovelace",
"preferred_name": "Ada",
"name": "Ada Lovelace"
}
}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}{
"message": "<string>",
"code": "<string>",
"errors": {}
}Authorizations
API key from Developers → API Keys, sent as Authorization: Bearer .
Headers
Any unique string (≤255 chars). A retry with the same key within 24 hours replays the original response (Idempotent-Replayed: true) instead of creating a second record.
255Body
- Book an appointment
- Join a group appointment
The patient attending (GET /patients) — must be active. Required on create; not accepted on update. 0 marks a group master session.
x >= 0The location the visit happens at (GET /locations). Required on create.
x >= 1The service being booked (GET /appointment_types). Required on create; changing it on PATCH retypes the visit under the same guards as a move — refused once processed, cancelled or missed.
x >= 1The practitioner the visit is booked with (GET /practitioners). Required on create; can't be null on update — an appointment is moved to someone else, never unassigned.
x >= 1Visit start, YYYY-MM-DDTHH:MM:SS in the clinic's timezone. Required on create. Changing it resets any pending reminder sends for the visit. The account's wall-clock time, YYYY-MM-DDTHH:MM:SS, no zone suffix.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$"2026-09-09T10:30:00"
Required when the location uses a resource-view calendar (locations.calendar_view = 1) — the room/table the appointment sits in, from GET /resources for that location. Leave it out for practitioner-view locations (calendar_view = 2). The room, table or bench the visit sits in, from GET /resources. Required at resource-view locations (calendar_view = 1); leave it out at practitioner-view locations (calendar_view = 2).
x >= 1Visit end, YYYY-MM-DDTHH:MM:SS clinic time, after start. Omitted on create it's derived from the practitioner's duration for the type, else the type's, else 30 min; on update it keeps the current duration. The account's wall-clock time, YYYY-MM-DDTHH:MM:SS, no zone suffix.
^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$"2026-09-09T10:30:00"
Free-text note on the visit, ≤ 1000 chars. Editable in any state, even processed.
1000How many of the practitioner's calendar columns the visit spans (1 to 100). Omitted on create it takes the appointment type's default; change it to widen or narrow the block on the diary. Omit it (or send null) on an update to leave it as it is.
1 <= x <= 100Integrator-owned key/value metadata (max 50 keys). Values are strings (≤500 chars), numbers or booleans and read back with the type they were written with. On write, a null value removes the key. Filter with metadata[key]=op:value; number operands compare numerically.
Show child attributes
Show child attributes
Response
The resource
Show child attributes
Show child attributes
{ "id": 6350, "appointment_type_id": 1, "practitioner_id": 109, "resource_id": 4, "patient_id": 340, "location_id": 81, "starts_at": "2026-09-01T09:00:00", "ends_at": "2026-09-01T09:30:00", "status": "pending", "note": "New patient assessment.", "is_group": false, "group_master_id": null, "group_total_attendees": null, "cancelled_at": null, "cancel_note": null, "columns": 1, "updated_at": "2026-08-19T14:22:05Z", "created_at": "2026-01-15T10:30:00Z", "patient": { "id": 340, "first_name": "Augusta", "last_name": "Lovelace", "preferred_name": "Ada", "name": "Ada Lovelace" } }
Was this page helpful?