Skip to content

API reference

Snapshots and templates API

Push a stopped machine, save it as a named template, and copy a machine with fork or restore.

On this page

Push a snapshot

POST /v1/machines/{machine_id}/snapshots

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.
  • Idempotency: send a unique Idempotency-Key; replaying the same key and body returns the same operation.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Request body (application/json, CreateSnapshotRequest)

FieldTypeRequiredDescription
tiernull | SnapshotTierDtoNoDefault warm.

Responses

StatusDescriptionBody
202The push is a durable operation; the snapshot is pending until it settlesSnapshotAccepted
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409machine_not_stopped, snapshot_limit_reached, or idempotency_conflictProblemDetails
422Invalid request (invalid_request); field_errors names the fields.ProblemDetails
Request
curl -X POST "$VMYARD_API_URL/v1/machines/$MACHINE_ID/snapshots" \
  -H "Authorization: Bearer $VMYARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "tier": "warm"
}'
Response 202
{
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_url": "/v1/operations/6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "snapshot_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "snapshot_url": "string",
  "status": "string"
}

List a machine's snapshots

GET /v1/machines/{machine_id}/snapshots

  • API key: Authorization: Bearer vmy_… with preset read_only, use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie.
  • Who: Any member.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
limitqueryintegerNo1-100, default 50.
cursorquerystring (uuid)NoThe last ID of the previous page.
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200—SnapshotPage
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
Request
curl "$VMYARD_API_URL/v1/machines/$MACHINE_ID/snapshots" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "items": [
    {
      "completed_at": "2026-10-12T05:51:01Z",
      "created_at": "2026-10-12T05:51:01Z",
      "disk_synced": false,
      "error_code": "string",
      "generation": 0,
      "id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "manifest": "string",
      "name": "dev",
      "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "parent_manifest": "string",
      "size_bytes": 0,
      "source": "api",
      "status": "pending",
      "tier": "warm",
      "uploaded_bytes": 0
    }
  ],
  "next_cursor": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
}

Get a machine's latest snapshot

GET /v1/machines/{machine_id}/snapshots/latest

The newest ready snapshot; pending and failed pushes and templates are skipped. A machine without one answers 404 no_snapshot.

  • API key: Authorization: Bearer vmy_… with preset read_only, use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie.
  • Who: Any member.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200The machine's newest ready snapshot; pending and failed pushes and templates are skippedReadySnapshotDto
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
404Unknown machine, or no_snapshot: the machine has no ready snapshotProblemDetails
Request
curl "$VMYARD_API_URL/v1/machines/$MACHINE_ID/snapshots/latest" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "completed_at": "2026-10-12T05:51:01Z",
  "created_at": "2026-10-12T05:51:01Z",
  "id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "size_bytes": 0,
  "source": "api",
  "tier": "warm"
}

Get a snapshot

GET /v1/snapshots/{snapshot_id}

  • API key: Authorization: Bearer vmy_… with preset read_only, use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie.
  • Who: Any member.

Parameters

NameInTypeRequiredDescription
snapshot_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200—SnapshotDto
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
Request
curl "$VMYARD_API_URL/v1/snapshots/$SNAPSHOT_ID" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "completed_at": "2026-10-12T05:51:01Z",
  "created_at": "2026-10-12T05:51:01Z",
  "disk_synced": false,
  "error_code": "string",
  "generation": 0,
  "id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "manifest": "string",
  "name": "dev",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "parent_manifest": "string",
  "size_bytes": 0,
  "source": "api",
  "status": "pending",
  "tier": "warm",
  "uploaded_bytes": 0
}

Delete a snapshot

DELETE /v1/snapshots/{snapshot_id}

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.

Parameters

NameInTypeRequiredDescription
snapshot_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
204Deleted from the product; the runtime's store collects its data—
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409snapshot_pending: the push has not settledProblemDetails
Request
curl -X DELETE "$VMYARD_API_URL/v1/snapshots/$SNAPSHOT_ID" \
  -H "Authorization: Bearer $VMYARD_API_KEY"

Delete snapshots

POST /v1/snapshots/bulk-delete

1-100 IDs. Answers 200 with a result per snapshot (deleted, not_found, pending, or template) even when some were kept. See Delete several snapshots.

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.

Parameters

NameInTypeRequiredDescription
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Request body (application/json, BulkDeleteSnapshotsRequest)

FieldTypeRequiredDescription
snapshot_idsstring (uuid)[]Yes1-100 snapshot IDs; duplicates are reported once.

Responses

StatusDescriptionBody
200Each snapshot's result; templates and pending pushes are keptSnapshotDeleteResults
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
422No IDs, or more than 100ProblemDetails
Request
curl -X POST "$VMYARD_API_URL/v1/snapshots/bulk-delete" \
  -H "Authorization: Bearer $VMYARD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "snapshot_ids": [
    "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
  ]
}'
Response 200
{
  "deleted": 0,
  "results": [
    {
      "result": "deleted",
      "snapshot_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
    }
  ]
}

Delete a machine's snapshots

DELETE /v1/machines/{machine_id}/snapshots

Every snapshot of the machine, or one source's with source (automatic deletes the automatic snapshots). Pending pushes and templates are kept and reported.

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
sourcequerySnapshotSourceDtoNoOnly this source's snapshots (automatic deletes the automatic ones); every snapshot of the machine by default.
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200Each of the machine's snapshots' result, oldest first; templates (without source) and pending pushes are keptSnapshotDeleteResults
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
Request
curl -X DELETE "$VMYARD_API_URL/v1/machines/$MACHINE_ID/snapshots" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "deleted": 0,
  "results": [
    {
      "result": "deleted",
      "snapshot_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
    }
  ]
}

Save a template

POST /v1/templates

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.
  • Idempotency: send a unique Idempotency-Key; replaying the same key and body returns the same operation.

Parameters

NameInTypeRequiredDescription
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Request body (application/json, CreateTemplateRequest)

FieldTypeRequiredDescription
machine_idstring (uuid)YesA stopped machine to save as the template.
namestringYes[a-z0-9] then up to 63 of [a-z0-9._-]; unique among the organization's templates.

Responses

StatusDescriptionBody
202A warm push saved as the template; pending until it settlesSnapshotAccepted
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409machine_not_stopped, template_name_taken, template_limit_reached, or idempotency_conflictProblemDetails
422Invalid request (invalid_request); field_errors names the fields.ProblemDetails
Request
curl -X POST "$VMYARD_API_URL/v1/templates" \
  -H "Authorization: Bearer $VMYARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "name": "dev"
}'
Response 202
{
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_url": "/v1/operations/6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "snapshot_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "snapshot_url": "string",
  "status": "string"
}

List templates

GET /v1/templates

  • API key: Authorization: Bearer vmy_… with preset read_only, use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie.
  • Who: Any member.

Parameters

NameInTypeRequiredDescription
limitqueryintegerNo1-100, default 50.
cursorquerystring (uuid)NoThe last ID of the previous page.
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200—SnapshotPage
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
Request
curl "$VMYARD_API_URL/v1/templates" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "items": [
    {
      "completed_at": "2026-10-12T05:51:01Z",
      "created_at": "2026-10-12T05:51:01Z",
      "disk_synced": false,
      "error_code": "string",
      "generation": 0,
      "id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "manifest": "string",
      "name": "dev",
      "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
      "parent_manifest": "string",
      "size_bytes": 0,
      "source": "api",
      "status": "pending",
      "tier": "warm",
      "uploaded_bytes": 0
    }
  ],
  "next_cursor": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
}

Get a template

GET /v1/templates/{template}

  • API key: Authorization: Bearer vmy_… with preset read_only, use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie.
  • Who: Any member.

Parameters

NameInTypeRequiredDescription
templatepathstringYesTemplate name or ID
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
200—SnapshotDto
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
Request
curl "$VMYARD_API_URL/v1/templates/$TEMPLATE" \
  -H "Authorization: Bearer $VMYARD_API_KEY"
Response 200
{
  "completed_at": "2026-10-12T05:51:01Z",
  "created_at": "2026-10-12T05:51:01Z",
  "disk_synced": false,
  "error_code": "string",
  "generation": 0,
  "id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "manifest": "string",
  "name": "dev",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "parent_manifest": "string",
  "size_bytes": 0,
  "source": "api",
  "status": "pending",
  "tier": "warm",
  "uploaded_bytes": 0
}

Delete a template

DELETE /v1/templates/{template}

  • API key: Authorization: Bearer vmy_… with preset use_existing, create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.

Parameters

NameInTypeRequiredDescription
templatepathstringYesTemplate name or ID
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Responses

StatusDescriptionBody
204Deleted; the name is free again—
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409snapshot_pending: the save has not settledProblemDetails
Request
curl -X DELETE "$VMYARD_API_URL/v1/templates/$TEMPLATE" \
  -H "Authorization: Bearer $VMYARD_API_KEY"

Fork a machine

POST /v1/machines/{machine_id}/fork

Billing admission can refuse it: 402 billing_required or spend_cap_reached, 403 trial_machine_class_not_allowed, 409 plan_not_priced, or 429 limit_reached. See Usage, billing, and limits.

  • API key: Authorization: Bearer vmy_… with preset create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.
  • Idempotency: send a unique Idempotency-Key; replaying the same key and body returns the same operation.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Request body (application/json, ForkMachineRequest)

FieldTypeRequiredDescription
keep_ssh_keysbooleanNoKeep the login user's SSH authorized_keys in the copy (default false). The SSH gateway port is never inherited.
liveboolean | nullNoRun the copy at once with the source's processes (default true); false creates it stopped.
namestring | nullNoThe copy's display name (default: the tenant alias it shares with the source).

Responses

StatusDescriptionBody
202The copy is created by the operation; machine_id names the new machineOperationAccepted
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
402—ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409machine_not_running, idempotency_conflict, or a billing limitProblemDetails
422Invalid request (invalid_request); field_errors names the fields.ProblemDetails
429Too many requests; wait for Retry-After.ProblemDetails
Request
curl -X POST "$VMYARD_API_URL/v1/machines/$MACHINE_ID/fork" \
  -H "Authorization: Bearer $VMYARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
Response 202
{
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_url": "/v1/operations/6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "requested_action": "create",
  "status": "pending"
}

Restore a snapshot as a new machine

POST /v1/machines/{machine_id}/restore

Billing admission can refuse it: 402 billing_required or spend_cap_reached, 403 trial_machine_class_not_allowed, 409 plan_not_priced, or 429 limit_reached. See Usage, billing, and limits.

  • API key: Authorization: Bearer vmy_… with preset create_and_use, full_access.
  • Browser session: the vmyard_session cookie and the x-csrf-token header.
  • Who: Owner, Admin, or Operator.
  • Idempotency: send a unique Idempotency-Key; replaying the same key and body returns the same operation.

Parameters

NameInTypeRequiredDescription
machine_idpathstring (uuid)Yes
X-Organization-IDheaderstring (uuid)NoRequired with a browser session. Optional with an API key, which fixes the organization; when sent it must match.

Request body (application/json, RestoreMachineRequest)

FieldTypeRequiredDescription
snapshot_idstring (uuid)YesA ready snapshot of this machine.
keep_ssh_keysbooleanNoKeep the login user's SSH authorized_keys (default false).
namestring | nullNoThe new machine's display name.
wakeboolean | nullNoWake the new machine at once (default true); false creates it stopped.

Responses

StatusDescriptionBody
202A new machine is restored from the snapshot; machine_id names itOperationAccepted
401Not signed in, or the API key is malformed, expired, or revoked (unauthenticated, invalid_api_key).ProblemDetails
402—ProblemDetails
403Refused for this caller: role, key preset, CSRF token, or organization (forbidden, insufficient_scope, csrf_invalid, organization_mismatch, session_required).ProblemDetails
404Not found in this organization (resource_not_found).ProblemDetails
409snapshot_not_ready, idempotency_conflict, or a billing limitProblemDetails
422Invalid request (invalid_request); field_errors names the fields.ProblemDetails
429Too many requests; wait for Retry-After.ProblemDetails
Request
curl -X POST "$VMYARD_API_URL/v1/machines/$MACHINE_ID/restore" \
  -H "Authorization: Bearer $VMYARD_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "snapshot_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f"
}'
Response 202
{
  "machine_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_id": "6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "operation_url": "/v1/operations/6f1c2d3e-4b5a-4c7d-8e9f-0a1b2c3d4e5f",
  "requested_action": "create",
  "status": "pending"
}