Skip to main content
The Guardhouse API gives external systems programmatic access to your incident reports, live operations, timesheets, staff, customers, sites, and webhook event subscriptions. It is a JSON REST API over HTTPS, secured with short-lived JWT bearer tokens that you obtain by exchanging an API key.

Base URLs

Use the base URL for your Guardhouse region:

Authentication

All read endpoints expect a JWT bearer token sent as Authorization: Bearer <token>. Authentication is a two-step flow: 1. Obtain a token — POST your API key to POST /api/external/token/request:
A successful response returns an accessToken valid for 60 minutes:
2. Send the token — include it as a bearer token on every subsequent request:
Re-issue a new token before it expires — there is no refresh mechanism.

Generating an API key

API keys are generated inside the Guardhouse web app. You need SuperAdmin access to do this.
  1. Log in to the Guardhouse web app.
  2. Go to Organization → Company Settings.
  3. Open the Guardhouse API & Integrations tab.
  4. Select the Guardhouse API sub-tab.
  5. 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 a KeyType 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:
Paginated incident-report endpoints add full cursor metadata:
The newer paginated endpoints (/api/external/timesheets, /api/external/staffs, /api/external/customers, /api/external/sites) use a slimmer cursor envelope:
The Live Operations endpoint uses its own envelope with 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:
  1. Issue the initial request with direction=next (the default).
  2. Read the last item’s identifier from data (typically incidentReportId).
  3. Pass that value as referenceId on the next request, keeping direction=next.
To page backward, set 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 return 429 Too Many Requests. The token-issuance endpoints (/api/token/*) are not rate-limited.

Webhooks

If your KeyType=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.