Base URLs
Use the base URL for your Guardhouse region:Authentication
All read endpoints expect a JWT bearer token sent asAuthorization: Bearer <token>.
Authentication is a two-step flow:
1. Obtain a token — POST your API key to POST /api/external/token/request:
accessToken valid for 60 minutes:
Generating an API key
API keys are generated inside the Guardhouse web app. You need SuperAdmin access to do this.- Log in to the Guardhouse web app.
- Go to Organization → Company Settings.
- Open the Guardhouse API & Integrations tab.
- Select the Guardhouse API sub-tab.
- Find the API type you need and click Generate API Key:
The generated key is shown immediately in the field next to the button. Copy and store it securely — it is not shown again after you navigate away.
Request headers
Every API request requires two headers:Scopes and key types
Every API key is issued with aKeyType that controls which endpoints it can call:
All Staff endpoints (
/api/external/staffs*) require a developer API key. The remaining
read endpoints (/api/external/customers, /api/external/sites) require any authenticated
Public key.
All are scoped by your CompanyId, CustomerId, and SiteId claims.
Calling an endpoint with the wrong KeyType returns 403 Forbidden. Keys are also scoped
by CompanyId, CustomerId, and SiteId claims — passing IDs outside that scope is also
rejected with 403.
Response envelope
Every JSON endpoint returns the same wrapper:/api/external/timesheets, /api/external/staffs,
/api/external/customers, /api/external/sites) use a slimmer cursor envelope:
isSuccess, numeric status,
statusMessage, errorMessages, and errorMessagesAsString fields.
See the Errors guide for the meaning of status.code and the
shape of the errors array.
Pagination
List endpoints use cursor-based pagination. To page forward:- Issue the initial request with
direction=next(the default). - Read the last item’s identifier from
data(typicallyincidentReportId). - Pass that value as
referenceIdon the next request, keepingdirection=next.
direction=prev and pass referenceId from the first item.
The response’s nextPageParams and prevPageParams give you the exact query string to use
for the next call — you can append them directly to the endpoint URL.
Rate limits
External and webhook endpoints are limited to 60 requests per minute per API key. Requests beyond the limit return429 Too Many Requests. The token-issuance endpoints
(/api/token/*) are not rate-limited.
Webhooks
If yourKeyType=developer key is provisioned, you can register subscribers and event
subscriptions so Guardhouse pushes notifications to your systems when reports or
timesheets change. See the Webhooks guide for the registration
flow, signature validation, and the supported event catalog.