API reference

A JSON API over HTTPS. Base URL https://calmumi.com/api/v1. Machine-readable spec: openapi.json (import it into Postman, Insomnia or a client generator).

The booking flow

  1. GET /studios/{studio}: locations, services (with lengths and prices) and team.
  2. The client picks a location, a service length (a variant) and optionally a person.
  3. GET /studios/{studio}/availability: free start times for a date range.
  4. POST /studios/{studio}/bookings with the chosen start and the client’s details.
  5. Show the reference. The client gets an email with a link (manageUrl) to move or cancel.

Authentication

Reading needs no key. Studio, services and free times are public, like the studio’s booking page.

Writing from your server needs a secret key. Create one in Dashboard → Share & embed → For developers and send it as a bearer token. Requests from browsers on other sites without a key are treated as bots.

bash

curl -X POST https://calmumi.com/api/v1/studios/salon-mira/bookings \
  -H "Authorization: Bearer $CALMUMI_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 2f6c1e0a-booking-attempt-1" \
  -d '{
    "locationId": "6f1c…",
    "variantId": "9a21…",
    "start": "2026-12-07T08:00:00.000Z",
    "client": { "name": "Lena Muster", "email": "lena@example.com", "phone": "+41 79 000 00 00" },
    "language": "en"
  }'
Keep keys on the server (environment variable). A key only works for its own studio, and you can revoke it at any time.

Conventions

  • Times are ISO 8601 in UTC (2026-12-07T08:00:00.000Z). Each slot also has the studio’s local time (09:00) for display; dates (2026-12-07) are local to the studio’s timezone.
  • Money is in the smallest unit: { "amount": 6000, "currency": "CHF" } is CHF 60.00.
  • ?lang=de (or en) returns names and descriptions in that language where the studio has translated them.
  • Send an Idempotency-Key header with each booking attempt. If the network fails and you retry with the same key, you get the first booking back instead of a double booking.
  • CORS is open for reading, so the read endpoints work from browser code.

Errors

Errors have an HTTP status and a stable code. Show your own message per code; the English text is for developers.

json

{
  "error": {
    "code": "SLOT_TAKEN",
    "message": "This time was just booked. Please pick another.",
    "issues": []
  }
}

400 INVALID_REQUEST lists the bad fields in issues (path, message). On 409 SLOT_TAKEN, load availability again and let the client pick another time.

Endpoints

Studio, locations, services and team

GET/studios/{studio}

Everything a booking page needs in one call: the studio (name, logo, colour, time zone, currency), its locations, the services with their lengths and prices, and the people who can be booked online. Only what can actually be booked online is listed. Add ?lang=de for German names and descriptions.

Response

json

{
  "studio": {
    "slug": "salon-mira",
    "name": "Salon Mira",
    "logoUrl": "https://…/logo.png",
    "brandColor": "#7c3aed",
    "timezone": "Europe/Zurich",
    "currency": "CHF",
    "requireApproval": false,
    "cancelCutoffHours": 24
  },
  "locations": [
    {
      "id": "6f1c…",
      "slug": "zuerich-west",
      "name": "Zürich West",
      "street": "Hardstrasse 1",
      "zip": "8005",
      "city": "Zürich",
      "phone": "+41 44 000 00 00",
      "email": null
    }
  ],
  "services": [
    {
      "id": "0b7e…",
      "slug": "haircut",
      "name": "Haircut",
      "description": "Wash, cut and style.",
      "category": "Hair",
      "variants": [
        {
          "id": "9a21…",
          "durationMin": 45,
          "price": {
            "amount": 6000,
            "currency": "CHF"
          }
        },
        {
          "id": "4c88…",
          "durationMin": 60,
          "price": {
            "amount": 7500,
            "currency": "CHF"
          }
        }
      ],
      "locationIds": [
        "6f1c…"
      ],
      "staffIds": [
        "d2f0…"
      ]
    }
  ],
  "staff": [
    {
      "id": "d2f0…",
      "slug": "anna",
      "name": "Anna",
      "bio": "Colour specialist.",
      "photoUrl": null,
      "color": "#f59e0b",
      "locationIds": [
        "6f1c…"
      ],
      "serviceIds": [
        "0b7e…"
      ]
    }
  ]
}

Errors

StatusCode
404STUDIO_NOT_FOUNDNo studio with this slug.
404STUDIO_NOT_AVAILABLEThe studio has no active plan.

Free times

GET/studios/{studio}/availability

Free start times for one service length (variant) at one location, for every local day from from to to (at most 31 days). Leave out staff for “anyone”: each slot lists who is free. Times respect working hours, time off, other bookings with their buffers, and the studio’s notice and advance limits.

Query

FieldType
variantstring (uuid)requiredService variant id (a length/price option of a service).
locationstring (uuid)requiredLocation id.
staffstring (uuid)Only this person. Leave out for "anyone".
fromstringrequiredFirst local date.
tostringLast local date (inclusive), at most 31 days after `from`. Defaults to `from`.

Response

json

{
  "timezone": "Europe/Zurich",
  "days": [
    {
      "date": "2026-12-07",
      "slots": [
        {
          "start": "2026-12-07T08:00:00.000Z",
          "time": "09:00",
          "staffIds": [
            "d2f0…"
          ]
        },
        {
          "start": "2026-12-07T08:15:00.000Z",
          "time": "09:15",
          "staffIds": [
            "d2f0…"
          ]
        }
      ]
    },
    {
      "date": "2026-12-08",
      "slots": []
    }
  ]
}

Errors

StatusCode
400INVALID_REQUESTA parameter is missing or invalid.
400RANGE_TOO_LONGMore than 31 days.
404NOT_OFFERED_HEREThe service isn’t offered at this location.
404STAFF_NOT_AVAILABLEThis person doesn’t offer the service here.

Book

POST/studios/{studio}/bookingssecret key from servers

Books a start from the availability response. With no staffId (“anyone”), the free person with the fewest bookings that day gets it. The client is found by email (or phone) or added. Status is confirmed, or requested when the studio confirms bookings itself. The client gets a confirmation email with a link to view, move or cancel; the studio is notified.

Body (JSON)

FieldType
variantIdstring (uuid)required
locationIdstring (uuid)required
staffIdstring (uuid)Leave out or null for "anyone": the person with the fewest bookings that day gets it.
startstring (date-time)requiredA `start` value from the availability response.
clientobjectrequired
notestringMessage from the client to the studio.
marketingConsentboolean

Headers

Header
Idempotency-KeyOptional but recommended: any unique string per booking attempt. Sending the same key again returns the first booking instead of creating a second one.
AuthorizationBearer cm_sk_… — required when calling from a server.

Response

json

{
  "reference": "K7QX2M",
  "status": "confirmed",
  "start": "2026-12-07T08:00:00.000Z",
  "end": "2026-12-07T08:45:00.000Z",
  "timezone": "Europe/Zurich",
  "language": "en",
  "studio": {
    "slug": "salon-mira",
    "name": "Salon Mira",
    "logoUrl": null,
    "brandColor": "#7c3aed"
  },
  "service": {
    "id": "0b7e…",
    "name": "Haircut"
  },
  "variant": {
    "id": "9a21…",
    "durationMin": 45
  },
  "price": {
    "amount": 6000,
    "currency": "CHF"
  },
  "staff": {
    "id": "d2f0…",
    "name": "Anna"
  },
  "anyStaff": false,
  "location": {
    "id": "6f1c…",
    "name": "Zürich West",
    "street": "Hardstrasse 1",
    "zip": "8005",
    "city": "Zürich",
    "phone": "+41 44 000 00 00",
    "email": null
  },
  "client": {
    "name": "Lena Muster",
    "email": "lena@example.com",
    "phone": "+41 79 000 00 00"
  },
  "note": null,
  "cancelCutoffHours": 24,
  "canChange": true,
  "manageUrl": "https://calmumi.com/en/booking/3vQ…"
}

Errors

StatusCode
409SLOT_TAKENThe time was taken in the meantime — load availability again.
429TOO_MANY_BOOKINGSThe client already has 5 upcoming online bookings.
429RATE_LIMITEDToo many requests.
401INVALID_API_KEYUnknown or revoked key.
403BOT_DETECTEDBrowser requests from other sites: use the widget or your server.

A booking

GET/bookings/{token}

A booking by the secret token from its manage link (manageUrl). canChange tells whether the client may still move or cancel it.

Response

json

{
  "reference": "K7QX2M",
  "status": "confirmed",
  "start": "2026-12-07T08:00:00.000Z",
  "end": "2026-12-07T08:45:00.000Z",
  "timezone": "Europe/Zurich",
  "language": "en",
  "studio": {
    "slug": "salon-mira",
    "name": "Salon Mira",
    "logoUrl": null,
    "brandColor": "#7c3aed"
  },
  "service": {
    "id": "0b7e…",
    "name": "Haircut"
  },
  "variant": {
    "id": "9a21…",
    "durationMin": 45
  },
  "price": {
    "amount": 6000,
    "currency": "CHF"
  },
  "staff": {
    "id": "d2f0…",
    "name": "Anna"
  },
  "anyStaff": false,
  "location": {
    "id": "6f1c…",
    "name": "Zürich West",
    "street": "Hardstrasse 1",
    "zip": "8005",
    "city": "Zürich",
    "phone": "+41 44 000 00 00",
    "email": null
  },
  "client": {
    "name": "Lena Muster",
    "email": "lena@example.com",
    "phone": "+41 79 000 00 00"
  },
  "note": null,
  "cancelCutoffHours": 24,
  "canChange": true,
  "manageUrl": "https://calmumi.com/en/booking/3vQ…"
}

Errors

StatusCode
404BOOKING_NOT_FOUNDUnknown token.

Move a booking

POST/bookings/{token}/movesecret key from servers

Moves the booking to another free start (same service, length and location; same person unless the client chose “anyone”). Load free times with the availability endpoint first. Possible until the studio’s cancellation cutoff.

Body (JSON)

FieldType
startstring (date-time)required

Response

json

{
  "reference": "K7QX2M",
  "status": "confirmed",
  "start": "2026-12-07T08:00:00.000Z",
  "end": "2026-12-07T08:45:00.000Z",
  "timezone": "Europe/Zurich",
  "language": "en",
  "studio": {
    "slug": "salon-mira",
    "name": "Salon Mira",
    "logoUrl": null,
    "brandColor": "#7c3aed"
  },
  "service": {
    "id": "0b7e…",
    "name": "Haircut"
  },
  "variant": {
    "id": "9a21…",
    "durationMin": 45
  },
  "price": {
    "amount": 6000,
    "currency": "CHF"
  },
  "staff": {
    "id": "d2f0…",
    "name": "Anna"
  },
  "anyStaff": false,
  "location": {
    "id": "6f1c…",
    "name": "Zürich West",
    "street": "Hardstrasse 1",
    "zip": "8005",
    "city": "Zürich",
    "phone": "+41 44 000 00 00",
    "email": null
  },
  "client": {
    "name": "Lena Muster",
    "email": "lena@example.com",
    "phone": "+41 79 000 00 00"
  },
  "note": null,
  "cancelCutoffHours": 24,
  "canChange": true,
  "manageUrl": "https://calmumi.com/en/booking/3vQ…"
}

Errors

StatusCode
409SLOT_TAKENThe time isn’t free.
409TOO_LATEPast the cutoff — the client has to call.
409NOT_CHANGEABLECancelled or finished.

Cancel a booking

POST/bookings/{token}/cancelsecret key from servers

Cancels the booking, until the studio’s cancellation cutoff. The client gets an email; the studio is notified.

Response

json

{
  "reference": "K7QX2M",
  "status": "cancelled",
  "start": "2026-12-07T08:00:00.000Z",
  "end": "2026-12-07T08:45:00.000Z",
  "timezone": "Europe/Zurich",
  "language": "en",
  "studio": {
    "slug": "salon-mira",
    "name": "Salon Mira",
    "logoUrl": null,
    "brandColor": "#7c3aed"
  },
  "service": {
    "id": "0b7e…",
    "name": "Haircut"
  },
  "variant": {
    "id": "9a21…",
    "durationMin": 45
  },
  "price": {
    "amount": 6000,
    "currency": "CHF"
  },
  "staff": {
    "id": "d2f0…",
    "name": "Anna"
  },
  "anyStaff": false,
  "location": {
    "id": "6f1c…",
    "name": "Zürich West",
    "street": "Hardstrasse 1",
    "zip": "8005",
    "city": "Zürich",
    "phone": "+41 44 000 00 00",
    "email": null
  },
  "client": {
    "name": "Lena Muster",
    "email": "lena@example.com",
    "phone": "+41 79 000 00 00"
  },
  "note": null,
  "cancelCutoffHours": 24,
  "canChange": false,
  "manageUrl": "https://calmumi.com/en/booking/3vQ…"
}

Errors

StatusCode
409TOO_LATEPast the cutoff.
409NOT_CHANGEABLEAlready cancelled or finished.