Developers

The Drin API

Read and change a business's customers and appointments from your own software: accounting, a CRM, a website, a calendar sync, Zapier or Make.

Base URLhttps://app.drinbooking.gr/api/v1OpenAPI 3.1 (JSON)

Overview

  • Accounting and invoicing

    Appointments that happened and were paid, with their price, in your accountant's software.

  • CRM and website

    Customers from your form become customers in Drin, each one once.

  • Calendar sync

    A copy of the appointments elsewhere that stays exact with a few calls.

  • Zapier and Make

    Every call is plain REST with JSON: it fits any automation tool.

Keys and scopes

  1. The business's owner makes a key in the app, in Settings → API, and chooses what it may do. The key is shown once only: store it straight away.
  2. The API is an extra: it comes with Premium, and Drin switches it on for other plans on request.
  3. Send the key with every call: Authorization: Bearer drin_live_…
  4. A key belongs to one business and acts as the owner who made it: the same rules as the app apply. It stops working once revoked, once its maker is no longer an owner, or once the business loses the extra.

Keys are secret. Use them only from a server, never in a web page or a mobile app: whoever has the key sees the business's customers.

Make a key in the app

Scopes

ScopeAllows
business:readThe business's details (GET /business).
catalog:readServices and the team (GET /services, /staff).
customers:readReading customers, and deleted customers in /deletions.
customers:writeAdding, changing and deleting customers.
appointments:readReading appointments, and deleted appointments in /deletions.
appointments:writeBooking, changing, cancelling and deleting appointments.

Conventions

Times
Every time is ISO 8601. Answers are in UTC (Z); send UTC or a time with an offset (+02:00). The business's time zone is in GET /business.
Pages
Lists return data and nextCursor, oldest change first. Send nextCursor as cursor for the next page; on the last it is null. limit up to 200, 100 otherwise.
Only what changed
updatedSince returns what changed since then (that moment included). Deletions are at /deletions?since= for 30 days.
No duplicates
Give an externalId (your own id) when adding: the same call again returns the record already there, with created: false.
Rate limit
120 calls a minute per key. Above that: 429 with Retry-After in seconds.
Errors
An HTTP status and JSON with error, a code that does not change (e.g. missing_scope, not_found, invalid_request with issues).
Call log
The owner sees every call of every key in Settings → API, with its result, for 30 days.

A page

{
  "data": [ { "id": "…", "updatedAt": "2026-11-13T09:41:07.312Z", … } ],
  "nextCursor": "MTc2MzAyNjg2NzMxMnwz…"
}

An error

HTTP/1.1 403 Forbidden
{ "error": "missing_scope", "scope": "customers:write" }

Guides

1. First call

Put the key in an environment variable (DRIN_KEY) and ask for the business's details. The answer also tells you what the key may do.

curl https://app.drinbooking.gr/api/v1/business \
  -H "Authorization: Bearer $DRIN_KEY"
const res = await fetch('https://app.drinbooking.gr/api/v1/business', {
  headers: { Authorization: `Bearer ${process.env.DRIN_KEY}` },
});
const { business } = await res.json();
console.log(business.name, business.scopes);
import os, requests

res = requests.get(
    "https://app.drinbooking.gr/api/v1/business",
    headers={"Authorization": f"Bearer {os.environ['DRIN_KEY']}"},
)
res.raise_for_status()
print(res.json()["business"]["name"])

2. Syncing

The first time, read the whole list, a page at a time. Keep the largest updatedAt you saw. Next time, ask only for what changed since, and for deletions from /deletions. The same works for customers.

# What changed since the last sync (oldest change first, a page at a time)
curl "https://app.drinbooking.gr/api/v1/appointments?updatedSince=2026-11-13T08:00:00Z&limit=200" \
  -H "Authorization: Bearer $DRIN_KEY"

# The next page: the nextCursor of the one before
curl "https://app.drinbooking.gr/api/v1/appointments?updatedSince=2026-11-13T08:00:00Z&limit=200&cursor=MTc2Mz..." \
  -H "Authorization: Bearer $DRIN_KEY"

# What was deleted since then
curl "https://app.drinbooking.gr/api/v1/deletions?since=2026-11-13T08:00:00Z" \
  -H "Authorization: Bearer $DRIN_KEY"
const BASE = 'https://app.drinbooking.gr/api/v1';
const headers = { Authorization: `Bearer ${process.env.DRIN_KEY}` };

// lastSync: the largest updatedAt you saw last time (store it between runs).
async function syncAppointments(lastSync) {
  let cursor = null;
  let newest = lastSync;
  do {
    const url = new URL(`${BASE}/appointments`);
    url.searchParams.set('limit', '200');
    if (lastSync) url.searchParams.set('updatedSince', lastSync);
    if (cursor) url.searchParams.set('cursor', cursor);
    const res = await fetch(url, { headers });
    if (res.status === 429) { await new Promise((r) => setTimeout(r, 60_000)); continue; }
    const page = await res.json();
    for (const a of page.data) {
      await saveLocally(a); // insert or update by a.id
      if (!newest || a.updatedAt > newest) newest = a.updatedAt;
    }
    cursor = page.nextCursor;
  } while (cursor);

  if (lastSync) {
    const res = await fetch(`${BASE}/deletions?since=${encodeURIComponent(lastSync)}`, { headers });
    for (const d of (await res.json()).data) await deleteLocally(d.type, d.id);
  }
  return newest; // keep it for the next run
}
import os, time, requests

BASE = "https://app.drinbooking.gr/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['DRIN_KEY']}"}

def sync_appointments(last_sync):
    """last_sync: the largest updatedAt seen last time (None the first time)."""
    cursor, newest = None, last_sync
    while True:
        params = {"limit": 200}
        if last_sync: params["updatedSince"] = last_sync
        if cursor: params["cursor"] = cursor
        res = requests.get(f"{BASE}/appointments", headers=HEADERS, params=params)
        if res.status_code == 429:
            time.sleep(int(res.headers.get("Retry-After", 60))); continue
        page = res.json()
        for a in page["data"]:
            save_locally(a)  # insert or update by a["id"]
            newest = max(newest or "", a["updatedAt"])
        cursor = page["nextCursor"]
        if not cursor: break
    if last_sync:
        gone = requests.get(f"{BASE}/deletions", headers=HEADERS, params={"since": last_sync}).json()
        for d in gone["data"]: delete_locally(d["type"], d["id"])
    return newest

3. Booking an appointment

First the customer, then the appointment. With an externalId on both, a call made again (after a timeout, say) adds nothing twice. The appointment goes in as when the owner adds it: the customer gets the reminders the business has set.

# 1. The customer, once: the same externalId again returns the one already there
curl -X POST https://app.drinbooking.gr/api/v1/customers \
  -H "Authorization: Bearer $DRIN_KEY" -H "Content-Type: application/json" \
  -d '{"externalId": "crm-1042", "firstName": "Μαρία", "lastName": "Παπαδοπούλου",
       "phone": "6912345678", "email": "maria@example.com", "consentService": true}'

# 2. The appointment, with the customer's id from step 1
curl -X POST https://app.drinbooking.gr/api/v1/appointments \
  -H "Authorization: Bearer $DRIN_KEY" -H "Content-Type: application/json" \
  -d '{"externalId": "web-88213", "customerId": "CUSTOMER_ID",
       "startsAt": "2026-11-20T16:00:00+02:00", "durationMinutes": 45,
       "serviceId": "SERVICE_ID", "note": "Από την ιστοσελίδα"}'
const BASE = 'https://app.drinbooking.gr/api/v1';
const headers = { Authorization: `Bearer ${process.env.DRIN_KEY}`, 'Content-Type': 'application/json' };
const post = async (path, body) => {
  const res = await fetch(BASE + path, { method: 'POST', headers, body: JSON.stringify(body) });
  const data = await res.json();
  if (!res.ok) throw new Error(`${res.status} ${data.error}`);
  return data;
};

const { customer } = await post('/customers', {
  externalId: 'crm-1042', firstName: 'Μαρία', lastName: 'Παπαδοπούλου',
  phone: '6912345678', email: 'maria@example.com', consentService: true,
});
const { appointment, created } = await post('/appointments', {
  externalId: 'web-88213', customerId: customer.id,
  startsAt: '2026-11-20T16:00:00+02:00', durationMinutes: 45,
});
console.log(created ? 'Booked' : 'Already there', appointment.id, appointment.status);
import os, requests

BASE = "https://app.drinbooking.gr/api/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['DRIN_KEY']}"}

def post(path, body):
    res = requests.post(BASE + path, headers=HEADERS, json=body)
    if not res.ok:
        raise RuntimeError(f"{res.status_code} {res.json().get('error')}")
    return res.json()

customer = post("/customers", {
    "externalId": "crm-1042", "firstName": "Μαρία", "lastName": "Παπαδοπούλου",
    "phone": "6912345678", "email": "maria@example.com", "consentService": True,
})["customer"]
result = post("/appointments", {
    "externalId": "web-88213", "customerId": customer["id"],
    "startsAt": "2026-11-20T16:00:00+02:00", "durationMinutes": 45,
})
print(result["created"], result["appointment"]["status"])

Reference

Every call of the API, from its OpenAPI document. openapi.json

Business

The business the key belongs to.

get/businessThe business

Scope: business:read

Returns

  • business → Business

Responses

  • 200The record.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/business" \
  -H "Authorization: Bearer $DRIN_KEY"

Catalog

What the business offers and who works there.

get/servicesServices

Everything that can be booked.

Scope: catalog:read

Returns

  • data Service[]

Responses

  • 200Every service.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/services" \
  -H "Authorization: Bearer $DRIN_KEY"
get/staffStaff

Scope: catalog:read

Returns

  • data Staff[]

Responses

  • 200Everyone on the team.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/staff" \
  -H "Authorization: Bearer $DRIN_KEY"

Customers

The business's customers.

get/customersList customers

Scope: customers:read

Parameters

FieldInTypeDescription
limitqueryintegerHow many to return.min 1, max 200, default 100
cursorquerystringThe nextCursor of the page before.
updatedSincequerystring (date-time)Only records changed at or after this time (inclusive). Keep the largest updatedAt you have seen and pass it next time.
externalIdquerystringOnly the customer with this externalId.

Returns

  • data Customer[]
  • nextCursor string | null · Pass as cursor for the next page; null on the last.

Responses

  • 200One page, oldest change first.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/customers" \
  -H "Authorization: Bearer $DRIN_KEY"
post/customersAdd a customer

With an externalId already used, nothing is added: the existing customer comes back with created: false (status 200), so a retried call is safe.

Scope: customers:write

Body (JSON)

FieldTypeDescription
externalIdstringYour id for them; unique in the business.
firstNamerequiredstringmax length 80
lastNamestringmax length 80
phonestringA mobile, Greek or international.
emailstring (email)
birthdaystringMM-DD or YYYY-MM-DD.
gender"male" | "female"
consentServiceboolean
consentMarketingboolean
notesstringmax length 2000
priceCentsinteger | nullmin 0

Returns

  • customer → Customer
  • created boolean

Responses

  • 200Already there (same externalId).
  • 201Added.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 409external_id_taken.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X POST "https://app.drinbooking.gr/api/v1/customers" \
  -H "Authorization: Bearer $DRIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"firstName":"Μαρία","externalId":"crm-1042"}'
get/customers/{id}A customer

Scope: customers:read

Parameters

FieldInTypeDescription
idrequiredpathstring

Returns

  • customer → Customer

Responses

  • 200The record.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/customers/ID" \
  -H "Authorization: Bearer $DRIN_KEY"
patch/customers/{id}Change a customer

Only the fields sent change.

Scope: customers:write

Parameters

FieldInTypeDescription
idrequiredpathstring

Body (JSON)

FieldTypeDescription
externalIdstringYour id for them; unique in the business.
firstNamestringmax length 80
lastNamestringmax length 80
phonestringA mobile, Greek or international.
emailstring (email)
birthdaystringMM-DD or YYYY-MM-DD.
gender"male" | "female"
consentServiceboolean
consentMarketingboolean
notesstringmax length 2000
priceCentsinteger | nullmin 0

Returns

  • customer → Customer

Responses

  • 200The record.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 409external_id_taken.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X PATCH "https://app.drinbooking.gr/api/v1/customers/ID" \
  -H "Authorization: Bearer $DRIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"confirmed"}'
delete/customers/{id}Delete a customer

With appointments ahead, 409 has_bookings and their count; send ?force=true to delete them too.

Scope: customers:write

Parameters

FieldInTypeDescription
idrequiredpathstring
forcequeryboolean

Responses

  • 200Deleted.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 409has_bookings.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X DELETE "https://app.drinbooking.gr/api/v1/customers/ID" \
  -H "Authorization: Bearer $DRIN_KEY"

Appointments

Appointments, and seats in group classes.

get/appointmentsList appointments

Scope: appointments:read

Parameters

FieldInTypeDescription
limitqueryintegerHow many to return.min 1, max 200, default 100
cursorquerystringThe nextCursor of the page before.
updatedSincequerystring (date-time)Only records changed at or after this time (inclusive). Keep the largest updatedAt you have seen and pass it next time.
fromquerystring (date-time)Starting at or after.
toquerystring (date-time)Starting before.
customerIdquerystring
externalIdquerystring

Returns

  • data Appointment[]
  • nextCursor string | null · Pass as cursor for the next page; null on the last.

Responses

  • 200One page, oldest change first.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/appointments" \
  -H "Authorization: Bearer $DRIN_KEY"
post/appointmentsBook an appointment

Added as the owner adds one in the app: the customer's reminders follow the business's settings, and the staff member is told. The same externalId again returns the one already there (created: false).

Scope: appointments:write

Body (JSON)

FieldTypeDescription
externalIdstringYour id for it; unique in the business.
customerIdrequiredstring
startsAtrequiredstring (date-time)Start, with an offset or Z.
durationMinutesintegerDefault: the business's fixed length, else 30.min 5, max 600
serviceIdstring | null
staffIdstring | null
priceCentsinteger | nullDefault: the customer's own price.min 0
notestring | nullmax length 2000

Returns

  • appointment → Appointment
  • created boolean

Responses

  • 200Already there (same externalId).
  • 201Booked.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404customer_not_found, staff_not_found or service_not_found.
  • 409external_id_taken.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X POST "https://app.drinbooking.gr/api/v1/appointments" \
  -H "Authorization: Bearer $DRIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"customerId":"CUSTOMER_ID","startsAt":"2026-11-20T16:00:00+02:00","externalId":"crm-1042"}'
get/appointments/{id}An appointment

Scope: appointments:read

Parameters

FieldInTypeDescription
idrequiredpathstring

Returns

  • appointment → Appointment

Responses

  • 200The record.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/appointments/ID" \
  -H "Authorization: Bearer $DRIN_KEY"
patch/appointments/{id}Change an appointment

Move it, change its length, staff, service or price, mark it confirmed or cancelled (booked undoes either), or paid. A seat in a class keeps the class's time (409 class_seat).

Scope: appointments:write

Parameters

FieldInTypeDescription
idrequiredpathstring

Body (JSON)

FieldTypeDescription
externalIdstring
status"booked" | "confirmed" | "cancelled"
startsAtstring (date-time)
durationMinutesintegermin 5, max 600
serviceIdstring | null
staffIdstring | null
priceCentsinteger | null
paidbooleanPaid or unpaid (when the business marks payments).
notestring | null

Returns

  • appointment → Appointment

Responses

  • 200The record.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 409class_seat, external_id_taken, or a class that is full.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X PATCH "https://app.drinbooking.gr/api/v1/appointments/ID" \
  -H "Authorization: Bearer $DRIN_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"confirmed"}'
delete/appointments/{id}Delete an appointment

Gone for good (to keep it, cancel it instead). Its reminders not yet sent are dropped.

Scope: appointments:write

Parameters

FieldInTypeDescription
idrequiredpathstring

Responses

  • 200Deleted.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 404No such record in this business (not_found).
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl -X DELETE "https://app.drinbooking.gr/api/v1/appointments/ID" \
  -H "Authorization: Bearer $DRIN_KEY"

Sync

What was deleted, so a copy elsewhere can follow.

get/deletionsWhat was deleted

Customers and appointments deleted since a time, kept 30 days; only the kinds the key may read. Together with updatedSince on the lists, a copy elsewhere stays exact.

Scope: appointments:read

Parameters

FieldInTypeDescription
sincerequiredquerystring (date-time)
limitqueryintegermin 1, max 1000, default 500

Returns

  • data Deletion[]

Responses

  • 200Oldest first.
  • 400The request is not valid (invalid_request, with issues), or the app refused it (e.g. invalid_phone).
  • 401No key, or a key that does not exist or was revoked (invalid_key).
  • 403missing_scope, feature_off (the business no longer has the API), key_owner_left, suspended or no_plan.
  • 429More than 120 calls a minute with this key (rate_limited); wait for Retry-After seconds.

Example

curl "https://app.drinbooking.gr/api/v1/deletions?since=2026-11-13T08:00:00Z" \
  -H "Authorization: Bearer $DRIN_KEY"

Schemas

Customer

  • id string
  • externalId string | nullYour id for them.
  • firstName string
  • lastName string | null
  • phone string | nullInternational form, e.g. +306912345678.
  • email string | null
  • birthday string | nullMM-DD, or YYYY-MM-DD when the year is known.
  • gender "male" | "female" | null
  • consentService booleanAgreed to reminders about their appointments.
  • consentMarketing booleanAgreed to greetings and offers.
  • notes string | null
  • priceCents integer | nullTheir own price a visit, in cents.
  • createdAt string (date-time)When added.
  • updatedAt string (date-time)Last change.

Appointment

  • id string
  • externalId string | null
  • customerId string
  • startsAt string (date-time)Start, UTC.
  • endsAt string (date-time)End, UTC.
  • durationMinutes integer
  • status "requested" | "booked" | "confirmed" | "done" | "cancelled" | "no_show"requested waits for the business to accept an online booking.
  • serviceId string | null
  • staffId string | null
  • locationId string | null
  • classSessionId string | nullSet for a seat in a group class.
  • priceCents integer | null
  • paid boolean
  • note string | null
  • source "staff" | "online"online: booked by the customer on the booking page.
  • createdAt string (date-time)When added.
  • updatedAt string (date-time)Last change.

Business

  • id string
  • name string
  • timezone stringIANA time zone; times are UTC in the API.
  • locale "el" | "en"
  • address string | null
  • phone string | null
  • bookingSlug string | nullIts booking page: https://<bookingSlug>.drinbooking.gr
  • scopes "business:read" | "catalog:read" | "customers:read" | "customers:write" | "appointments:read" | "appointments:write"[]What this key may do.

Service

  • id string
  • name string
  • description string | null
  • durationMinutes integer
  • priceCents integer | null
  • active boolean

Staff

  • id string
  • name string
  • active boolean

Deletion

  • type "customer" | "appointment"
  • id string
  • deletedAt string (date-time)

Changelog

  • v1.0.0 · 13 November 2026

    First release: business, services, staff, customers, appointments, deletions; keys with scopes, a rate limit, a call log.

Coming: webhooks (Drin calls your URL when something changes), classes and memberships, free times.

Questions, or something missing? Write to us at info@drinbooking.gr.