Create a Domain
Create a new domain for organizing data assets by business area.
Body Parameters
Name of the domain. Must be unique at the same level (top-level or within a parent domain).
Type of domain. One of: Source-aligned, Consumer-aligned, Aggregate.
Human-readable display name for the domain.
Description of the domain in Markdown format.
Fully qualified name of the parent domain for creating nested domains (e.g., Engineering).
Array of owner references (users or teams) to assign to the domain. UUID of the owner entity.
Type of owner entity (e.g., user, team).
Name of the owner entity.
Array of user references who are subject matter experts for this domain. Type of entity (always user).
from metadata.sdk import configure
from metadata.sdk.entities import Domains
from metadata.generated.schema.api.domains.createDomain import CreateDomainRequest
configure(
host = "https://your-company.getcollate.io/api" ,
jwt_token = "your-jwt-token"
)
request = CreateDomainRequest(
name = "TestDomain" ,
displayName = "Test Domain" ,
domainType = "Aggregate" ,
description = "Lorem ipsum..."
)
domain = Domains.create(request)
print ( f "Created: { domain.fullyQualifiedName } " )
{
"id" : "a0729e98-e946-4e25-acde-10e8a2294ba1" ,
"domainType" : "Aggregate" ,
"name" : "TestDomain" ,
"fullyQualifiedName" : "TestDomain" ,
"description" : "Lorem ipsum..." ,
"version" : 0.1 ,
"updatedAt" : 1769984330261 ,
"updatedBy" : "admin" ,
"href" : "http://localhost:8585/api/v1/domains/a0729e98-e946-4e25-acde-10e8a2294ba1" ,
"deleted" : false ,
"owners" : [],
"children" : []
}
Returns
Returns the created domain object with all specified properties and system-generated fields.
Response
Unique identifier for the domain (UUID format).
Fully qualified name (e.g., TestDomain or parent.child).
Human-readable display name.
Description of the domain in Markdown format.
Type of domain: Source-aligned, Consumer-aligned, or Aggregate.
List of owners assigned to the domain. UUID of the owner entity.
Type of owner entity (e.g., user, team).
Name of the owner entity.
List of child domain references.
Version number for the entity (starts at 0.1).
Create or Update (PUT)
Use PUT /v1/domains instead of POST to perform an upsert. If a domain with the same fullyQualifiedName already exists, it will be updated; otherwise, a new domain is created. The request body is the same as POST.
curl -X PUT "{base_url}/api/v1/domains" \
-H "Authorization: Bearer {access_token}" \
-H "Content-Type: application/json" \
-d '{ ... same body as POST ... }'
PUT will not return a 409 conflict error if the entity already exists — it will update the existing entity instead.
Error Handling
Code Error Type Description 400BAD_REQUESTInvalid request body or missing required fields 401UNAUTHORIZEDInvalid or missing authentication token 403FORBIDDENUser lacks permission to create domains 409ENTITY_ALREADY_EXISTSDomain with same name already exists (POST only)