> ## Documentation Index
> Fetch the complete documentation index at: https://hs-df36fa00.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke a Provider — POST /v1/providers/:provider_id/revoke

> Permanently revoke a provider, preventing all future agent invocations. Revoked providers remain visible in the registry for audit purposes.

Permanently revokes a provider, setting its status to `"revoked"`. Revoked providers remain visible in the registry for audit purposes but cannot register new agents or have their agents invoked through the gateway.

<Warning>
  Revocation is **irreversible**. Once a provider is revoked you cannot restore it. All agents published under the provider become uninvocable.
</Warning>

## Request

```bash theme={null}
curl -X POST http://your-node:8042/v1/providers/acme-labs/revoke \
  -H 'content-type: application/json' \
  -d '{
    "reason": "Provider decommissioned by owner"
  }'
```

### Path parameters

<ParamField path="provider_id" type="string" required>
  The identifier of the provider to revoke.
</ParamField>

### Body parameters

<ParamField body="reason" type="string">
  Optional human-readable explanation for the revocation. Stored in the provider record and audit log.
</ParamField>

## Response

Returns the updated `ProviderRecord` with `status` set to `"revoked"`.

<ResponseField name="schema_version" type="integer">
  Protocol schema version. Currently `1`.
</ResponseField>

<ResponseField name="provider_id" type="string">
  The provider identifier.
</ResponseField>

<ResponseField name="provider_did" type="string">
  The DID that was associated with this provider.
</ResponseField>

<ResponseField name="display_name" type="string">
  Human-readable display name, if set.
</ResponseField>

<ResponseField name="status" type="string">
  Always `"revoked"` after a successful call.
</ResponseField>

<ResponseField name="registered_at" type="string">
  ISO 8601 timestamp of original registration.
</ResponseField>

<ResponseField name="revoked_at" type="string">
  ISO 8601 timestamp of when the provider was revoked.
</ResponseField>

<ResponseField name="revoke_reason" type="string">
  The reason supplied in the request, if any.
</ResponseField>

## Status codes

| Code            | Meaning                                                              |
| --------------- | -------------------------------------------------------------------- |
| `200 OK`        | Provider revoked successfully. Returns the updated `ProviderRecord`. |
| `404 Not Found` | No provider with the given `provider_id` exists.                     |

## Example response

```json theme={null}
{
  "schema_version": 1,
  "provider_id": "acme-labs",
  "provider_did": "did:key:z6MkhaXgBZDvotD1X9gRrYkM5Xq9jYQqK6d8r8bQdE1mV2Xa",
  "display_name": "Acme Labs",
  "status": "revoked",
  "registered_at": "2025-01-15T10:00:00Z",
  "revoked_at": "2025-06-01T08:30:00Z",
  "revoke_reason": "Provider decommissioned by owner"
}
```
