Authentication
API keys
A host creates a key in the Best Guest admin app under Settings → API Access and chooses a scope:
read: everyGETendpoint.write: everyGETendpoint, plus everyPOSTendpoint (create or change reservations, guests, webhooks).
The raw key (bgk_...) is shown once. Send it on every request: Authorization: bgk_xxxxxxxx (Bearer bgk_... is accepted too).
A key belongs to one workspace and can reach nothing but the partner APIs. It cannot see another workspace, and no scope changes that. It belongs to the workspace, not to the person who made it: any owner or manager can revoke it at any time, and a revoked key stops working at once, tokens made from it included.
The Chekin-compatible login
Chekin's API trades credentials for a one-hour token. The compatible API does the same, with your API key as the password:
Log in
password is your Best Guest API key. The token lasts one hour.
curl -X POST https://api.bestguest.app/api/v3/token/ \
-H "Content-Type: application/json" \
-d '{
"email": "integration@example.com",
"password": "<apiKey>"
}' Answer: HTTP 200.
Send the token as Authorization: JWT <token>. It lasts one hour; POST /api/v3/token/refresh/ with {"token": "..."} returns a new one. The token names your key and never contains it. A raw key (Authorization: JWT bgk_...) is accepted too, for a client that does not want the login step.
A wrong login answers 400 with {"non_field_errors": ["Unable to log in with provided credentials."]}, as Chekin does; a missing or expired token answers 401 with {"code": 4002, ...}.