Developers

BookMyCab Partner API

Read the bookings your AI Voice agent and chat booking bot have written into your dispatch system, and get a signed webhook the moment one is confirmed, modified or cancelled. Version 1.0.1.

Machine-readable spec: /api/v1/openapi.json (OpenAPI 3.1).

Overview

Every BookMyCab account runs its own automation: the AI Voice agent on the booking line, the WhatsApp booking bot, or both. Each booking it confirms, modifies or cancels is written into the operator's dispatch system and recorded in BookMyCab. The Partner API gives read access to those records, scoped to one account per key.

Base URLhttps://bookmycab.io
FormatJSON over HTTPS. Timestamps are ISO 8601.
AccessRead-only. Bookings are created by the automation, not through the API.
Who can use itAccounts with API access on their plan; webhooks also need webhooks enabled. Keys and webhooks are created by an Owner or Admin.

How BookMyCab works with AutoCab

The BookMyCab Automation Engine connects to each operator's own AutoCab system through AutoCab's Booking API, using an API subscription that belongs to the operator. During a call or chat it:

  • finds and resolves the pickup and destination addresses (on WhatsApp, also from a shared location pin);
  • reads the operator's vehicle capabilities (estate, 6- and 8-seaters, wheelchair accessible);
  • prices the trip on the operator's own AutoCab tariffs and gives the customer the quote;
  • creates the booking in AutoCab once the customer confirms;
  • finds a customer's live bookings by phone number to change or cancel them;
  • when the customer asks where their cab is, gives the dispatched vehicle's details and AutoCab's live tracking link;
  • looks up arriving flights for airport pickups (on WhatsApp, the flight is also attached to the AutoCab booking).

The job then sits in AutoCab like any other booking, and drivers and controllers work it as normal. BookMyCab keeps its own record of each booking, which is what this API returns. Its dispatch_ref is the AutoCab booking id.

Authentication

Create a key in the BookMyCab dashboard under API & webhooks. The full key is shown once; BookMyCab stores only a hash of it. Send it as a bearer token on every request:

curl https://bookmycab.io/api/v1/me \
  -H "Authorization: Bearer cab_your_key"
{
  "account": { "id": "0d4e1f2a-5b6c-4d7e-8f90-a1b2c3d4e5f6", "name": "Your Cab Company" },
  "api_key": { "name": "Partner sync", "prefix": "cab_1a2b3c4d" }
}

A key only ever sees its own account's data. Revoke a key from the same dashboard page; it stops working on the next request.

Rate limits and errors

Each key may make 120 requests per clock minute. Responses carry X-RateLimit-Limit and X-RateLimit-Remaining; over the limit you get 429 with Retry-After in seconds. Every error from these endpoints uses the same body:

{ "error": { "code": "rate_limited", "message": "Rate limit is 120 requests per minute per key." } }
HTTPcodeMeaning
400invalid_requestA parameter is not valid. The message says which.
401unauthorizedMissing, invalid or revoked key.
403feature_not_enabledAPI access is not on this account's plan.
404not_foundNo booking with that reference on this account.
429rate_limitedPer-minute limit reached. Wait Retry-After seconds.
429quota_exceededThe plan's API call allowance for the period is used up.
500internal_errorSomething failed on our side. Safe to retry.

Endpoints

GET /api/v1/me

Checks a key and returns the account it belongs to (example above).

GET /api/v1/bookings

Bookings from every channel, newest change first (ordered by updated_at, then id). All parameters are optional.

ParameterDescription
channelOnly one channel: voice, or a chat channel such as whatsapp.
statusOne of confirmed, modified, dispatched, completed, cancelled, no_show.
automation_idOnly bookings from this automation.
updated_sinceOnly bookings changed at or after this ISO 8601 time.
limitPage size, 1 to 100. Default 25.
cursorThe next_cursor from the previous page, unchanged.
curl "https://bookmycab.io/api/v1/bookings?status=confirmed&limit=50" \
  -H "Authorization: Bearer cab_your_key"
{
  "data": [ { …booking… }, … ],
  "next_cursor": "WyIyMDI2LTEwLTIyVDE4OjA0OjExLjUyMzE3KzAwOjAwIiwiNmYxYzJhOWUtLi4uIl0"
}

next_cursor is null on the last page.

GET /api/v1/bookings/{dispatch_ref}

One booking, looked up by the reference your dispatch system gave the job (for AutoCab, the booking id). Returns { "data": { …booking… } }, or 404.

curl https://bookmycab.io/api/v1/bookings/4821907 \
  -H "Authorization: Bearer cab_your_key"

The booking object

Voice and chat bookings share one shape. A field the channel does not record is null; values are never guessed. Example (illustrative data):

{
  "id": "6f1c2a9e-3b7d-4e2a-9c51-0d8e4b7a2f13",
  "automation_id": "9a7b5c3d-1e2f-4a6b-8c0d-2e4f6a8b0c1d",
  "channel": "whatsapp",
  "dispatch_ref": "4821907",
  "dispatch_system": "autocab",
  "status": "confirmed",
  "passenger_name": "Sam Taylor",
  "passenger_phone": "447700900123",
  "passenger_count": 2,
  "bags": null,
  "vehicle_type": "saloon",
  "pickup": { "text": "12 High Street, Hounslow, TW3 1HE", "postcode": "TW3 1HE", "lat": 51.4678, "lng": -0.3612 },
  "destination": { "text": "Heathrow Terminal 5, TW6 2GA", "postcode": "TW6 2GA", "lat": 51.4723, "lng": -0.4887 },
  "pickup_at": "2026-10-24T05:30:00+00:00",
  "pickup_time_text": null,
  "pickup_time_mode": "later",
  "fare": { "amount": 32.5, "currency": "GBP", "text": null },
  "distance": { "value": 6.8, "unit": "Miles" },
  "driver_note": "Two cases",
  "created_at": "2026-10-22T18:04:11.52317+00:00",
  "updated_at": "2026-10-22T18:04:11.52317+00:00",
  "cancelled_at": null
}
FieldDescription
idBookMyCab booking id (UUID).
channelvoice, or the chat channel the booking came in on, e.g. whatsapp.
dispatch_refThe job's reference in your dispatch system (AutoCab booking id).
dispatch_systemDispatch system the job went to, e.g. autocab, when recorded.
statusconfirmed, modified, dispatched, completed, cancelled, no_show. The automations currently record confirmed, modified and cancelled; the others are reserved.
passenger_phoneCaller number for voice; the customer's WhatsApp number for chat.
pickup / destination{ text, postcode, lat, lng }. WhatsApp bookings made from 21:52 UK time on 21 October 2026 carry the postcode and coordinates of the address resolved in your dispatch system. Voice bookings, and earlier WhatsApp bookings, carry the text only.
pickup_atPickup time in UTC, when stored as a timestamp (chat bookings).
pickup_time_textPickup time as the voice agent captured it, in UK local time with no offset, e.g. 2026-10-24T07:15.
pickup_time_modeasap, later or airport (chat bookings).
fare{ amount, currency, text }: the fare your dispatch system quoted (chat bookings). Voice bookings do not record a fare, so it is null.
distance{ value, unit } from the dispatch quote (chat bookings).
bagsNumber of bags (voice bookings).
cancelled_atWhen the booking was cancelled; null if it has not been.
created_at / updated_atWhen BookMyCab first recorded the booking, and last changed it.

Keeping a copy in sync

Use webhooks for changes as they happen, and poll as a backstop. To poll, remember the newest updated_at you have stored, then request ?updated_since= that value and follow next_cursor until it is null. Upsert on id: the same booking reappears whenever it changes.

Webhooks

Add an HTTPS endpoint under API & webhooks in the dashboard and choose its events. The signing secret is shown once, when you add it. Endpoints must be publicly reachable; private and internal addresses are refused.

EventSent when
booking.confirmedThe automation books a job into dispatch.
booking.modifiedThe automation changes a booking at the customer's request.
booking.cancelledThe automation cancels a booking at the customer's request.

Each delivery is a POST with a JSON body:

POST /your/endpoint
Content-Type: application/json
X-BookMyCab-Event: booking.confirmed
X-BookMyCab-Delivery: evt_3f2a9c0d4b1e4f6a8c7d5e2b1a0f9e8d
X-BookMyCab-Signature: t=1792692251,v1=5b0c…

{
  "id": "evt_3f2a9c0d4b1e4f6a8c7d5e2b1a0f9e8d",
  "type": "booking.confirmed",
  "created_at": "2026-10-22T18:04:11.774Z",
  "data": { "booking": { …booking object… } }
}
  • Respond with any 2xx within 10 seconds. Do slow work after you respond.
  • Network errors, timeouts, 408, 429 and 5xx are retried after 2 and then 10 seconds: 3 attempts in total. Other responses are not retried.
  • Retries keep the same X-BookMyCab-Delivery id; use it to ignore duplicates.
  • Redirects are not followed.
  • Each delivery, with its final result and number of attempts, is listed under Recent deliveries on the dashboard page.

Verifying the signature

v1 is the hex HMAC-SHA256 of <t>.<raw request body>, keyed with your webhook secret. Compute it over the raw bytes before parsing the JSON, compare in constant time, and reject old timestamps.

// Node.js
import crypto from "node:crypto";

export function verifyBookMyCab(rawBody, header, secret, toleranceSec = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const t = Number(parts.t);
  if (!t || Math.abs(Date.now() / 1000 - t) > toleranceSec) return false;
  const expected = crypto.createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(parts.v1 ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
# Python
import hashlib, hmac, time

def verify_bookmycab(raw_body: bytes, header: str, secret: str, tolerance: int = 300) -> bool:
    parts = dict(p.split("=", 1) for p in header.split(","))
    t = int(parts.get("t", "0"))
    if abs(time.time() - t) > tolerance:
        return False
    expected = hmac.new(secret.encode(), f"{t}.".encode() + raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, parts.get("v1", ""))

Changelog

VersionDateChanges
1.0.121 October 2026cancelled_at recorded for WhatsApp bookings; new WhatsApp bookings carry postcode and coordinates.
1.0.021 October 2026First release: /me, bookings list and lookup, booking webhooks.

Questions about the API, or want it switched on for your account? Contact us.