Environments & conventions
Base URLs
Section titled “Base URLs”| API | https://api.mrcharles.app/api/v1 |
| Hosted studio sites | https://<slug>.sites.mrcharles.app |
| Web app (lesson booking, dashboards) | https://app.mrcharles.app |
There is one environment. To develop, use a studio site in sandbox mode — the demo studio demo-studio, or your own site with test mode on. Sandbox sites return the verification code as devCode, send nothing, take no cards and purge their bookings after seven days, so an integration is built, tested and launched against the same host.
Response envelope
Section titled “Response envelope”Every response is JSON with the same shape:
{ "success": true, "data": { … } }{ "success": true, "data": [ … ], "meta": { "page": 1, "perPage": 20, "total": 57, "totalPages": 3, "hasNextPage": true, "hasPrevPage": false } }{ "success": false, "error": { "code": "SLOT_TAKEN", "message": "That slot was just taken. Pick another time." } }error.code is stable and meant for your logic; error.message is an English sentence you may show as-is. See Errors & rate limits.
Headers
Section titled “Headers”Content-Type: application/jsonon every request with a body.Accept-Language: es(orca,en) is optional; the guest’s locale for messages is set explicitly in the hold (locale).- Responses carry
X-Request-ID. Include it when you write to support. - CORS:
/public/*endpoints accept requests from any origin, without credentials (no cookies: do not usecredentials: "include"). Authenticated studio endpoints accept only the official apps — call them from your server.
Caching
Section titled “Caching”GET /public/sites/{slug} and /resolve are cacheable for 60 s (Cache-Control: public, max-age=60). Availability and everything under /public/holds and /public/bookings are no-store: always fetch fresh.
Versioning
Section titled “Versioning”The API is versioned in the path (/api/v1). We add fields without notice; we never remove or rename a field, change a status code or an error code within v1. Breaking changes ship as v2 with a migration window. Watch the changelog.