Book a viewing
curl --request POST \
--url https://api.majarrah.io/v1/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"property_id": "<string>",
"scheduled_at": {},
"user_phone": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.majarrah.io/v1/bookings"
payload = {
"property_id": "<string>",
"scheduled_at": {},
"user_phone": "<string>",
"notes": "<string>"
}
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({
property_id: '<string>',
scheduled_at: {},
user_phone: '<string>',
notes: '<string>'
})
};
fetch('https://api.majarrah.io/v1/bookings', 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://api.majarrah.io/v1/bookings",
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([
'property_id' => '<string>',
'scheduled_at' => [
],
'user_phone' => '<string>',
'notes' => '<string>'
]),
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://api.majarrah.io/v1/bookings"
payload := strings.NewReader("{\n \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\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://api.majarrah.io/v1/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.majarrah.io/v1/bookings")
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 \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"booking": {
"id": "<string>",
"property_id": "<string>",
"scheduled_at": {},
"status": "<string>",
"created_at": {}
},
"charged": true
}Bookings
Book a viewing
Schedule a viewing for a property at one of the broker’s available slots.
POST
/
v1
/
bookings
Book a viewing
curl --request POST \
--url https://api.majarrah.io/v1/bookings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"property_id": "<string>",
"scheduled_at": {},
"user_phone": "<string>",
"notes": "<string>"
}
'import requests
url = "https://api.majarrah.io/v1/bookings"
payload = {
"property_id": "<string>",
"scheduled_at": {},
"user_phone": "<string>",
"notes": "<string>"
}
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({
property_id: '<string>',
scheduled_at: {},
user_phone: '<string>',
notes: '<string>'
})
};
fetch('https://api.majarrah.io/v1/bookings', 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://api.majarrah.io/v1/bookings",
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([
'property_id' => '<string>',
'scheduled_at' => [
],
'user_phone' => '<string>',
'notes' => '<string>'
]),
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://api.majarrah.io/v1/bookings"
payload := strings.NewReader("{\n \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\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://api.majarrah.io/v1/bookings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.majarrah.io/v1/bookings")
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 \"property_id\": \"<string>\",\n \"scheduled_at\": {},\n \"user_phone\": \"<string>\",\n \"notes\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"booking": {
"id": "<string>",
"property_id": "<string>",
"scheduled_at": {},
"status": "<string>",
"created_at": {}
},
"charged": true
}Creates a viewing booking. The broker is notified immediately and can confirm, propose a new time, or decline.
Request body
uuid
required
The ID of the property to view.
ISO 8601 timestamp
required
When the viewing should happen. Must match one of the broker’s available slots — check with the availability endpoint first.
string
Override the phone number the broker will call you on. Defaults to the phone on the buyer’s profile.
string
Optional note visible to the broker, e.g. “coming with my wife”.
Response
boolean
Whether a lead credit was charged to the broker’s workspace for this booking.
Example
curl https://api.majarrah.io/v1/bookings \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"property_id": "e39a8b2b-...",
"scheduled_at": "2026-09-25T18:00:00+03:00",
"notes": "Coming with my wife"
}'
{
"booking": {
"id": "bkg-1a2b3c...",
"property_id": "e39a8b2b-...",
"scheduled_at": "2026-09-25T18:00:00+03:00",
"status": "pending"
},
"charged": true
}
Errors
slot_unavailable— the requested time isn’t a broker-open slot.slot_already_booked— someone else booked this slot first.property_not_found— theproperty_iddoesn’t exist or is unpublished.self_booking_forbidden— you can’t book your own listing.
Was this page helpful?