Quickstart
Create a Test key, make a read-only request and recognise a successful result.
You need: access to your company’s Kua workspace and permission to issue an API key. This journey reads Test payroll runs; it creates no employee, draft or payment.
Create a Test key
Open the Kua dashboard, select the intended company and go to Developer → API keys. Complete the required identity confirmation and issue a Test key with payroll:read. Store the one-time secret in your secret manager.
If you cannot issue a key or the workspace is not approved, ask the company Owner or an authorised administrator to resolve access. A key with no scopes cannot read scoped endpoints. Keep this tutorial on a Test key.
Make the request
Set KUA_API_KEY in your local environment to that Test secret. Do not paste a real key into source code or commit it. Call https://api.kuahr.com; the Test key selects isolated Test records.
curl --fail-with-body https://api.kuahr.com/v1/payroll/runs \
-H "X-Api-Key: $KUA_API_KEY"// Install the official SDK first: see /sdks/node.
import { Kua } from "@kuahr/node";
const kua = new Kua({
apiKey: process.env.KUA_API_KEY!,
});
console.log(await kua.payrollRuns.list());# Install the official SDK first: see /sdks/python.
import os
from kua import Kua
with Kua(
api_key=os.environ["KUA_API_KEY"],
) as kua:
print(kua.payroll_runs.list())cURL needs no SDK. For the optional language examples, install Node or Python from npm or PyPI.
Check the response
A successful request returns HTTP 200 and a JSON array. An empty array is a valid result:
[]A non-empty array contains only this company’s Test runs. It does not include Live payroll runs. Save a redacted status/result in your integration log; do not log the API key.
Choose what to build next
Your first request is complete. Continue with a Test payroll draft, employee creation, or the Test and Live key guide. Events and webhooks require a separate, authorised Live-key integration; they are not the next step in this Test tutorial.
If the request fails
| Result | Next action |
|---|---|
| Network or TLS error | Check api.kuahr.com and local network. Keep certificate validation enabled. |
401 | Confirm the secret is present, belongs to the intended company and has not been revoked. |
403 INSUFFICIENT_SCOPE | Issue the intended scoped key with payroll:read; rotation preserves scopes rather than adding grants. |
Other 403 or approval error | Check the response code and workspace approval with the company Owner. |
429 | Use bounded backoff and jitter; see rate limits. |
| Other validation/server error | Capture the redacted status and error code; follow troubleshooting. |
Done when: api.kuahr.com returns 200 using a Test key with the intended company scope. You have verified a read, not a payment.