Create a booking
Books an availability window on a day for `client`, exactly as the public booking page does: the meeting is created with the window's assigned user, the client gets the confirmation email and reminders, and a CRM lead opens when the service routes to a pipeline. Answer the service's own form fields in `formData`. No captcha is needed here, so call it from your server, never from a browser. Refused with 400 when the window is already taken, starts inside the lead time, does not belong to the service, or a required field has no answer.
Books an availability window on a day for client, exactly as the public booking page does: the
meeting is created with the window's assigned user, the client gets the confirmation email and reminders,
and a CRM lead opens when the service routes to a pipeline. Answer the service's own form fields in
formData. No captcha is needed here, so call it from your server, never from a browser.
Refused with 400 when the window is already taken, starts inside the lead time, does not belong
to the service, or a required field has no answer.
Authorization
x-api-key Company API key, created under Settings > API Keys.
In: header
Header Parameters
Optional with an API key or OAuth token: leave it out and the company the key or token belongs to is used. If sent, it must be that same company, otherwise the request is refused with 403 API_KEY_WRONG_COMPANY or OAUTH_WRONG_COMPANY.
^[0-9a-fA-F]{24}$Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/bookings" \ -H "Content-Type: application/json" \ -d '{ "availabilityId": "string", "client": { "email": "[email protected]", "name": "string" }, "date": "2019-08-24", "serviceId": "string" }'{ "assignedUser": { "email": "string", "firstName": "string", "id": "string", "lastName": "string" }, "attribution": { "firstTouch": { "capturedAt": "string", "fbclid": "string", "gclid": "string", "landingPage": "string", "msclkid": "string", "referrer": "string", "ttclid": "string", "utmCampaign": "string", "utmContent": "string", "utmMedium": "string", "utmSource": "string", "utmTerm": "string" }, "lastTouch": { "capturedAt": "string", "fbclid": "string", "gclid": "string", "landingPage": "string", "msclkid": "string", "referrer": "string", "ttclid": "string", "utmCampaign": "string", "utmContent": "string", "utmMedium": "string", "utmSource": "string", "utmTerm": "string" } }, "cancellationReason": "string", "client": { "address": "string", "contactId": "string", "email": "string", "name": "string", "notes": "string", "phone": "string" }, "duration": 0, "endDateTime": "string", "formData": [ { "label": "string", "value": "string" } ], "id": "string", "service": { "id": "string", "name": "string" }, "startDateTime": "string", "status": "string", "timeZone": "string"}Cancel a booking POST
Cancels the booking and its meeting, frees the assigned user's calendar and emails the client, with the reason when one is given. Cancelling twice is refused with 400. An unknown booking returns 404.
Get a booking GET
Returns one booking: when it is, which service, who is assigned to it, the client's details with the CRM contact they were matched to, and their answers to the service's own form fields. A booking from another company returns 404.