Getting started
Get a key, make your first call, and subscribe to webhooks.
1. Get a key
The account owner creates an API key in the back office, in the developer settings. StoreBay
sets up a test account on request (email hello@storebay.co.uk).
The plaintext is shown once at creation; only a SHA-256 hash is stored. While you build, use a
sb_test_… key from a test account (a test key made in a live account is refused). See
Authentication for the other credential types (OAuth2 client-credentials,
auth-code + PKCE for marketplace apps, and static tokens) and the full scopes table.
2. Make a call
Authenticate with a Bearer credential:
curl https://api.storebay.co.uk/v1/sites \
-H "Authorization: Bearer sb_test_…"{
"data": [
{
"id": "018f9c2a-7b3e-7c1a-9f2d-3a5b6c7d8e9f",
"object": "site",
"name": "StoreBay Croydon",
"timezone": "Europe/London",
"status": "active"
}
],
"meta": { "limit": 25, "cursor": { "next": null, "has_more": false } }
}Every response uses the { data, meta } envelope — see Conventions.
3. Subscribe to webhooks
Register an endpoint and StoreBay will POST signed, versioned events (agreement.signed,
invoice.paid, payment.succeeded, …) as they happen. See
Webhooks.
Environments
| Environment | Credential | Backing |
|---|---|---|
| Live | sb_live_… | operators.environment = 'live' |
| Test (sandbox) | sb_test_… | operators.environment = 'test' |
A test account is included in the plan and has identical RLS isolation, and there is no
parallel schema. The credential selects the environment and the base URL does not change: a
sb_test_… key works with a test account and a sb_live_… key with a live one. See
Sandbox for the full model.
Ready to build something real?
Follow Build a booking flow end to end — the full availability → contact → reservation → order → agreement → payment → subscription chain, worked end to end against this same sandbox.
This guide mirrors the canonical source in docs/api/overview.md.