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

# Get access review

> Every member's roles, teams, individually shared resources, last activity and how they joined.

Returns one row per person in your organisation, active or suspended, for a periodic access review. Agents and service accounts are left out.

Each row lists the member's roles, the teams they belong to, and `direct_access`: how many resources of each kind they hold a grant on individually, such as `{"repository": 3, "session": 12}`. It counts what they created and what was shared with them by name. Access they have through a team or a role is not counted there; see `teams` and the roles instead.

`last_active_at` is the last time the member used Wordsmith as themselves, on any surface: the apps, Slack, Teams, email, an API key or a connected app. Wordsmith records it at most once an hour. It is `null` for a member who has not used Wordsmith since Wordsmith started recording it. `inactive_since` is when the [inactivity policy](#inactivity-policy) counts their inactivity from.

`join_method` is `invite` when the member accepted an invite, with who sent it and when. Otherwise it is `other`: they joined through single sign-on, SCIM, domain auto-join, Slack or Teams.

`incomplete_member_ids` lists members whose individual grants could not be read. Their `direct_access` is `null`, not an empty count. Request the review again.

## Inactivity policy

`dormancy_policy` is your organisation's inactivity policy. When `dormant_after_days` is set, Wordsmith suspends each member in scope (`all_members`, or only members marked `is_external`) who has had no activity for that many days, once a day, and tells the members who can reactivate them. A member's inactivity counts from the latest of their last activity, when they joined, when they were last reactivated, when an admin marked them external (for an external-only policy), and when the policy was last turned on or changed (`enabled_at`).

## Authentication

Requires an API key, or an OAuth token with `directory:admin`. The caller must also be an organisation admin, or hold a role with the access review permission. `directory:admin` is never granted by default.

## Response

Returns `200` with the review.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.wordsmith.ai/api/v1/access-review" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here"
```

```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "generated_at": 1763380800000,
  "dormancy_policy": {
    "dormant_after_days": 30,
    "scope": "external_members",
    "enabled_at": 1762171200000,
    "min_dormant_after_days": 7,
    "max_dormant_after_days": 365
  },
  "members": [
    {
      "user_id": "828b17cf-5f09-4edd-bcba-9d1de130a2e6",
      "name": "Priya Shah",
      "email": "priya.shah@supplier.example.com",
      "is_suspended": false,
      "is_external": true,
      "bypasses_login_restrictions": false,
      "seat_type": "collaborator",
      "predefined_roles": ["viewer"],
      "custom_roles": [],
      "teams": ["IT support"],
      "direct_access": {"repository": 1, "session": 4},
      "last_active_at": 1763290000000,
      "inactive_since": 1763290000000,
      "joined_at": 1758000000000,
      "join_method": "invite",
      "invited_by_id": "3c1e2a4b-7d55-4b8e-9d0f-2a1b3c4d5e6f",
      "invited_by_name": "Sam Lee",
      "invited_at": 1757990000000
    }
  ],
  "incomplete_member_ids": []
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 403 | `insufficient_scope` | The OAuth token does not hold `directory:admin`. |
| 403 | `forbidden` | The caller's role does not include the access review. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.