---
# @generated by sylphx-gen. Do not edit.
title: "List keys in Workload tenants"
description: "`access.workload_tenants.list_keys` (GET /v1/access/workload/tenants/{external_tenant_id}/keys): Lists keys issued by this workload in its named tenant, without secrets."
type: reference
product: platform
summary: "Lists keys issued by this workload in its named tenant, without secrets."
nav: false
---

Lists keys issued by this workload in its named tenant, without secrets.

- **Path** `GET https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys`
- **Scope** `access:whoami`
- **Effect** `read` — nothing is written.
- **Collection** [workload_tenants](/docs/api/workload_tenants)
- **Query** `page_size`, `page_token`
- **Host** `https://api.sylphx.com`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `external_tenant_id` | `string` | Workspace ID in the calling workload's namespace. Required. |
| `page_size` | `int32` | Defaults to 50. Values above 100 are capped. |
| `page_token` | `string` | Continuation bound to the workload grant and tenant. |

## Response

| Field | Type | What it is |
| --- | --- | --- |
| `keys` | `WorkloadTenantKey[]` | Keys issued by the workload, including revoked keys. |
| `next_page_token` | `string` | Continuation, absent after the last result. |

### WorkloadTenantKey

| Field | Type | What it is |
| --- | --- | --- |
| `key_id` | `string` | Credential ID, not its secret value. |
| `label` | `string` | Caller-supplied label. |
| `scopes` | `string[]` | Exact scopes the key carries (including a registered aggregate, if requested). |
| `created_at` | `timestamp` | Key issuance time. |
| `revoked_at` | `timestamp` | Key revocation time, absent for a live key. |

## Errors

- [`UNAUTHENTICATED`](/docs/api/errors/UNAUTHENTICATED) — No valid key or token was presented.
- [`PERMISSION_DENIED`](/docs/api/errors/PERMISSION_DENIED) — The key lacks the method's permission.
- [`RESOURCE_NOT_FOUND`](/docs/api/errors/RESOURCE_NOT_FOUND) — The named Resource does not exist or is not visible.
- [`PAGE_TOKEN_MISMATCH`](/docs/api/errors/PAGE_TOKEN_MISMATCH) — A page token was reused with different parameters.

Every error arrives in the body [Errors](/docs/platform/errors) describes.

## Examples

**cURL**

```curl
curl "https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys" \
  -H "Authorization: Bearer $SYLPHX_API_KEY"
```

**TypeScript**

```ts
const response = await sylphx.access.workloadTenants.listKeys({ externalTenantId: 'external-tenant-id' })
```

**Rust**

```rust
let mut req = sylphx::access::ListWorkloadTenantKeysRequest::default();
req.external_tenant_id = "external-tenant-id".to_string();
let response = sx.access().workload_tenants().list_keys(req).await?;
```

**MCP**

```json
{ "method_id": "access.workload_tenants.list_keys", "args": {"external_tenant_id":"external-tenant-id"} }
```
