Skip to content
Hoody.com

Use these endpoints to duplicate a container into another project or server (copy) and to pull a fresh incremental snapshot from a container’s source (sync). Both operations run asynchronously: the new or updated container starts automatically when the operation succeeds, and the response includes an operation_id you can correlate with the container.operation.completed or container.operation.failed event that reports the outcome. If a copy fails, the new container’s status becomes failed (it cannot be started); delete it and retry.

POST /api/v1/containers/{id}/copy

Creates a copy of an existing container. The copy operation runs asynchronously and the new container will start automatically upon successful completion. If the copy fails, the new container’s status becomes failed (it cannot be started); delete it and retry the copy.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the source container to copy
FieldTypeRequiredDefaultDescription
target_project_idstringYesID of the project where the copy will be created (24-character hex)
target_server_idstringNoID of the server where the copy will be created (24-character hex; defaults to source server)
namestringNoName for the copied container (auto-generated if not provided); 3-100 chars, ^[a-zA-Z0-9-_]+$
ssh_public_keystringNoSSH public key for the copied container (must be unique, not inherited from source)
source_snapshotstringNoSpecific snapshot to copy from (copies latest state if not provided). An auth token needs containers.features.snapshots to use it
copy_firewall_rulesbooleanNofalseWhether to copy firewall rules from source container to target container
copy_network_rulesbooleanNofalseWhether to copy network rules/settings from source container to target container
kvmbooleanNoGrant the COPY /dev/kvm passthrough (run full VMs). The copy NEVER inherits the source’s KVM grant, so this decides KVM for the copy independently, on the TARGET server. Available on rented or dedicated (bare-metal) targets ONLY (never free tier); rejected (403) otherwise. Defaults to false
dev_kvmbooleanNoAccepted alias of kvm on input (kvm wins if both are sent and they must agree)
Terminal window
curl -X POST https://api.hoody.com/api/v1/containers/890abcdef12345678901cdef/copy \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"target_project_id": "67e89abc123def456789abcd",
"name": "my-container-copy",
"ssh_public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJxn0a5M5c7Rd0PY6E8Q3Z8K0L3M4N5O6P7Q8R9S0T user@host",
"copy_firewall_rules": true,
"copy_network_rules": true,
"kvm": true
}'

Container copy initiated successfully.

{
"statusCode": 201,
"message": "Container copy initiated successfully",
"data": {
"id": "a1b2c3d4e5f6789012345678",
"name": "my-container-copy",
"status": "copying",
"source_container_id": "890abcdef12345678901cdef",
"project_id": "67e89abc123def456789abcd",
"project_alias": "my-project",
"server_id": "6501a2b3c4d5e6f7a8b9c0d2",
"server_name": "node-example-1",
"subserver_name": "free",
"server": {
"name": "node-example-1",
"country": "SG",
"country_name": "Singapore",
"city": "Singapore",
"region": "Asia Pacific",
"datacenter": "SIN-DC1",
"is_free": true,
"paid_subserver": false,
"specs": {
"cpu_cores": null,
"ram_gb": null,
"disk_gb": 50,
"shared_compute": true
},
"expires_at": null,
"kvm_supported": true,
"kvm_nested": false,
"kvm_checked_at": "2026-10-07T12:00:00.000Z"
},
"ssh_hostname": "67e89abc123def456789abcd-a1b2c3d4e5f6789012345678-ssh.node-example-1.containers.hoody.com",
"env_sync": {
"pending": false,
"revision": 0,
"applied_revision": 0,
"verified_at": null,
"attempted_at": null,
"last_error": null,
"exhausted": false
},
"color": "#3B82F6",
"container_image": "debian/13",
"ai": false,
"hoody_kit": false,
"dev_kit": false,
"kvm": true,
"autostart": true,
"ramdisk_scope": "container",
"ramdisk": false,
"is_default": false,
"container_image_id": "6501a2b3c4d5e6f7a8b9c0d1",
"environment_vars": {},
"volumes": {},
"ssh_public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJxn0a5M5c7Rd0PY6E8Q3Z8K0L3M4N5O6P7Q8R9S0T user@host",
"ssh_key_fingerprint": "SHA256:wBF5vmw/82L9++9kd8PEmcEkErv5hBWXC7aJsuXAyh8",
"ssh_key_installed_at": "2026-10-07T12:00:00.000Z",
"comment": null,
"copy_firewall_rules": true,
"copy_network_rules": true,
"operation_id": "9f86d081884c7d659a2feaa0c55ad015",
"created_at": "2026-10-07T12:00:00.000Z",
"updated_at": "2026-10-07T12:00:00.000Z",
"realm_ids": []
}
}

POST /api/v1/containers/{id}/sync

Performs an incremental sync from the source container to this container. Only works for containers that were created via copy operation. The sync runs asynchronously.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to sync (must have been created via copy)

This endpoint takes no request body.

Terminal window
curl -X POST https://api.hoody.com/api/v1/containers/a1b2c3d4e5f6789012345678/sync \
-H "Authorization: Bearer <token>"

Container sync initiated successfully.

{
"statusCode": 200,
"message": "Container sync initiated successfully",
"data": {
"container_id": "a1b2c3d4e5f6789012345678",
"source_container_id": "890abcdef12345678901cdef",
"status": "copying",
"operation_id": "9f86d081884c7d659a2feaa0c55ad015"
}
}