Environments & conventions
Base URLs
Section titled “Base URLs”| Environment | API | Hosted sites | Web app |
|---|---|---|---|
| Production | https://api.mrcharles.app/api/v1 | https://<slug>.sites.mrcharles.app | https://app.mrcharles.app |
| Pre-production | https://api-pre.mrcharles.app/api/v1 | https://<slug>.sites-pre.mrcharles.app | https://app-pre.mrcharles.app |
Use pre-production to develop. Studios there are test data; SMS and email codes are echoed back in the hold response as devCode when no delivery provider is configured, so you can automate end-to-end tests.
All examples in these docs use production paths; swap the host for PRE.
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. 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.