# Remove an account (the key must still be revoked at the provider)

> revoke provider account: CustomDomain™ API reference in the provider accounts group. Covers request parameters, the request body, responses and error codes.

Source: https://docs.customdomain.ai/docs/api-reference/provider-accounts/revokeProviderAccount

## `DELETE https://api.customdomain.ai/v1/provider-accounts/{id}`

Deletes CustomDomain™'s copy of the key and the account. Its domains stay connected and served, without continuous access; each domain's timeline records it. The answer says what that leaves: `used_by` is how many domains used the account, and `revoke_url` is the provider's page where the key itself is deleted. It deletes CustomDomain™'s copy only, for a key a person pasted as for a lasting API key the cloud browser's agent made: the key lives at the provider until it is deleted there (no provider documents an API that revokes one), and the application receives `credential.removed` for a key the agent made. Removing an account takes whoever manages it, like every other change to it: an admin, an owner or the member who connected it (`can_manage`), and for a key a customer's secure sign-in made, which no member connected, an admin or an owner. Anyone else, a viewer included, gets `403`, and nothing is deleted or detached.

### Authentication

`apiKey`

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

| Status | Description |
| --- | --- |
| `200` | Removed here |
| `401` | Error envelope: {code, title, details}. |
| `403` | Error envelope: {code, title, details}. |
| `404` | Error envelope: {code, title, details}. |

### `200` response body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `removed_here` | `true` | yes | The account and CustomDomain™'s copy of its key were removed. |
| `revoke_at_provider` | boolean | yes | True when the key still works at the provider until it is deleted there (see `revoke_url`). False for a provider sign-in, which is withdrawn at the provider. |
| `revoked` | boolean | no | Always true, kept for older integrations. It means removed here, not that the key stopped working at the provider: read `revoke_at_provider`. |
| `used_by` | integer | no | How many domains used the account. They stay connected, each with a timeline event, without continuous access. |
| `domains_kept_connected` | integer | no | The same number as `used_by`, kept for older integrations. |
| `revoke_url` | string | no | The provider's page where the key itself is deleted: the page the agent's own sign-in named for a key it made, else the provider's key page. Absent when the provider has none on file. |

The full specification is served at `GET https://api.customdomain.ai/v1/openapi.json`.
