Create a new appointment request
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"
]
}
}Appointment Requests
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.
POST
/
api
/
v1
/
appointment-requests
Create a new appointment request
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
Body
application/json
Response
Appointment request created successfully
