> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.usepassport.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.usepassport.ai/_mcp/server.

# List access requests

GET https://api.usepassport.ai/public/v1/access-requests

Members see only their own requests. Admins see the whole team (optional `requesterId` filter). Supports `status` and `namespaceId` query filters plus cursor pagination.


Reference: https://docs.usepassport.ai/api-reference/access-requests/list-access-requests

## Authentication

- `Authorization` header (bearer token, required) — WorkOS API key (Authorization: Bearer sk_...). Scope comes from the key's permissions: a key carrying `passport:admin` has admin scope (full catalog CRUD), any other key has member scope (reads + access requests). Organization-owned keys are admin by ownership and carry no associated user; keys minted for a user carry theirs, which is what access requests and `createdBy` are attributed to.

## Request

### Query parameters

- `limit` (integer, optional, default: 50) — Page size (1–100, default 50).
- `cursor` (string, optional) — Opaque pagination cursor from a previous page's `pagination.nextCursor`.
- `zone` (string, optional) — Zone (id or name) to create in / list from, as returned by `GET /public/v1/zones`. Defaults to Production. An unknown zone returns 404, and a `zone` given more than once (or as `zone[]`) returns 400. An id always wins over a zone with the same name.
- `status` (enum, optional)
  - Allowed values: `pending`, `approved`, `rejected`, `cancelled`
- `namespaceId` (string, optional)
- `requesterId` (string, optional) — Admin only — narrow to a requester. Ignored for member keys.

## Response

### 200

OK

- `data` (list of AccessRequest, required)
- `pagination` (Pagination, required)

## Errors

### 400 Bad Request Error

The request body or query is invalid.

- `error` (ErrorError, required)

### 401 Unauthorized Error

Missing or invalid API key. Unlike every other response, this one carries no `RateLimit-*` headers: the request is rejected before a key is resolved, so there is no per-key window to report. Rejection happens at the gateway, which renders this same schema (and negotiates `application/problem+json` identically).

- `error` (ErrorError, required)

### 404 Not Found Error

Zone not found (the `zone` query parameter names no zone of the caller's organization).

- `error` (ErrorError, required)

### 429 Too Many Requests Error

Rate limit exceeded.

- `error` (ErrorError, required)

### 500 Internal Server Error

Unexpected server error.

- `error` (ErrorError, required)

### 503 Service Unavailable Error

Temporary unavailability (auth dependency down, encryption-config resolution failure, or discovery document unloadable).

- `error` (ErrorError, required)

## Types

### AccessRequest

- `id` (string, optional)
- `requesterId` (string, optional)
- `namespaceId` (string, optional)
- `status` (enum, optional)
  - Allowed values: `pending`, `approved`, `rejected`, `cancelled`
- `message` (string, optional, nullable)
- `durationDays` (enum, optional)
  - Allowed values: `7`, `30`, `90`
- `entities` (list of AccessRequestEntity, optional)
- `decisionReason` (string, optional, nullable)
- `decidedBy` (string, optional, nullable)
- `decidedAt` (datetime, optional, nullable)
- `autoApproved` (boolean, optional) — True when the system (not a human admin) decided this request.
- `createdAt` (datetime, optional, nullable)
- `updatedAt` (datetime, optional, nullable)

### Pagination

- `limit` (integer, required)
- `nextCursor` (string, required, nullable)

### ErrorError

- `code` (enum, required) — The machine-readable failure reason. Treat a value not listed here as a generic failure of the class implied by the HTTP status, and do not assume retry behaviour for it — new codes may be added.
  - Allowed values: `VALIDATION_ERROR`, `MALFORMED_JSON`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `CONFLICT`, `UNPROCESSABLE_ENTITY`, `PAYLOAD_TOO_LARGE`, `RATE_LIMITED`, `INTERNAL_ERROR`, `SERVICE_UNAVAILABLE`
- `message` (string, required)
- `details` (list of FieldError, optional)

### AccessRequestEntity

- `type` (enum, required)
  - Allowed values: `resource_group`, `resource_endpoint`
- `id` (string, required)

### FieldError

- `field` (string, optional)
- `message` (string, optional)

## Examples

**Response**

```json
{
  "data": [
    {
      "id": "d4e5f6a7-4444-5555-6666-777788889999",
      "requesterId": "user_01ABC",
      "namespaceId": "3f7c2b6e-1c2d-4a5b-9e8f-0a1b2c3d4e5f",
      "status": "pending"
    }
  ],
  "pagination": {
    "limit": 50,
    "nextCursor": null
  }
}
```

**SDK Code**

```python default
import requests

url = "https://api.usepassport.ai/public/v1/access-requests"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript default
const url = 'https://api.usepassport.ai/public/v1/access-requests';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go default
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.usepassport.ai/public/v1/access-requests"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby default
require 'uri'
require 'net/http'

url = URI("https://api.usepassport.ai/public/v1/access-requests")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.usepassport.ai/public/v1/access-requests")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.usepassport.ai/public/v1/access-requests', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp default
using RestSharp;

var client = new RestClient("https://api.usepassport.ai/public/v1/access-requests");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift default
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.usepassport.ai/public/v1/access-requests")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```