The server API is for code that runs on a server: a website's back end, a CMS plugin, a script or another app. It uses a secret API key that the business makes itself in the BeniBrain dashboard, so nobody at BeniBrain needs to be involved.
Getting a key
- In BeniBrain, open Settings → Developers → API keys.
- Click Make a key, name it (for example "My website") and choose Read only or Read and write.
- Copy the key straight away. It's shown once; BeniBrain only keeps a hash of it.
Keys start with bb_sk_. A business can have up to 10, see when each was last used, and revoke any of them at once. Keep keys on your server: the API doesn't allow browser (CORS) requests, so a key can't be used from a web page. To show services, free times or the shop in the browser, use the public storefront and booking endpoints with the business's public key instead (see Overview & auth).
Authentication
Send the key as a bearer token on every request. X-API-Key also works.
curl "https://benibrain.com/api/v1/bookings?from=2026-11-16&to=2026-11-23" \
-H "Authorization: Bearer bb_sk_your_key_here"Endpoints
Base URL: https://benibrain.com/api. Every response is JSON and every request is limited to the key's own business.
| Method | Path | What it does |
|---|---|---|
GET | /v1/business | The business's name, website, country, currency, time zone and public key. |
GET | /v1/services | Active services with price, length, deposit and images. |
GET | /v1/services/{id} | One service. |
GET | /v1/products | Active products with price, SKU, image and stock (when tracked). Paged. |
GET | /v1/products/{id} | One product. |
GET | /v1/bookings | Bookings, oldest first. Filters: from, to (by start time), status (comma-separated), customerId. Paged. |
GET | /v1/bookings/{id} | One booking. |
GET | /v1/orders | Shop orders, newest first. Filters: from, to (by created time), status. Paged. |
GET | /v1/orders/{id} | One order with its items. |
GET | /v1/customers | Customers, newest first. Filter: search (name, email or phone). Paged. |
GET | /v1/customers/{id} | One customer. |
POST | /v1/customers | Add a customer, or update the one with that email. Needs a read and write key. |
POST | /v1/enquiries | Send a contact-form message to the business's Inbox. Needs a read and write key. |
Lists and dates
Lists return { "data": [...], "limit": 50, "offset": 0 }. Use limit (1–200, default 50) and offset to page through. Dates accept 2026-11-20 or a full time like2026-11-20T09:00:00Z; times in responses are ISO 8601 in UTC. Prices are in the business's currency as normal amounts (for example 45 for £45.00).
Adding customers
POST /v1/customers takes email (required), name, phone, address, notes and tags. Email is the key: if a customer with that email exists, their record is updated (notes are added, tags are merged) rather than duplicated.
curl -X POST "https://benibrain.com/api/v1/customers" \
-H "Authorization: Bearer bb_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Sam Lee","email":"sam@example.com","phone":"07700 900123","tags":["newsletter"]}'Contact forms
POST /v1/enquiries takes name, email (required), message (required), and optionally phone and subject. It creates or finds the customer and opens a new conversation in the business's Inbox, and fires the conversation.created and message.received webhooks. When the business replies from the Inbox, the reply is emailed to the customer.
curl -X POST "https://benibrain.com/api/v1/enquiries" \
-H "Authorization: Bearer bb_sk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name":"Sam Lee","email":"sam@example.com","subject":"Quote","message":"Can you service a ride-on mower next week?"}'Errors and limits
| Status | Meaning |
|---|---|
400 | Something in the request is wrong. The error message says what. |
401 | No key, a malformed key, or a key that's been revoked. |
403 | A read-only key tried to change something, or the business's account isn't active. |
404 | Not found, or it belongs to a different business. |
429 | More than 120 requests in a minute with one key. Wait for the Retry-After seconds. |
Staying up to date
Rather than asking repeatedly for new bookings or orders, register a webhook in Settings → Developers → Webhooks and BeniBrain will tell your server the moment something changes. See Webhooks.