---
title: List API Keys
protocol: rest
method: GET
endpoint: /v1/projects/{projectId}/api-keys
description: "List all active API keys for a project."
---

# List API Keys

Returns all active (non-revoked) API keys for a project. The full key value is **never** returned after creation — only the prefix.

<Endpoint method="GET" path="/v1/projects/{projectId}/api-keys" />

## Path Parameters

<ParamField path="projectId" type="string" required>
  The project ID.
</ParamField>

## Example

<CodeGroup>
```bash cURL
curl https://api.syntext.dev/v1/projects/prj_abc123/api-keys \
  -H "Authorization: Bearer stx_abc12345_..."
```

```typescript SDK
const keys = await client.apiKeys.list('prj_abc123')
```
</CodeGroup>

### Response

```json
{
  "data": [
    {
      "id": "key_789",
      "name": "CI deploy key",
      "prefix": "stx_a1b2c3d4",
      "scope": "build",
      "lastUsedAt": "2026-07-01T09:12:00Z",
      "expiresAt": null,
      "createdAt": "2026-05-15T10:00:00Z"
    }
  ]
}
```

## Key Scopes

| Scope | Allows |
|-------|--------|
| `full` | All project operations |
| `build` | Triggering builds and deploys only |
| `read` | Read-only access |
