> ## Documentation Index
> Fetch the complete documentation index at: https://docs.toku.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sync your people directory

> Keep a local directory up to date from the v2 organization-key read.

Mint an organization key with **People: Read** and **Identity: Read**. Load it server-side as `TOKU_API_KEY`. Request the people directory without an organization selector: the key supplies the organization. Store only the fields your integration needs.

```bash
curl --fail-with-body https://api.toku.com/hris/get-hris-people \
  -H "Authorization: Bearer $TOKU_API_KEY"
```

1. On `200`, parse the entire JSON array. This endpoint returns a snapshot, not a cursor or a stream of changes.
2. Upsert by `(organization, id)`, not by name or email. Copy the fields you need, for example `fullName`, `type` and `status`. Treat redacted fields as unavailable; do not assume that a missing value is a deletion request.
3. Publish the refreshed directory only after the complete snapshot has been stored. Keep the last successful snapshot on an error, including `403` if access has changed. Schedule the next read: there are no directory change webhooks.
