> For the complete documentation index, see [llms.txt](https://developers.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.docstudio.com/api-documentation/api-methods/account-domains/activate-deactivate-account-domain.md).

# Activate/Deactivate Account Domain

Use these endpoints to change the availability of a verified account domain. Activate the domain to allow domain-based user linking. Deactivate the domain to stop using it without deleting it.

### Activate account domain

Use this endpoint to activate a verified account domain.

<table><thead><tr><th width="202">Endpoint</th><th></th></tr></thead><tbody><tr><td>Method</td><td>PATCH</td></tr><tr><td>Request URL</td><td><code>/api/v1/account/{accountUuid}/domain/{domainUuid}/activate</code></td></tr><tr><td><strong>Headers</strong></td><td></td></tr><tr><td>Authorization *</td><td>Bearer TOKEN</td></tr><tr><td>Content-Type</td><td>application/json</td></tr><tr><td><strong>Request</strong></td><td></td></tr><tr><td>accountUuid *</td><td>Target account UUID</td></tr><tr><td>domainUuid *</td><td>Account domain UUID</td></tr></tbody></table>

This endpoint does not require a request body.

#### Request example

```http
PATCH https://api.platform_address_here/api/v1/account/3fa85f64-5717-4562-b3fc-2c963f66afa6/domain/3fa85f64-5717-4562-b3fc-2c963f66afa6/activate
Authorization: Bearer {token}
Content-Type: application/json
```

#### Response example

If the domain is activated, the response will contain the **ACTIVE** status.

```json
{
    "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "accountUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "domain": "google.com",
    "status": "ACTIVE",
    "verifyInfo" : {
        "domain": "_whitedoc-verify",
        "value": "abc123"
    },
    "verifyMethod": "DNS_TXT_RECORD"
}
```

#### Response status codes

| Code | Description      |
| ---- | ---------------- |
| 200  | Success          |
| 400  | Bad request      |
| 401  | Not authorized   |
| 403  | Forbidden        |
| 404  | Domain not found |

### Deactivate account domain

Use this endpoint to deactivate an account domain.

<table><thead><tr><th width="203">Endpoint</th><th></th></tr></thead><tbody><tr><td>Method</td><td>PATCH</td></tr><tr><td>Request URL</td><td><code>/api/v1/account/{accountUuid}/domain/{domainUuid}/deactivate</code></td></tr><tr><td><strong>Headers</strong></td><td></td></tr><tr><td>Authorization *</td><td>Bearer TOKEN</td></tr><tr><td>Content-Type</td><td>application/json</td></tr><tr><td><strong>Request</strong></td><td></td></tr><tr><td>accountUuid *</td><td>Target account UUID</td></tr><tr><td>domainUuid *</td><td>Account domain UUID</td></tr></tbody></table>

This endpoint does not require a request body.

#### Request example

```http
PATCH https://api.platform_address_here/api/v1/account/3fa85f64-5717-4562-b3fc-2c963f66afa6/domain/3fa85f64-5717-4562-b3fc-2c963f66afa6/deactivate
Authorization: Bearer {token}
Content-Type: application/json
```

#### Response example

If the domain is deactivated, the response will contain the **INACTIVE** status.

```json
{
    "uuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "accountUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "domain": "google.com",
    "status": "INACTIVE",
    "verifyInfo" : {
        "domain": "_whitedoc-verify",
        "value": "abc123"
    },
    "verifyMethod": "DNS_TXT_RECORD"
}
```

#### Response status codes

| Code | Description      |
| ---- | ---------------- |
| 200  | Success          |
| 400  | Bad request      |
| 401  | Not authorized   |
| 403  | Forbidden        |
| 404  | Domain not found |

### Related topics

* [Add Account Domain](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/api-methods/account-domains/add-account-domain)
* [Check Account Domain](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/api-methods/account-domains/check-account-domain)
* [Domain Statuses & Verify Methods](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/api-methods/account-domains/domain-statuses-and-verify-methods)
