Skip to content

Environments & conventions

EnvironmentAPIHosted sitesWeb app
Productionhttps://api.mrcharles.app/api/v1https://<slug>.sites.mrcharles.apphttps://app.mrcharles.app
Pre-productionhttps://api-pre.mrcharles.app/api/v1https://<slug>.sites-pre.mrcharles.apphttps://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.

Every response is JSON with the same shape:

success
{ "success": true, "data": { … } }
success with pagination
{ "success": true, "data": [ … ], "meta": { "page": 1, "perPage": 20, "total": 57, "totalPages": 3, "hasNextPage": true, "hasPrevPage": false } }
error
{ "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.

  • Content-Type: application/json on every request with a body.
  • Accept-Language: es (or ca, 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.

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.

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.