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 URL | https://bookmycab.io |
| Format | JSON over HTTPS. Timestamps are ISO 8601. |
| Access | Read-only. Bookings are created by the automation, not through the API. |
| Who can use it | Accounts 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." } }| HTTP | code | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter is not valid. The message says which. |
| 401 | unauthorized | Missing, invalid or revoked key. |
| 403 | feature_not_enabled | API access is not on this account's plan. |
| 404 | not_found | No booking with that reference on this account. |
| 429 | rate_limited | Per-minute limit reached. Wait Retry-After seconds. |
| 429 | quota_exceeded | The plan's API call allowance for the period is used up. |
| 500 | internal_error | Something 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.
| Parameter | Description |
|---|---|
channel | Only one channel: voice, or a chat channel such as whatsapp. |
status | One of confirmed, modified, dispatched, completed, cancelled, no_show. |
automation_id | Only bookings from this automation. |
updated_since | Only bookings changed at or after this ISO 8601 time. |
limit | Page size, 1 to 100. Default 25. |
cursor | The 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
}| Field | Description |
|---|---|
id | BookMyCab booking id (UUID). |
channel | voice, or the chat channel the booking came in on, e.g. whatsapp. |
dispatch_ref | The job's reference in your dispatch system (AutoCab booking id). |
dispatch_system | Dispatch system the job went to, e.g. autocab, when recorded. |
status | confirmed, modified, dispatched, completed, cancelled, no_show. The automations currently record confirmed, modified and cancelled; the others are reserved. |
passenger_phone | Caller 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_at | Pickup time in UTC, when stored as a timestamp (chat bookings). |
pickup_time_text | Pickup time as the voice agent captured it, in UK local time with no offset, e.g. 2026-10-24T07:15. |
pickup_time_mode | asap, 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). |
bags | Number of bags (voice bookings). |
cancelled_at | When the booking was cancelled; null if it has not been. |
created_at / updated_at | When 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.
| Event | Sent when |
|---|---|
booking.confirmed | The automation books a job into dispatch. |
booking.modified | The automation changes a booking at the customer's request. |
booking.cancelled | The 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-Deliveryid; 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
| Version | Date | Changes |
|---|---|---|
| 1.0.1 | 21 October 2026 | cancelled_at recorded for WhatsApp bookings; new WhatsApp bookings carry postcode and coordinates. |
| 1.0.0 | 21 October 2026 | First release: /me, bookings list and lookup, booking webhooks. |
Questions about the API, or want it switched on for your account? Contact us.