Studio endpoints
All paths below are under /api/v1/studios/{studioId} and need Authorization: Bearer <accessToken> from a studio member. Call them from your server — browser CORS allows only our own apps. See Studio back office for the how-to.
Website
Section titled “Website”| Endpoint | Role | Notes | |
|---|---|---|---|
| GET | /site | member | Current configuration, domain state, preview URL |
| PUT | /site | owner · manager | Partial update: template, theme, sections, content, legal, seo, defaultLocale, locales |
| POST | /site/publish | owner · manager | Requires a verified studio and a complete checklist |
| POST | /site/unpublish | owner · manager | Public endpoints start answering 404 SITE_NOT_LIVE |
| GET | /site/preview | owner · manager | Signed URL that renders a draft |
| GET | /site/checklist | owner · manager | { items[], done, total, canPublish } |
Custom domain
Section titled “Custom domain”| Endpoint | Notes | |
|---|---|---|
| PUT | /site/domain | {"domain":"studiouno.com"} → returns the DNS records to create |
| POST | /site/domain/verify | Checks the TXT record; 409 DOMAIN_UNVERIFIED means “not visible yet” |
{ "domain": "studiouno.com", "cnameTarget": "sites.mrcharles.app", "aRecord": "203.0.113.10", "txtName": "_mrcharles-verify.studiouno.com", "txtValue": "mc-verify-9f3c…"}Room booking policy
Section titled “Room booking policy”| Endpoint | Notes | |
|---|---|---|
| GET | /site/rooms | Every room with its policy and blockers[] |
| GET | /rooms/{roomId}/booking-settings | One room |
| PUT | /rooms/{roomId}/booking-settings | Full replacement of the policy |
{ "onlineEnabled": true, "minMinutes": 60, "maxMinutes": 240, "stepMinutes": 30, "paymentModes": ["card", "on_site"], "depositPercent": 30, "cancelNoticeHours": 24, "instructions": { "es": "Llama al timbre 2.", "en": "Ring bell 2." }, "photos": ["https://…/room-1.jpg"]}blockers explains why a room still is not bookable: no_price, no_hours, inactive, studio_unverified, site_not_live.
Bookings
Section titled “Bookings”| Endpoint | Notes | |
|---|---|---|
| GET | /site/bookings?from&to&status | Defaults: from = today, to = +14 days. status filters one state |
| GET | /site/bookings/{bookingId} | Includes the full events[] audit trail |
| POST | /site/bookings/{bookingId}/{action} | {"note":"…"} optional |
Actions and their preconditions:
| Action | Allowed when | Effect |
|---|---|---|
mark_paid | status confirmed or completed | paymentStatus → paid |
mark_refunded | payment deposit_paid or paid | paymentStatus → refunded |
no_show | after the start time | status → no_show |
complete | after the end time | status → completed |
cancel | not already finished | status → cancelled, note becomes the reason |
note | always (note required) | Appends to the audit trail |
A wrong precondition answers 409 INVALID_STATE.
Studio-side responses add to the public booking shape: roomId, guestPhone, guestEmail, studioNotes, cancelledBy, cancelReason, confirmedAt, cancelledAt and events[] (actor, action, meta, createdAt).