---
# @generated by sylphx-gen. Do not edit.
title: "Revoke key in Workload tenants"
description: "`access.workload_tenants.revoke_key` (DELETE /v1/access/workload/tenants/{external_tenant_id}/keys/{key_id}): Revokes a key issued by this workload."
type: reference
product: platform
summary: "Revokes a key issued by this workload."
nav: false
---

Revokes a key issued by this workload. An already revoked key also returns HTTP 204.

- **Path** `DELETE https://api.sylphx.com/v1/access/workload/tenants/external-tenant-id/keys/key-id`
- **Scope** `access:whoami`
- **Effect** `destructive` — a successful call removes data; the CLI asks before it runs.
- **Collection** [workload_tenants](/docs/api/workload_tenants)
- **Host** `https://api.sylphx.com`

## Request

| Field | Type | What it is |
| --- | --- | --- |
| `external_tenant_id` | `string` | Workspace ID in the calling workload's namespace. Required. |
| `key_id` | `string` | Credential ID returned by create or list. Required. |

## Response

The call answers with an empty object.

## 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.

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

## Examples

**cURL**

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

**TypeScript**

```ts
await sylphx.access.workloadTenants.revokeKey({ externalTenantId: 'external-tenant-id', keyId: 'key-id' })
```

**Rust**

```rust
let mut req = sylphx::access::RevokeWorkloadTenantKeyRequest::default();
req.external_tenant_id = "external-tenant-id".to_string();
req.key_id = "key-id".to_string();
sx.access().workload_tenants().revoke_key(req).await?;
```

**MCP**

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