curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/appointment-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedule_uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"start_time": "2025-11-25 10:00:00",
"contact_uuid": "660e8400-e29b-41d4-a716-446655440001",
"contact_name": "John",
"contact_surname": "Doe",
"contact_email": "john.doe@email.com",
"contact_phone": "+1-555-0100",
"description": "Annual checkup",
"end_time": "2025-11-25 10:30:00",
"notes": "Patient prefers morning appointments"
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/appointment-requests"
payload = {
"schedule_uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"start_time": "2025-11-25 10:00:00",
"contact_uuid": "660e8400-e29b-41d4-a716-446655440001",
"contact_name": "John",
"contact_surname": "Doe",
"contact_email": "john.doe@email.com",
"contact_phone": "+1-555-0100",
"description": "Annual checkup",
"end_time": "2025-11-25 10:30:00",
"notes": "Patient prefers morning appointments"
}
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({
schedule_uuid: '550e8400-e29b-41d4-a716-446655440000',
title: 'Medical Consultation',
start_time: '2025-11-25 10:00:00',
contact_uuid: '660e8400-e29b-41d4-a716-446655440001',
contact_name: 'John',
contact_surname: 'Doe',
contact_email: 'john.doe@email.com',
contact_phone: '+1-555-0100',
description: 'Annual checkup',
end_time: '2025-11-25 10:30:00',
notes: 'Patient prefers morning appointments'
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/appointment-requests', 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://{subdomain}.mihu.ai/api/v1/appointment-requests",
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([
'schedule_uuid' => '550e8400-e29b-41d4-a716-446655440000',
'title' => 'Medical Consultation',
'start_time' => '2025-11-25 10:00:00',
'contact_uuid' => '660e8400-e29b-41d4-a716-446655440001',
'contact_name' => 'John',
'contact_surname' => 'Doe',
'contact_email' => 'john.doe@email.com',
'contact_phone' => '+1-555-0100',
'description' => 'Annual checkup',
'end_time' => '2025-11-25 10:30:00',
'notes' => 'Patient prefers morning appointments'
]),
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://{subdomain}.mihu.ai/api/v1/appointment-requests"
payload := strings.NewReader("{\n \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\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://{subdomain}.mihu.ai/api/v1/appointment-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/appointment-requests")
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 \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Appointment request created successfully",
"data": {
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"status": "pending",
"start_time": "2025-11-25T10:00:00.000000Z",
"end_time": "2025-11-25T10:30:00.000000Z"
}
}{
"success": false,
"message": "Validation failed",
"data": {
"start_time": [
"Start time must be in the future"
]
}
}Create a new appointment request
Creates a proposed booking for a schedule. Use this when the requested time should be reviewed before becoming a confirmed appointment. Provide an existing contact_uuid, or provide contact details so the API can find or create the contact automatically.
curl --request POST \
--url https://{subdomain}.mihu.ai/api/v1/appointment-requests \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"schedule_uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"start_time": "2025-11-25 10:00:00",
"contact_uuid": "660e8400-e29b-41d4-a716-446655440001",
"contact_name": "John",
"contact_surname": "Doe",
"contact_email": "john.doe@email.com",
"contact_phone": "+1-555-0100",
"description": "Annual checkup",
"end_time": "2025-11-25 10:30:00",
"notes": "Patient prefers morning appointments"
}
'import requests
url = "https://{subdomain}.mihu.ai/api/v1/appointment-requests"
payload = {
"schedule_uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"start_time": "2025-11-25 10:00:00",
"contact_uuid": "660e8400-e29b-41d4-a716-446655440001",
"contact_name": "John",
"contact_surname": "Doe",
"contact_email": "john.doe@email.com",
"contact_phone": "+1-555-0100",
"description": "Annual checkup",
"end_time": "2025-11-25 10:30:00",
"notes": "Patient prefers morning appointments"
}
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({
schedule_uuid: '550e8400-e29b-41d4-a716-446655440000',
title: 'Medical Consultation',
start_time: '2025-11-25 10:00:00',
contact_uuid: '660e8400-e29b-41d4-a716-446655440001',
contact_name: 'John',
contact_surname: 'Doe',
contact_email: 'john.doe@email.com',
contact_phone: '+1-555-0100',
description: 'Annual checkup',
end_time: '2025-11-25 10:30:00',
notes: 'Patient prefers morning appointments'
})
};
fetch('https://{subdomain}.mihu.ai/api/v1/appointment-requests', 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://{subdomain}.mihu.ai/api/v1/appointment-requests",
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([
'schedule_uuid' => '550e8400-e29b-41d4-a716-446655440000',
'title' => 'Medical Consultation',
'start_time' => '2025-11-25 10:00:00',
'contact_uuid' => '660e8400-e29b-41d4-a716-446655440001',
'contact_name' => 'John',
'contact_surname' => 'Doe',
'contact_email' => 'john.doe@email.com',
'contact_phone' => '+1-555-0100',
'description' => 'Annual checkup',
'end_time' => '2025-11-25 10:30:00',
'notes' => 'Patient prefers morning appointments'
]),
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://{subdomain}.mihu.ai/api/v1/appointment-requests"
payload := strings.NewReader("{\n \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\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://{subdomain}.mihu.ai/api/v1/appointment-requests")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{subdomain}.mihu.ai/api/v1/appointment-requests")
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 \"schedule_uuid\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"title\": \"Medical Consultation\",\n \"start_time\": \"2025-11-25 10:00:00\",\n \"contact_uuid\": \"660e8400-e29b-41d4-a716-446655440001\",\n \"contact_name\": \"John\",\n \"contact_surname\": \"Doe\",\n \"contact_email\": \"john.doe@email.com\",\n \"contact_phone\": \"+1-555-0100\",\n \"description\": \"Annual checkup\",\n \"end_time\": \"2025-11-25 10:30:00\",\n \"notes\": \"Patient prefers morning appointments\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Appointment request created successfully",
"data": {
"id": 1,
"uuid": "550e8400-e29b-41d4-a716-446655440000",
"title": "Medical Consultation",
"status": "pending",
"start_time": "2025-11-25T10:00:00.000000Z",
"end_time": "2025-11-25T10:30:00.000000Z"
}
}{
"success": false,
"message": "Validation failed",
"data": {
"start_time": [
"Start time must be in the future"
]
}
}Authorizations
Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"
Body
UUID of the schedule
"550e8400-e29b-41d4-a716-446655440000"
Appointment title
"Medical Consultation"
Start time (must be in the future)
"2025-11-25 10:00:00"
UUID of existing contact (optional if contact details provided)
"660e8400-e29b-41d4-a716-446655440001"
Contact name (required if contact_uuid not provided)
"John"
Contact surname (optional)
"Doe"
Contact email (required if contact_uuid not provided)
"john.doe@email.com"
Contact phone (optional)
"+1-555-0100"
Appointment description (optional)
"Annual checkup"
End time (optional - if not provided, will use schedule's default duration from availability type)
"2025-11-25 10:30:00"
Additional notes (optional)
"Patient prefers morning appointments"
Response
Appointment request created successfully
Indicates whether the request completed successfully. True for successful responses; false for documented error responses.
true
Human-readable response message. Safe to display in logs or simple client notifications; use structured fields for program logic.
"Appointment request created successfully"
Show child attributes
Show child attributes
