For developers and AI apps
Website API with a clinic key
Call the clinic API from a clinic's own website or bot with a website key: routes, answers and errors.
Available
A clinic's own website or booking bot can get the same answers as the MCP tools over plain REST, with a website key.
Get a key
- The clinic's Owner opens Clinic setup › Website & API in Clinixa and chooses Create a key. They choose its name, branches, end date (a year at most) and calls a minute, and accept the data-sharing statement.
- Copy the secret when it is shown. It is shown only once, and Clinixa keeps only a hash of it.
- Keep the key on your website's server. Calls from a web browser, with an
Originheader, are refused.
Call the API
curl https://api.clinixaeg.com/v1/branches \
-H "Authorization: Bearer cxk_live_YOUR_KEY"The same key also works on the MCP server at https://api.clinixaeg.com/mcp.
Routes
GET /v1/me: the key's clinic, branches and tools.GET /v1/branches: the clinic and its branches, with opening hours.GET /v1/branches/{branchId}/services: services the public can book at a branch.GET /v1/branches/{branchId}/providers?serviceId=…: doctors for a service.GET /v1/branches/{branchId}/availability?serviceIds=…&doctorId=…&fromDate=YYYY-MM-DD&days=7: free times.serviceIdstakes one to ten IDs separated by commas.
Add language=ar for Arabic names and display text.
Coming later: POST routes for booking requests, questions and call-back requests, the twins of the MCP request tools. They are not available yet.
Answers
Success is 200 with JSON.
An error carries code and message:
- 400
invalid_request, with the fields to fix - 401
unauthorized: the key is missing or wrong, or it is paused, revoked or past its end date - 404
not_found - 429
rate_limited, withretryAfterSeconds - 503
temporarily_unavailable, withRetry-After
Looking after a key
The Owner can pause, resume, replace or revoke a key at any time in Clinic setup › Website & API, and sees seven days of its activity there. After a replacement the old secret keeps working for 24 hours, so you can change it on your server. The Owner is emailed when a key is created, replaced or revoked, and 14 days before it ends.
If a secret may have leaked, revoke the key and create a new one. Don't replace it: a replaced secret keeps working for 24 hours.