Create an upgrade Checkout session
Returns a freshly-created Stripe Checkout URL to upgrade the tenant off the Free plan (e.g. before adding a second project). The human pays in their own browser; the webhook upgrades the tenant. Admin-equivalent.
Returns a freshly-created Stripe Checkout URL to upgrade the tenant off the Free plan (e.g. before adding a second project). The human pays in their own browser; the webhook upgrades the tenant. Admin-equivalent.
The per-tenant API key, copied from Settings → API & integrations.
Sent as the x-api-key request header. The key is tenant-scoped and acts
with Admin-equivalent, tenant-wide access.
In: header
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/billing/checkout"{ "checkoutUrl": "string"}{ "error": { "code": "unauthorized", "message": "Missing or invalid API key." }}{ "error": { "code": "read_only", "message": "Your subscription is inactive. This action is read-only." }}Who is on site now GET
Everyone who is checked in **right now**: each open shift (checked in, not yet checked out) that is still inside the 12-hour auto-close window, oldest check-in first, paginated. Use it to answer "has Sam arrived at the job site?" before they check out — a diary entry only exists after check-out. A person who is not listed has not checked in, or has already checked out (finished shifts are in `GET /diary-entries`). An API key is **Admin-equivalent and tenant-wide**, so this returns every open shift in the tenant. The narrower in-app visibility (a Site Manager sees their sites plus their own shift; Site Crew see nobody) does not apply to a key; there is no crew-scoped API credential. **This read never writes.** A shift at or past 12 hours counts as closed and is simply left out; it is the diary reads (and an hourly job) that close it and write its `auto_closed` entry. Check-in and check-out themselves are not available over the API — shifts open and close only in the FOREMAN app.
Resolve the authenticated tenant GET
Echoes the tenant and role the presented API key resolves to. Useful as an "is my key valid?" check. Returns `401` if the key is missing/invalid.