Skip to main content
DELETE
https://sandbox.getcollate.io/api
/
v1
/
domains
/
{id}
DELETE /v1/domains/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Domains

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Domains.delete("a0729e98-e946-4e25-acde-10e8a2294ba1")

# Hard delete
Domains.delete(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    hard_delete=True
)

# Delete by name
Domains.delete_by_name("TestDomain")

# Delete by name with options
Domains.delete_by_name(
    "TestDomain",
    hard_delete=True
)

# Restore a soft-deleted domain
Domains.restore("a0729e98-e946-4e25-acde-10e8a2294ba1")
{
  "id": "a0729e98-e946-4e25-acde-10e8a2294ba1",
  "domainType": "Aggregate",
  "name": "TestDomain",
  "fullyQualifiedName": "TestDomain",
  "description": "Lorem ipsum...",
  "version": 0.2,
  "updatedAt": 1769984330261,
  "updatedBy": "admin",
  "deleted": true,
  "owners": [],
  "children": []
}

Delete a Domain

Delete a domain by ID or fully qualified name. Supports soft delete (default), hard delete, and restore operations.

Delete by ID

id
string
required
UUID of the domain to delete.
recursive
boolean
default:"false"
Recursively delete child domains.
hardDelete
boolean
default:"false"
Permanently delete the domain. If false, the domain is soft-deleted and can be restored.

Delete by Name

Use DELETE /v1/domains/name/{fqn} to delete by fully qualified name.
fqn
string
required
Fully qualified name of the domain (e.g., TestDomain).
recursive
boolean
default:"false"
Recursively delete child domains.
hardDelete
boolean
default:"false"
Permanently delete the domain.

Restore a Soft-Deleted Domain

Use PUT /v1/domains/restore to restore a soft-deleted domain.
id
string
required
UUID of the soft-deleted domain to restore.
DELETE /v1/domains/{id}
from metadata.sdk import configure
from metadata.sdk.entities import Domains

configure(
    host="https://your-company.getcollate.io/api",
    jwt_token="your-jwt-token"
)

# Soft delete by ID
Domains.delete("a0729e98-e946-4e25-acde-10e8a2294ba1")

# Hard delete
Domains.delete(
    "a0729e98-e946-4e25-acde-10e8a2294ba1",
    hard_delete=True
)

# Delete by name
Domains.delete_by_name("TestDomain")

# Delete by name with options
Domains.delete_by_name(
    "TestDomain",
    hard_delete=True
)

# Restore a soft-deleted domain
Domains.restore("a0729e98-e946-4e25-acde-10e8a2294ba1")
{
  "id": "a0729e98-e946-4e25-acde-10e8a2294ba1",
  "domainType": "Aggregate",
  "name": "TestDomain",
  "fullyQualifiedName": "TestDomain",
  "description": "Lorem ipsum...",
  "version": 0.2,
  "updatedAt": 1769984330261,
  "updatedBy": "admin",
  "deleted": true,
  "owners": [],
  "children": []
}

Returns

Soft delete returns the domain object with deleted: true. Hard delete returns no content (204). Restore returns the restored domain object.

Error Handling

CodeError TypeDescription
401UNAUTHORIZEDInvalid or missing authentication token
403FORBIDDENUser lacks permission to delete this domain
404NOT_FOUNDDomain with given ID or FQN does not exist