Create a booking

POST/v1/bookings

Creates a booking and sends the customer the confirmation. If the time is taken, you get 409 with the next free time.

Parameters

  • servicestringrequired

    The id of the service, for example svc_haircut.

  • startsdatetimerequired

    Start in ISO 8601 with a time zone.

  • customerobjectrequired

    Name and email. A known email reuses the existing customer.

  • staffstringoptional

    A person from the team. Without it Atlas picks whoever is free.

  • notestringoptional

    A note for the team, up to 500 characters.

Request

const res = await fetch('https://api.atlas.example/v1/bookings', {  method: 'POST',  headers: { Authorization: `Bearer ${key}` },  body: JSON.stringify({ service: 'svc_haircut', starts, customer }),});

Response

201 Created
{  "id": "bk_7f2a",  "status": "confirmed",  "starts": "2026-10-24T15:00:00+02:00",  "confirmation_url": "https://atlas.example/b/7f2a"}