Get booking by ID with GET /api/v1/bookings/{id}
To get a booking by ID, call GET /api/v1/bookings/{id}, where {id} is the booking’s id from the bookings list. It returns the booking with its current status and the same fields as the list, and it needs a key with the bookings.read scope.
When should I get a single booking?
Section titled “When should I get a single booking?”Use it when you hold a booking’s id and want its status now.
- After a webhook event: when a new or cancelled booking event arrives, read the booking by id to confirm its status before you act on it. See webhooks.
- To follow one booking: to see whether it turned Attended or No-show after its time.
Which parameters does it take?
Section titled “Which parameters does it take?”One parameter, in the path:
| Parameter | Where | Meaning |
|---|---|---|
id | path | The booking’s id, as in the bookings list’s id |
A malformed id returns a 404, exactly like an id that does not exist.
How do I send the request?
Section titled “How do I send the request?”curl https://api.mujib.ai/api/v1/bookings/3f0c9a52-7d1e-4b8a-9c41-2e6f8a1b0d77 \ -H "Authorization: Bearer $MUJIB_API_KEY"const id = '3f0c9a52-7d1e-4b8a-9c41-2e6f8a1b0d77';const res = await fetch(`https://api.mujib.ai/api/v1/bookings/${encodeURIComponent(id)}`, { headers: { Authorization: `Bearer ${process.env.MUJIB_API_KEY}` },});const body = await res.json();if (res.status === 404) console.log('not in this business');else if (!res.ok) throw new Error(`${res.status} ${body.error.code}: ${body.error.message}`);else console.log(body.data.status, body.data.localTime, body.data.timezone);import osimport requests
booking_id = "3f0c9a52-7d1e-4b8a-9c41-2e6f8a1b0d77"res = requests.get( f"https://api.mujib.ai/api/v1/bookings/{booking_id}", headers={"Authorization": f"Bearer {os.environ['MUJIB_API_KEY']}"}, timeout=30,)body = res.json()if res.status_code == 404: print("not in this business")elif not res.ok: raise RuntimeError(f"{res.status_code} {body['error']['code']}: {body['error']['message']}")else: print(body["data"]["status"], body["data"]["localTime"], body["data"]["timezone"])What does the response look like?
Section titled “What does the response look like?”A 200, with the booking in data. The data is made up:
{ "data": { "id": "3f0c9a52-7d1e-4b8a-9c41-2e6f8a1b0d77", "status": "confirmed", "source": "agent", "service": "consultation", "startsAt": "2026-11-12T07:30:00Z", "localTime": "2026-11-12T10:30:00", "timezone": "Asia/Amman", "durationMinutes": 30, "branch": { "id": "e7f6a5b4-3c2d-4e1f-9a8b-7c6d5e4f3a21", "name": "الفرع الرئيسي" }, "specialist": "ليلى", "customer": { "contactId": "5d8f2a61-0c4e-4b7a-9f13-6e2b8c0d4a57", "name": "سارة", "phone": "962790000000" }, "createdAt": "2026-11-04T18:22:09.117Z" }}Each field and the values of status and source are described in list bookings. When customer.contactId is an id rather than null, read the customer with get a contact.
What does a 404 mean here?
Section titled “What does a 404 mean here?”It means your business’s API knows no booking with that id:
{ "error": { "code": "NOT_FOUND", "message": "Booking not found" } }The same error comes back for an id that does not exist, an id that belongs to another business, a malformed id, and a historical row imported from an old register, which the list leaves out too. The other errors:
| HTTP | code | Why |
|---|---|---|
| 401 | UNAUTHORIZED | No key, or a key that is not valid |
| 403 | FORBIDDEN | The key lacks bookings.read |
| 429 | RATE_LIMITED | You went over a rate limit |
| 500 | INTERNAL | An unexpected server error |
Frequently asked questions
Where do I get a booking's id?
From the id field in the bookings list, or from the booking event a webhook sends you.
Can I change or cancel a booking with this request?
No. The API is read-only. Changes and cancellations happen in the dashboard calendar.
Why do I get a 404 for a booking I can see in the dashboard?
If it is a historical row imported from an old register, it is not part of the API. Otherwise, check that the key belongs to the same business and that the id is complete.