# Revoke an active agent or cancel a pending registration (https://developer.godaddy.com/en/docs/references/rest/ans/revoke-agent)

---
title: Revoke an active agent or cancel a pending registration
description: Revokes an active agent or cancels a pending registration.
full: true
---

Full description

Revokes an active agent or cancels a pending registration. Active agents are added to the Certificate Revocation List. Registrations in PENDING\_VALIDATION status cannot be cancelled through this endpoint and expire automatically.

## POST /v1/agents/{agentId}/revoke

Revoke an active agent or cancel a pending registration

Revokes an active agent or cancels a pending registration. Active agents are added to the Certificate Revocation List. Registrations in PENDING_VALIDATION status cannot be cancelled through this endpoint and expire automatically.

### Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `agentId` | string | yes | Unique identifier of the agent |

### Request body (required)

Agent revocation request

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/AgentRevocationRequest`

### Responses

**200** — Agent certificate revoked successfully

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/AgentRevocationResponse`

**401** — Authentication failed

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/ErrorResponse`

**403** — Authorization failed

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/ErrorResponse`

**404** — Agent not found

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/ErrorResponse`

**422** — Invalid revocation request (semantic validation failure). Common scenarios: Agent is in DEPRECATED, REVOKED, or EXPIRED state (only ACTIVE or PENDING can be revoked); Attempting to use SUPERSEDED reason (reserved for internal deprecation flow); Agent is in PENDING_VALIDATION state (will automatically expire if verification not completed)

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/ErrorResponse`

**500** — Internal server error

Content-Type: `application/json`

Schema:

- schema reference: `#/components/schemas/ErrorResponse`
