Get an API key
API keys are issued by Office Hours. Ask your Office Hours representative for one. Each key belongs to your organization and comes with a set of scopes that decide which endpoints it can call. Treat your key like a password. Store it in an environment variable or a secrets manager, and never commit it to source control.Make your first request
Send your key as a bearer token in theAuthorization header. This request returns the IDs of your company’s consultations.
GET /v0/consultations/{id}. A missing or invalid key returns 401 UNAUTHENTICATED.
Pagination
Most list endpoints return one page at a time. Each response hasdata for the page, total for the number of matches across all pages, and nextPageInfo.
To get the next page, pass nextPageInfo.nextCursor as the cursor parameter. When nextCursor is null, you’ve reached the last page. Use pageSize to choose how many results come back, up to 100.
Scopes
Every endpoint requires one scope, such asconsultations.read or projects.write. You’ll find it under Required scope on each endpoint’s reference page. Calling an endpoint your key isn’t scoped for returns 403 FORBIDDEN.
To add or remove scopes on a key, contact your Office Hours representative.
Rate limits
Each endpoint has its own rate limit, listed on its reference page. Limits apply to your whole organization, so all of your API keys share them. When you go over a limit, the API returns429 RATE_LIMITED with a Retry-After header. Wait that many seconds before you try again.
Next steps
Errors
See how errors are returned and which ones are safe to retry.
Webhooks
Get notified when consultations, projects, and prospects change.