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

# Update a Domain

> Create or update a domain with a full request body

# Update a Domain

Create a domain or update it if it already exists, using `PUT /v1/domains` with the full request body. Send the complete definition, not just the fields you want to change. To change only some fields, use `PATCH` with a JSON Patch array and the `application/json-patch+json` content type, as shown in the PATCH examples below.

## Body Parameters

**name** `string` *required*

Name of the domain. Must be unique at the same level (top-level or within a parent domain).

**domainType** `string` *required*

Type of domain. One of: `Source-aligned`, `Consumer-aligned`, `Aggregate`.

**displayName** `string`

Human-readable display name for the domain.

**description** `string` *required*

Description of the domain in Markdown format.

**parent** `string`

Fully qualified name of the parent domain for creating nested domains, for example `Engineering`.

**owners** `array`

Array of owner references (users or teams) to assign to the domain.

**properties**

**id** `string`

UUID of the owner entity.

**type** `string`

Type of owner entity, for example `user`, `team`.

**name** `string`

Name of the owner entity.

**experts** `array`

Array of user names, as strings, of the subject matter experts for this domain.

```bash PUT /v1/domains theme={null}
curl -X PUT "{base_url}/api/v1/domains" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "TestDomain",
    "domainType": "Aggregate",
    "description": "Lorem ipsum...",
    "owners": [],
    "experts": []
  }'
```

```python PATCH /v1/domains/{id} theme={null}
from metadata.sdk import configure
from metadata.sdk.entities import Domains

configure(
    host="https://your-company.open-metadata.org/api",
    jwt_token="your-jwt-token"
)

# Retrieve, modify, and update
domain = Domains.retrieve("a0729e98-e946-4e25-acde-10e8a2294ba1")
domain.description = "Updated domain description for business analytics"
domain.domainType = "Consumer-aligned"
updated = Domains.update(domain)

print(f"Updated to version {updated.version.root}")
```

```java PATCH /v1/domains/{id} theme={null}
// client is an initialized OpenMetadataClient.
var domainId = "a0729e98-e946-4e25-acde-10e8a2294ba1";
var domain = client.domains().get(domainId);
domain.setDescription("Updated domain description for business analytics");

var updated = client.domains().update(domainId, domain);
```

```bash PATCH /v1/domains/{id} theme={null}
# Update by ID
curl -X PATCH "{base_url}/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json-patch+json" \
  -d '[
    {"op": "replace", "path": "/description", "value": "Updated domain description for business analytics"}
  ]'

# Update by name
curl -X PATCH "{base_url}/api/v1/domains/name/TestDomain" \
  -H "Authorization: Bearer {access_token}" \
  -H "Content-Type: application/json-patch+json" \
  -d '[
    {"op": "replace", "path": "/description", "value": "Updated domain description for business analytics"}
  ]'
```

```json Response theme={null}
{
  "id": "a0729e98-e946-4e25-acde-10e8a2294ba1",
  "domainType": "Consumer-aligned",
  "name": "TestDomain",
  "fullyQualifiedName": "TestDomain",
  "description": "Updated domain description for business analytics",
  "version": 0.2,
  "updatedAt": 1769984330261,
  "updatedBy": "admin",
  "href": "http://localhost:8585/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1",
  "deleted": false,
  "owners": [],
  "children": []
}
```

***

## Returns

Returns the updated domain object with the new version number.

## Response

**id** `string`

Unique identifier for the domain (UUID format).

**name** `string`

Domain name.

**fullyQualifiedName** `string`

Fully qualified name of the domain.

**description** `string`

Updated description.

**version** `number`

Incremented version number.

***

## Error Handling

| Code | Error Type | Description |
| - | - | - |
| `400` | `BAD_REQUEST` | Invalid or malformed request body |
| `401` | `UNAUTHORIZED` | Invalid or missing authentication token |
| `403` | `FORBIDDEN` | User lacks permission to update this domain |
| `409` | `CONFLICT` | Concurrent modification detected |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.