Chatilo
USDPrices shown in US dollars Sign in Start free trial
API reference

Bookings

Appointments. Ask for the free times on a day, then book one. The free times follow the workspace’s opening hours, days off, staff and capacity, and a time can never be booked twice.

List services #

GET/api/v1/bookings/services

Works with any key

What can be booked, with how long each takes.

Returns HTTP 200

okboolean
Always true on success.
serviceslist of BookingService
The active services, in the order the team arranged them.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/bookings/services" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/services');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/services", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/bookings/services",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "services": [
        {
            "id": 3,
            "name": "Bridal consultation",
            "duration_minutes": 45,
            "price": 50000,
            "currency": "INR",
            "description": "Fabric, fitting and delivery dates.",
            "active": true
        }
    ]
}

List staff #

GET/api/v1/bookings/staff

Works with any key

The people appointments can be booked with. Empty when the workspace takes bookings on one shared calendar.

Returns HTTP 200

okboolean
Always true on success.
stafflist of object
Each as {"id", "name"}.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/bookings/staff" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/staff');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/staff", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/bookings/staff",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "staff": [
        {
            "id": 2,
            "name": "Anu"
        },
        {
            "id": 3,
            "name": "Devika"
        }
    ]
}

List free times #

GET/api/v1/bookings/slots

Works with any key

The free start times for a service on one day. The day is a calendar day on the business’s own clock. An empty list means nothing is free: the day is closed, full, too soon or too far ahead.

Query parameters

service_idintegerrequired
The service to book.
datestringrequired
The day, as YYYY-MM-DD.
staff_idinteger
Only times when this person is free.
rulesstring
customer (the default) applies every rule a customer booking in chat meets, including minimum notice and how far ahead bookings open. staff books like the team does by hand: notice and horizon are skipped, but opening hours, days off and capacity still apply.

Returns HTTP 200

okboolean
Always true on success.
datestring
The day asked for.
timezonestring
The business’s timezone.
service_idinteger
The service asked for.
duration_minutesinteger
How long the appointment takes.
slotslist of Slot
The free times, earliest first.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
422invalid_date
date is missing or isn’t YYYY-MM-DD.
422invalid_rules
rules isn’t customer or staff.
422service_not_found
service_id is missing or not a service in this workspace.
422staff_not_found
staff_id is not an active staff member.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/bookings/slots?service_id=3&date=2026-12-08" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/slots?service_id=3&date=2026-12-08');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/slots?service_id=3&date=2026-12-08", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/bookings/slots?service_id=3&date=2026-12-08",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "date": "2026-12-08",
    "timezone": "Asia/Kolkata",
    "service_id": 3,
    "duration_minutes": 45,
    "slots": [
        {
            "start": "2026-12-08T05:00:00Z",
            "local_start": "2026-12-08T10:30",
            "staff_ids": [
                2,
                3
            ]
        },
        {
            "start": "2026-12-08T05:30:00Z",
            "local_start": "2026-12-08T11:00",
            "staff_ids": [
                3
            ]
        }
    ]
}

List bookings #

GET/api/v1/bookings

Works with any key Paged

Latest start time first. Every filter is optional and they combine.

Query parameters

statusstring
confirmed (upcoming), completed, cancelled or no_show.
fromdate-time
Only bookings starting at or after this time.
todate-time
Only bookings starting before this time.
service_idinteger
Only this service.
staff_idinteger
Only this staff member.
contact_idinteger
Only this contact.
pageinteger
Which page, starting at 1. A page past the end is an empty list.
limitinteger
How many per page: 1 to 100. 50 when left out.

Returns HTTP 200

okboolean
Always true on success.
bookingslist of Booking
The bookings on this page.
pageinteger
The page you asked for.
pagesinteger
How many pages there are at this limit.
totalinteger
How many items match in all.
limitinteger
Items per page.
has_moreboolean
True while there is a next page.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
422invalid_date
A date filter isn’t a date and time like 2026-01-31T09:30:00Z.
422invalid_filter
status isn’t one of the four.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/bookings?status=confirmed&from=2026-12-08T00%3A00%3A00%2B05%3A30&to=2026-12-09T00%3A00%3A00%2B05%3A30" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings?status=confirmed&from=2026-12-08T00%3A00%3A00%2B05%3A30&to=2026-12-09T00%3A00%3A00%2B05%3A30');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings?status=confirmed&from=2026-12-08T00%3A00%3A00%2B05%3A30&to=2026-12-09T00%3A00%3A00%2B05%3A30", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/bookings?status=confirmed&from=2026-12-08T00%3A00%3A00%2B05%3A30&to=2026-12-09T00%3A00%3A00%2B05%3A30",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "bookings": [
        {
            "id": 7001,
            "ref": "BK-7Q2M",
            "status": "confirmed",
            "service_id": 3,
            "service": "Bridal consultation",
            "staff_id": 2,
            "staff": "Anu",
            "contact_id": 1001,
            "conversation_id": 2001,
            "customer_name": "Grace Miller",
            "starts_at": "2026-12-08T05:00:00Z",
            "ends_at": "2026-12-08T05:45:00Z",
            "local_start": "2026-12-08T10:30",
            "timezone": "Asia/Kolkata",
            "duration_minutes": 45,
            "price": 50000,
            "currency": "INR",
            "source": "staff",
            "notes": null,
            "cancel_reason": null,
            "cancelled_by": null,
            "cancelled_at": null,
            "created_at": "2026-01-31T09:30:00Z",
            "updated_at": "2026-01-31T09:30:00Z",
            "url": "https://chatilo.me/bookings/7001"
        }
    ],
    "page": 1,
    "pages": 1,
    "total": 1,
    "limit": 50,
    "has_more": false
}

Get a booking #

GET/api/v1/bookings/{id}

Works with any key

One booking, by id or by the reference the customer was given.

Path

idstringrequired
The booking’s id, or its reference such as BK-7Q2M.

Returns HTTP 200

okboolean
Always true on success.
bookingBooking
The booking.
contactContact or null
The customer, when the booking has a contact.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
404booking_not_found
No booking with that id or reference in this workspace.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl "https://chatilo.me/api/v1/bookings/BK-7Q2M" \
  -H "Authorization: Bearer YOUR_API_KEY"
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/BK-7Q2M');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey],
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/BK-7Q2M", {
  headers: {
    Authorization: `Bearer ${apiKey}`,
  },
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.get(
    "https://chatilo.me/api/v1/bookings/BK-7Q2M",
    headers={"Authorization": f"Bearer {api_key}"},
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "booking": {
        "id": 7001,
        "ref": "BK-7Q2M",
        "status": "confirmed",
        "service_id": 3,
        "service": "Bridal consultation",
        "staff_id": 2,
        "staff": "Anu",
        "contact_id": 1001,
        "conversation_id": 2001,
        "customer_name": "Grace Miller",
        "starts_at": "2026-12-08T05:00:00Z",
        "ends_at": "2026-12-08T05:45:00Z",
        "local_start": "2026-12-08T10:30",
        "timezone": "Asia/Kolkata",
        "duration_minutes": 45,
        "price": 50000,
        "currency": "INR",
        "source": "staff",
        "notes": null,
        "cancel_reason": null,
        "cancelled_by": null,
        "cancelled_at": null,
        "created_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z",
        "url": "https://chatilo.me/bookings/7001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    }
}

Create a booking #

POST/api/v1/bookings

Needs a read-and-write key Accepts Idempotency-Key

Books a time. The time is checked again at the moment of booking, so if two requests ask for the last place only one gets it and the other is told slot_unavailable. A customer with a phone number becomes a contact (or is matched to the one you have) and gets the workspace’s “Booked” tag; reminders are planned as for any other booking.

Body JSON

service_idintegerrequired
The service, from “List services”.
startdate-timerequired
A start from “List free times”. Without an offset it is read in the workspace’s timezone.
customerobjectrequired
Who it is for: {"phone", "name"}, or {"contact_id"}, or just {"name"} for a walk-in with no phone number.
staff_idinteger
Who it is with. When left out, someone free is chosen.
notesstring
Notes for the team, up to 1,000 characters.
rulesstring
customer (the default) applies every rule a customer booking in chat meets, including minimum notice and how far ahead bookings open. staff books like the team does by hand: notice and horizon are skipped, but opening hours, days off and capacity still apply.
notifyboolean
true tells the customer on WhatsApp. That only happens inside the 24-hour window; the response says whether it was sent.

Returns HTTP 201

okboolean
Always true on success.
bookingBooking
The booking.
contactContact or null
The customer, when the booking has a contact.
notifiedboolean
Whether the customer was told on WhatsApp.
notify_reasonstring or null
Why not, when notify was true and nothing was sent.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403contact_limit
The plan’s contact limit is reached, so a new contact can’t be added.
403read_only_key
A read-only key was used for a request that changes something.
404contact_not_found
No contact with that id or phone number in this workspace.
409idempotency_conflict
A request with the same Idempotency-Key is still running.
409slot_unavailable
That time isn’t free: it was taken, is outside opening hours, or breaks the notice rules.
422invalid_customer
customer has no contact_id, phone or name.
422invalid_idempotency_key
The Idempotency-Key is longer than 200 characters.
422invalid_notes
notes is longer than 1,000 characters.
422invalid_phone
The phone number is missing or isn’t 8 to 15 digits with the country code.
422invalid_rules
rules isn’t customer or staff.
422invalid_start
start is missing or isn’t a date and time.
422service_not_found
service_id is missing or not a service in this workspace.
422staff_not_found
staff_id is not an active staff member.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/bookings" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": 3,
    "start": "2026-12-08T05:00:00Z",
    "customer": {
        "phone": "+919876543210",
        "name": "Grace Miller"
    },
    "notify": true
}'
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey, 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'service_id' => 3,
        'start' => '2026-12-08T05:00:00Z',
        'customer' => [
            'phone' => '+919876543210',
            'name' => 'Grace Miller',
        ],
        'notify' => true,
    ]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "service_id": 3,
      "start": "2026-12-08T05:00:00Z",
      "customer": {
          "phone": "+919876543210",
          "name": "Grace Miller"
      },
      "notify": true
  }),
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/bookings",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "service_id": 3,
        "start": "2026-12-08T05:00:00Z",
        "customer": {
            "phone": "+919876543210",
            "name": "Grace Miller",
        },
        "notify": True,
    },
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 201
{
    "ok": true,
    "booking": {
        "id": 7001,
        "ref": "BK-7Q2M",
        "status": "confirmed",
        "service_id": 3,
        "service": "Bridal consultation",
        "staff_id": 2,
        "staff": "Anu",
        "contact_id": 1001,
        "conversation_id": 2001,
        "customer_name": "Grace Miller",
        "starts_at": "2026-12-08T05:00:00Z",
        "ends_at": "2026-12-08T05:45:00Z",
        "local_start": "2026-12-08T10:30",
        "timezone": "Asia/Kolkata",
        "duration_minutes": 45,
        "price": 50000,
        "currency": "INR",
        "source": "staff",
        "notes": null,
        "cancel_reason": null,
        "cancelled_by": null,
        "cancelled_at": null,
        "created_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z",
        "url": "https://chatilo.me/bookings/7001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "Booked",
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    },
    "notified": true,
    "notify_reason": null
}

Reschedule a booking #

POST/api/v1/bookings/{id}/reschedule

Needs a read-and-write key

Moves an upcoming booking to a new free time, with the same checks as creating one. Its reminders are planned again for the new time.

Path

idstringrequired
The booking’s id, or its reference such as BK-7Q2M.

Body JSON

startdate-timerequired
The new start, from “List free times”.
staff_idinteger
Move it to this person. Otherwise it stays with the same person when they are free.
rulesstring
customer (the default) applies every rule a customer booking in chat meets, including minimum notice and how far ahead bookings open. staff books like the team does by hand: notice and horizon are skipped, but opening hours, days off and capacity still apply.
notifyboolean
true tells the customer on WhatsApp. That only happens inside the 24-hour window; the response says whether it was sent.

Returns HTTP 200

okboolean
Always true on success.
bookingBooking
The booking.
contactContact or null
The customer, when the booking has a contact.
notifiedboolean
Whether the customer was told on WhatsApp.
notify_reasonstring or null
Why not, when notify was true and nothing was sent.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403read_only_key
A read-only key was used for a request that changes something.
404booking_not_found
No booking with that id or reference in this workspace.
409invalid_state
The booking is cancelled, completed or a no-show.
409slot_unavailable
That time isn’t free: it was taken, is outside opening hours, or breaks the notice rules.
422invalid_rules
rules isn’t customer or staff.
422invalid_start
start is missing or isn’t a date and time.
422staff_not_found
staff_id is not an active staff member.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/bookings/7001/reschedule" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "start": "2026-12-09T05:30:00Z",
    "notify": true
}'
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/7001/reschedule');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey, 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'start' => '2026-12-09T05:30:00Z',
        'notify' => true,
    ]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/7001/reschedule", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "start": "2026-12-09T05:30:00Z",
      "notify": true
  }),
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/bookings/7001/reschedule",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "start": "2026-12-09T05:30:00Z",
        "notify": True,
    },
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "booking": {
        "id": 7001,
        "ref": "BK-7Q2M",
        "status": "confirmed",
        "service_id": 3,
        "service": "Bridal consultation",
        "staff_id": 2,
        "staff": "Anu",
        "contact_id": 1001,
        "conversation_id": 2001,
        "customer_name": "Grace Miller",
        "starts_at": "2026-12-09T05:30:00Z",
        "ends_at": "2026-12-09T06:15:00Z",
        "local_start": "2026-12-09T11:00",
        "timezone": "Asia/Kolkata",
        "duration_minutes": 45,
        "price": 50000,
        "currency": "INR",
        "source": "staff",
        "notes": null,
        "cancel_reason": null,
        "cancelled_by": null,
        "cancelled_at": null,
        "created_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z",
        "url": "https://chatilo.me/bookings/7001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    },
    "notified": false,
    "notify_reason": "The customer hasn’t written in the last 24 hours, so WhatsApp only allows an approved template."
}

Cancel a booking #

POST/api/v1/bookings/{id}/cancel

Needs a read-and-write key

Cancels a booking and frees its time straight away. Reminders that haven’t gone out are dropped.

Path

idstringrequired
The booking’s id, or its reference such as BK-7Q2M.

Body JSON

reasonstring
Why, up to 255 characters. The team sees it.
notifyboolean
true tells the customer on WhatsApp. That only happens inside the 24-hour window; the response says whether it was sent.

Returns HTTP 200

okboolean
Always true on success.
bookingBooking
The booking.
contactContact or null
The customer, when the booking has a contact.
notifiedboolean
Whether the customer was told on WhatsApp.
notify_reasonstring or null
Why not, when notify was true and nothing was sent.

Errors

401unauthorized
The Authorization header is missing, or the key is wrong or deleted.
403read_only_key
A read-only key was used for a request that changes something.
404booking_not_found
No booking with that id or reference in this workspace.
409invalid_state
The booking was already cancelled.
429rate_limited
More than 120 requests in a minute with this key. Wait for the seconds in Retry-After.

Plus the errors any request can get.

Request
curl -X POST "https://chatilo.me/api/v1/bookings/7001/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Customer asked to cancel"
}'
<?php
$apiKey = 'YOUR_API_KEY';

$ch = curl_init('https://chatilo.me/api/v1/bookings/7001/cancel');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $apiKey, 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => json_encode([
        'reason' => 'Customer asked to cancel',
    ]),
]);
$result = json_decode((string) curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);

if ($status >= 400) {
    throw new RuntimeException($result['error']['code'] . ': ' . $result['error']['message']);
}
print_r($result);
const apiKey = 'YOUR_API_KEY';

const response = await fetch("https://chatilo.me/api/v1/bookings/7001/cancel", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${apiKey}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
      "reason": "Customer asked to cancel"
  }),
});
const result = await response.json();

if (!response.ok) {
  throw new Error(`${result.error.code}: ${result.error.message}`);
}
console.log(result);
import requests

api_key = "YOUR_API_KEY"

response = requests.post(
    "https://chatilo.me/api/v1/bookings/7001/cancel",
    headers={"Authorization": f"Bearer {api_key}"},
    json={
        "reason": "Customer asked to cancel",
    },
    timeout=30,
)
result = response.json()

if not response.ok:
    raise RuntimeError(f"{result['error']['code']}: {result['error']['message']}")
print(result)
Response · HTTP 200
{
    "ok": true,
    "booking": {
        "id": 7001,
        "ref": "BK-7Q2M",
        "status": "cancelled",
        "service_id": 3,
        "service": "Bridal consultation",
        "staff_id": 2,
        "staff": "Anu",
        "contact_id": 1001,
        "conversation_id": 2001,
        "customer_name": "Grace Miller",
        "starts_at": "2026-12-08T05:00:00Z",
        "ends_at": "2026-12-08T05:45:00Z",
        "local_start": "2026-12-08T10:30",
        "timezone": "Asia/Kolkata",
        "duration_minutes": 45,
        "price": 50000,
        "currency": "INR",
        "source": "staff",
        "notes": null,
        "cancel_reason": "Customer asked to cancel",
        "cancelled_by": "staff",
        "cancelled_at": "2026-12-01T08:00:00Z",
        "created_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z",
        "url": "https://chatilo.me/bookings/7001"
    },
    "contact": {
        "id": 1001,
        "name": "Grace Miller",
        "phone": "919876543210",
        "email": "[email protected]",
        "source": "api",
        "opted_in": true,
        "tags": [
            "VIP"
        ],
        "created_at": "2026-01-31T09:30:00Z",
        "attributes": {
            "city": "Denver"
        },
        "notes": "",
        "opted_out_at": null,
        "last_seen_at": "2026-01-31T09:30:00Z",
        "updated_at": "2026-01-31T09:30:00Z"
    },
    "notified": false,
    "notify_reason": null
}

Cookies on this site

We use the cookies needed to run the site and keep you signed in. With your OK we also remember choices you make here, such as the currency for prices. We don’t use advertising or tracking cookies. Cookie policy