---
title: List access grants
description: "List your company's access grants by cursor, filtered by role, status, passport or product. Never returns a token. Needs the key switch or OAuth."
canonical: "https://www.tracepass.eu/docs/list-access-grants"
locale: en
source: "https://www.tracepass.eu/docs/list-access-grants"
---

# List access grants

> List your company's access grants by cursor, filtered by role, status, passport or product. Never returns a token. Needs the key switch or OAuth.

```http
GET /api/v1/access-grants
```

The company's access grants, newest first, by cursor. A grant is the credential a recipient (a buyer, a repairer, a recycler) uses to read the restricted part of a passport. The list never returns a token, nor any part of one.

Filters: `role`, `status` (`active`, `expired`, `revoked`), `passportId` (grants that cover that passport: company-wide, its product, or the passport itself) and `productId` (company-wide grants and grants scoped to that product). Pass the previous page's `nextCursor` as `cursor`; `nextCursor` is `null` on the last page.

**Who may call it.** An API key only when its owner switched on "May manage access grants" for that key on the Developer page (off by default; otherwise `403 access_grants_not_enabled`). An OAuth token needs the `access_grants:read` scope and an editor role or above.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `Authorization` | header | string | yes | `Bearer <token>` — either a `tp_` API key (Developer → API Keys; simplest, for server-to-server) or an OAuth 2.0 access token (Developer → OAuth Apps; for user-authorized apps, scoped + revocable). The Authentication page has the full OAuth flow and scope list. |
| `role` | query | string | no | Only grants of this role, e.g. `purchaser`. |
| `status` | query | string (active \| expired \| revoked) | no | Only grants in this state. |
| `passportId` | query | string (24 hex chars) | no | Only grants that cover this passport. |
| `productId` | query | string (24 hex chars) | no | Only company-wide grants and grants scoped to this product. |
| `limit` | query | integer | no | Page size, 1 to 100 (default 50). |
| `cursor` | query | string (24 hex chars) | no | The `nextCursor` of the previous page. |

## Examples

```bash
curl -sS "https://app.tracepass.eu/api/v1/access-grants?status=active&role=purchaser" \
  -H "Authorization: Bearer tp_REDACTED_xxxxxxxxxxxx"
```

```typescript
const res = await fetch(
  "https://app.tracepass.eu/api/v1/access-grants?status=active&role=purchaser",
  { headers: { Authorization: `Bearer ${process.env.TRACEPASS_API_KEY}` } },
);
const { data, nextCursor } = await res.json();
```

```python
import os, requests
res = requests.get(
    "https://app.tracepass.eu/api/v1/access-grants",
    params={"status": "active", "role": "purchaser"},
    headers={"Authorization": f"Bearer {os.environ['TRACEPASS_API_KEY']}"},
)
res.raise_for_status()
body = res.json()
```

## Responses

### 200 — Page of grants

```json
{
  "data": [
    {
      "id": "6650c1d2e3f4a5b6c7d8e9f0",
      "accessLevel": "restricted",
      "label": "Buyer GmbH, order 4711",
      "role": "purchaser",
      "scope": { "kind": "passports", "ids": ["6650a1b2c3d4e5f6a7b8c9d0"] },
      "purpose": null,
      "evidence": null,
      "state": "active",
      "expiresAt": null,
      "useCount": 0,
      "createdAt": "2026-06-01T09:30:00.000Z"
    }
  ],
  "nextCursor": null
}
```

### 403 — Switch off

```json
{
  "error": "access_grants_not_enabled",
  "message": "This API key may not manage access grants. Its owner can switch on 'May manage access grants' for the key on the Developer page."
}
```

## Related

- [Create an access grant](https://www.tracepass.eu/docs/create-access-grant.md)
- [Read an access grant](https://www.tracepass.eu/docs/get-access-grant.md)
