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

# List API Keys

> List all API keys for a project

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

## Query Parameters

<ParamField query="status" type="string">
  Filter by status: `active` or `revoked`
</ParamField>

<ParamField query="limit" type="number">
  Items per page (default: 20)
</ParamField>

<ParamField query="lastKey" type="string">
  Pagination cursor from previous response
</ParamField>

## Response

Returns a paginated list of API Key objects (without key values).

```json theme={null}
{
  "data": [
    {
      "id": "afd8012b-d81e-41c6-92cd-eed0c6cb3676",
      "name": "iOS Production App",
      "status": "active",
      "createdAt": "2024-03-20T10:00:00Z",
      "updatedAt": "2024-03-20T10:00:00Z",
      "lastUsed": "2024-03-21T15:30:00Z"
    }
  ],
  "pagination": {
    "limit": 20,
    "lastKey": "eyJpZCI6ImFmZDgwMTJiLWQ4MWUtNDFjNi05MmNkLWVlZDBjNmNiMzY3NiJ9"
  }
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/api-keys?status=active" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/api-keys',
    {
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  const { data, pagination } = await response.json();
  console.log(`Found ${data.length} API keys`);
  ```

  ```swift Swift theme={null}
  let url = URL(string: "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/api-keys")!
  var request = URLRequest(url: url)
  request.setValue("Bearer YOUR_JWT", forHTTPHeaderField: "Authorization")

  let (data, _) = try await URLSession.shared.data(for: request)
  let result = try JSONDecoder().decode(APIKeyListResponse.self, from: data)
  ```

  ```kotlin Kotlin theme={null}
  val response = client.get("https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/api-keys") {
      header("Authorization", "Bearer YOUR_JWT")
      parameter("status", "active")
  }

  val result = response.body<APIKeyListResponse>()
  println("Found ${result.data.size} API keys")
  ```
</CodeGroup>
