---
raw: true
search:
  tags:
    - Partner
    - POST
seo:
  description: >-
    wp.cloud update-site-do… Reference for the POST
    /v0/atomic-api/update-site-domain/{service}/{identifier}/{domain}/{keep}
    endpoint in the Spacefast Partner API.
sidebar:
  label: Update a site's primary domain (keep flag)
  badge: POST
title: Update a site's primary domain (keep flag)
type: openapi-operation
---
wp.cloud update-site-domain with the keep flag. "false" removes the previous primary domain, and `job_id` then succeeds once that domain is detached. The default Spacefast hostname cannot be removed.

`POST /v0/atomic-api/update-site-domain/{service}/{identifier}/{domain}/{keep}`

**Responses**

- `200` — Response for status 200
- `default` — wp.cloud error envelope. \`message\` explains the failure. \`data\` is the Spacefast problem document, with its stable \`code\`.

Response example, 200:

```json
{
  "message": "string",
  "data": {
    "job_id": "string",
    "atomic_site_id": "string",
    "domain_name": "string",
    "old_domain_name": "string"
  }
}
```
