Copy an entity to a new id

POST /Platform/entities/{entity_type}/{entity_id}/copy

Copy an entity to a new id. The copy lands in the same organization, on the same or another branch.

Fetches the source entity from from_branch and creates a fresh copy on to_branch. A new id is auto-generated unless new_id is given. Same-org only -- cross-org copy is not supported.

Use this command when the desired result is a second, independent entity. For changes to an existing entity, check out a feature branch and run edit or patch against the existing entity id on that branch; after testing, promote it with merge-branch.

Same-branch duplication is allowed: pass the same value for from_branch and to_branch (e.g. both main) to clone an entity within one branch under a new id.

The source id/commit_id/slug/created_at are stripped before re-create (the copy gets its own creation time), so for slug-backed types the copy is routed through create and receives a BRAND-NEW slug and public URL -- the copy is independently resolvable and the original's URL is undisturbed.

Lineage is kept in the version DAG: the copy's first commit records the source's commit as its parent (parent_commits), so history shows what the copy was made from and three-way tools (e.g. Workflow.merge_from_catalog) can load that exact base.

Path parameters

Body parameters

Returns

EntityPutResponse

Example request

curl -X POST "https://api.hilus.ai/Platform/entities/{entity_type}/{entity_id}/copy" \
  -H "Authorization: Bearer $HILUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'