# Revoke a mailbox credential

Revokes an existing password or app password, closing its active sessions. Self-service: the mailbox's own bearer may revoke its own APP passwords (a login password answers 404 to it, exactly like a missing id).

## `DELETE /api/v1/identities/{identityId}/credentials/{credentialId}`

### Path parameters

- `identityId` (string, required) — Mailbox identity ULID
- `credentialId` (string, required) — Credential ULID identifier

### Responses

**200** — Revocation result

`application/json` → RevokedResult

- `revoked` (boolean, required) — True if the key or credential was successfully revoked

**401** — unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge

`application/json` → ErrorBody

**404** — Mailbox or credential not found

`application/json` → ErrorBody

**503** — temporary_failure (with Retry-After): under the object directory, the account's identity census could not be updated just now, so the write that would move it was not made; retry the same request after the Retry-After window (a revocation that would take push subscriptions with it)

`application/json` → ErrorBody

### Example request

```bash
curl -X DELETE 'https://api.open.email/api/v1/identities/{identityId}/credentials/{credentialId}' \
  -H 'Authorization: Bearer oek_…'
```

## TypeScript SDK

[`openemail.credentials.revoke`](/docs/sdks/typescript/credentials/revoke)

```ts
const revokedResult = await openemail.credentials.revoke(identityId, credentialId)
```
