> ## Documentation Index
> Fetch the complete documentation index at: https://docs.interchange.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update account domain

> Set an account's registered domain

`PATCH /api/v2/accounts/{customerId}/domain`

Updates an account's registered domain. The domain gates domain auto-join membership. Requires `ADMIN` role on the target account (direct membership, organization admin via the hierarchy, or SuperAdmin).

## Request

```bash curl theme={null}
curl -X PATCH https://api.interchange.io/api/v2/accounts/200/domain \
  -H "Authorization: Bearer $SCOPE3_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "customerDomain": "acmeretail.com"
  }'
```

## Parameters

| Field            | In   | Type   | Required | Notes                                                               |
| ---------------- | ---- | ------ | -------- | ------------------------------------------------------------------- |
| `customerId`     | path | string | Yes      | ID of the account to update                                         |
| `customerDomain` | body | string | Yes      | Registered domain for the account (max 255, valid hostname pattern) |

## Response

```json theme={null}
{
  "id": 200,
  "customerDomain": "acmeretail.com",
  "customerDomainApproved": true
}
```

| Field                    | Type           | Notes                                                                                                     |
| ------------------------ | -------------- | --------------------------------------------------------------------------------------------------------- |
| `id`                     | integer        | Account ID                                                                                                |
| `customerDomain`         | string \| null | Registered domain on the account                                                                          |
| `customerDomainApproved` | boolean        | Whether the domain was automatically verified (true when an active member's email matches the new domain) |

## Errors

* `400 VALIDATION_ERROR` — `customerDomain` fails the hostname pattern.
* `401 UNAUTHORIZED` — missing or invalid bearer token.
* `403 FORBIDDEN` — caller is not an `ADMIN` on the target account.

See [Errors](/v2/reference/errors) for the full error contract.

## Related

<CardGroup cols={2}>
  <Card title="Account tasks" href="/v2/buyer/account/tasks" icon="list-check">
    All account operations
  </Card>

  <Card title="Update membership" href="/v2/buyer/account/tasks/update-membership" icon="user-gear">
    Toggle domain auto-join
  </Card>

  <Card title="Get current account" href="/v2/buyer/account/tasks/get-current-account" icon="circle-user">
    Your current context
  </Card>
</CardGroup>
