Docs
Esc

API authentication key

Every request to the HirePass API carries an API key. Create one in Workspace, send it in the Authorization header and test it with a single query.

Setup and authenticationYesNoTry againWorkspaceLog in to your account01Integrations, Build your ownCreate API key02Authorization: BearerSend the key on every request03pingApiTokenTest the connection04CheckSuccessful response?05StageTest your integration06If it failsCheck the key and headerProductionGo live07

Create an API key#

You need the Manage API keys and integrations permission. If you don't see Integrations in Workspace, ask an admin in your team to add it to your access level under Account > Team.

  1. Sign in to HirePass Workspace.
  2. Go to Integrations > Build your own (open it).
  3. Under API keys, select Add new API key.
  4. Enter an API label that says what the key is for, such as My HRIS integration.
  5. Select Create API key.

The new key shows on its card under API keys. Use the copy button on the card to copy the token. Every key starts with hp_client_token_.

Send the key with each request#

Send every API request as a POST to the GraphQL endpoint, with the key in the Authorization header as a bearer token:

POST https://api.hirepass.com/applicant
Content-Type: application/json
Authorization: Bearer hp_client_token_YOUR_API_KEY

A request without the header, or with a value that doesn't start with Bearer hp_client_token_, is refused.

Test the connection#

The pingApiToken query answers pong when the key is valid.

query Ping {
    pingApiToken
}

Response

{
  "data": {
    "pingApiToken": "pong"
  }
}

You can also run queries in the GraphQL playground. Add your key under Headers as { "Authorization": "Bearer hp_client_token_YOUR_API_KEY" } before you run a query.

Once the ping works, try View all check packages to see real data from your organisation.

Limits and errors#

Requests are rate limited, and errors come back in a standard GraphQL shape. See Rate limits and errors.

Keep your key secure#

  • Keep it secret: don't share the key or commit it to a code repository. Store it in a secret manager or an environment variable.
  • One key per integration: give each system its own key and label, so you can turn one off without affecting the others.
  • Rotate keys regularly: create a new key, move your integration to it, then switch the old key to Revoked on its card.
  • If a key is exposed: revoke it straight away and create a new one.