API reference
Availability
Free time slots according to the appointment settings and the appointments already booked.
Endpoints
List free time slots
/api/v1/availability
Free time slots for an appointment between date_from and date_to (up to 31 days). The rules of the booking page: working hours, breaks, blocked days, lead time, how far ahead bookings are allowed, buffer and the pending and confirmed appointments. The company's Google Calendar does not count here, and the slots apply to the whole company, not per employee. If appointments are switched off in the settings, the list is empty. The duration comes from duration_minutes, otherwise from the appointment type, otherwise from the default duration.
- Scope
-
appointments.read— Read appointments (with the customer's name, email and phone), appointment types and availability - Required feature
appointments
Query parameters
| Name | Type | Description |
|---|---|---|
date_from
required
|
string (date) | The first day, as YYYY-MM-DD. |
date_to
|
string (date) | The last day, as YYYY-MM-DD (defaults to date_from, at most 30 days after date_from). |
appointment_type_id
|
string (uuid) | The appointment type; the duration then comes from the type. |
duration_minutes
|
integer | The duration of the appointment in minutes; takes precedence over the duration of the type. from 5 to 720 |
Example request
curl "https://app.klantly.com/api/v1/availability?date_from=2026-10-05&date_to=2026-10-09&duration_minutes=60" \
-H "Authorization: Bearer $KLANTLY_API_KEY"$client = new \GuzzleHttp\Client([
'base_uri' => 'https://app.klantly.com/api/v1/',
'headers' => ['Authorization' => 'Bearer ' . getenv('KLANTLY_API_KEY')],
]);
$response = $client->request('GET', 'availability', [
'query' => [
'date_from' => '2026-10-05',
'date_to' => '2026-10-09',
'duration_minutes' => 60,
],
]);
$data = json_decode((string) $response->getBody(), true)['data'];const response = await fetch('https://app.klantly.com/api/v1/availability?date_from=2026-10-05&date_to=2026-10-09&duration_minutes=60', {
headers: {
Authorization: `Bearer ${process.env.KLANTLY_API_KEY}`,
},
});
const { data } = await response.json();import os
import requests
response = requests.get(
"https://app.klantly.com/api/v1/availability",
headers={
"Authorization": f"Bearer {os.environ['KLANTLY_API_KEY']}",
},
params={
"date_from": "2026-10-05",
"date_to": "2026-10-09",
"duration_minutes": 60
},
)
data = response.json()["data"]Response 200
The response is a list with cursor pagination: data contains the objects, meta the pagination.
{
"data": [
{
"object": "availability_slot",
"starts_at": "2026-10-05T07:00:00Z",
"ends_at": "2026-10-05T08:00:00Z"
}
],
"meta": {
"limit": 50,
"next_cursor": "eyJpZCI6IjlkM2Y2YzFlIn0",
"prev_cursor": null
}
}Possible errors
-
403
insufficient_scope— This API key has no access to this action. -
422
validation_failed— The input is invalid.
The object
All fields are always present; a field without a value is null.
| Field | Type | Description |
|---|---|---|
object |
string | Always "availability_slot". |
starts_at |
string (date-time) | Start of the time slot (UTC). |
ends_at |
string (date-time) | End of the time slot (UTC). |