---
search:
  tags:
    - Portfolio
    - DELETE
seo:
  description: >-
    Revokes a grant on this account, immediately… Reference for the DELETE
    /portfolio/accounts/{account_id}/grants/{grant_id} endpoint in the REST API
    API.
sidebar:
  badge: DELETE
  label: Revoke a Grant
title: Revoke a Grant
type: openapi-operation
---
Revokes a grant on this account, immediately removing that user's access — including through any API key restricted to the account. Revocation is permanent; to restore access, create a new grant.

### Endpoint

- Method and path: `DELETE /portfolio/accounts/{account_id}/grants/{grant_id}`
- Operation ID: `revokeGrant`
- API reference: [DELETE /portfolio/accounts/{account_id}/grants/{grant_id}](/api-reference/portfolio/revokegrant)

#### Authorization

- Accepted credentials: `UDX-Access-Key` header and `UDX-Access-Timestamp` header and `UDX-Access-Signature` header; or Bearer token in `Authorization`
- Details: [Authentication](/authentication)

#### Parameters

- `UDX-Version` (`header`) — Dated API version (YYYY-MM-DD). Omit to use the oldest supported version. An unknown version returns `400`.
- `UDX-Idempotency-Key` (`header`) — Optional client-generated key that makes a mutation safe to retry. Reuse it only for a byte-identical retry. When present, it is included in the request signature; omitting it disables UDX idempotency for that request.
- `account_id` (`path`, required) — The public identifier of the account whose grants are managed.
- `grant_id` (`path`, required) — The public identifier of the grant to revoke.

#### Responses

- `204` — The grant was revoked. No body is returned.
- `401` — No valid credential was provided.
- `403` — The credential lacks the `grants:manage` scope or is restricted to one account.
- `404` — The account or grant doesn't exist or isn't reachable by the caller, or the grant was already revoked.
- `409` — This key is still in use or its response cannot be replayed. The mutation may have run; check `detail` before retrying.
- `422` — This key belongs to a different request.
- `429` — The Member's request rate is exhausted. Wait for `Retry-After`.
- `500` — Something went wrong on UDX's side.
- `503` — Request admission is unavailable. Retry later.
