API documentation Web hosting accessible to everyone Visit LWS

Delete a snapshot

Deferred Asynchronous · 202

DELETE /api/v1/servers/{vmid}/snapshots/{name}

operationIddeleteSnapshot

Required level
Full
Rate limit
heavy operations, 6 calls per hour per VPS (60 per account)

Deletes the snapshot and frees the space it used. The deletion is permanent.

This request is processed in the background: it answers immediately while the work continues. Follow it with the task or request endpoints.

Path parameters

vmid string required

Identifier of the VPS. It must belong to the account and be within the key's scope.

pattern ^\d+$ Example: 116807

name string required

Name of the snapshot, as returned by the list.

max 64 characters pattern ^[A-Za-z0-9]+$ Example: avantMajPhp84

Responses

202

Request accepted and queued. Track the returned task with GET /tasks/{id}.

The request was accepted, not completed. The response carries a task to follow.

{
  "data": {
    "tasks": [
      {
        "id": "tsk_000002e1",
        "status": "pending",
        "action": "snapshot.delete",
        "vmid": "116807",
        "description": "Suppression d'un snapshot du serveur VPS-116807",
        "created_at": "2026-08-20T14:31:02+02:00",
        "finished_at": null
      }
    ]
  }
}
Response fields 9
  • data object
  • tasks object[]

    Tasks created; always an array

  • id string

    Opaque identifier

    Example: tsk_000002e1

  • status string

    unknown would indicate a state the API cannot name

    one of: pending, succeeded, failed, unknown

  • action string

    Type of task

    one of: server.start, server.stop, server.shutdown, server.reboot, server.reset, server.rebuild, server.enable_rescue, server.disable_rescue, server.reboot_rescue, snapshot.create, snapshot.delete, snapshot.rollback, backup.create, backup.restore, iso.mount, iso.unmount, firewall.sync, firewall.unblock_port_25 TaskAction

  • vmid string
  • description string
  • created_at string (date-time)
  • finished_at string (date-time)

    null while the task is running

400

Invalid parameters: validation_failed — name longer than 64 characters.

{
  "type": "https://docs.lws.fr/kvm/errors/validation-failed",
  "title": "Paramètres invalides",
  "status": 400,
  "code": "validation_failed",
  "detail": "Le nom d'un snapshot ne peut dépasser 64 caractères.",
  "request_id": "3f9a1c07b2e45d18",
  "errors": {
    "name": "Le nom d'un snapshot ne peut dépasser 64 caractères."
  }
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
401

Authentication refused: invalid_token — Authorization header missing or malformed, or unknown key; access_disabled — API access turned off for this account, or API service temporarily turned off by LWS.

Authorization header missing or malformed, or unknown key

{
  "type": "https://docs.lws.fr/kvm/errors/invalid-token",
  "title": "Authentification invalide",
  "status": 401,
  "code": "invalid_token",
  "detail": "Clé inconnue ou révoquée.",
  "request_id": "3f9a1c07b2e45d18"
}

API access turned off for this account, or API service temporarily turned off by LWS

{
  "type": "https://docs.lws.fr/kvm/errors/access-disabled",
  "title": "Accès API désactivé",
  "status": 401,
  "code": "access_disabled",
  "detail": "L'accès API est désactivé pour ce compte. Réactivez-le depuis la page « API / MCP » du panel.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
403

Access denied: insufficient_scope — key level too low; ip_not_allowed — calling address not authorized.

key level too low

{
  "type": "https://docs.lws.fr/kvm/errors/insufficient-scope",
  "title": "Droits insuffisants",
  "status": 403,
  "code": "insufficient_scope",
  "detail": "Niveau de permission « full » requis.",
  "request_id": "3f9a1c07b2e45d18",
  "required_level": "full"
}

calling address not authorized

{
  "type": "https://docs.lws.fr/kvm/errors/ip-not-allowed",
  "title": "Adresse non autorisée",
  "status": 403,
  "code": "ip_not_allowed",
  "detail": "L'adresse 203.0.113.10 ne figure pas parmi les adresses autorisées de ce compte.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
404

Resource not found: snapshot_not_found — none of your snapshots has this name; vm_not_found — VPS does not exist or is outside the key's scope.

none of your snapshots has this name

{
  "type": "https://docs.lws.fr/kvm/errors/snapshot-not-found",
  "title": "Snapshot introuvable",
  "status": 404,
  "code": "snapshot_not_found",
  "detail": "Snapshot « inconnu » introuvable sur ce VPS.",
  "request_id": "3f9a1c07b2e45d18"
}

VPS does not exist or is outside the key's scope

{
  "type": "https://docs.lws.fr/kvm/errors/vm-not-found",
  "title": "VPS introuvable",
  "status": 404,
  "code": "vm_not_found",
  "detail": "Aucun VPS 999999 sur ce compte.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
409

Conflict with the current state: task_already_running — a snapshot operation is already running; service_suspended — VPS disabled or expired: only read operations remain possible; server_locked — VPS locked by the hypervisor, see reason; with operation_in_progress, Retry-After gives the recommended wait.

a snapshot operation is already running

{
  "type": "https://docs.lws.fr/kvm/errors/task-already-running",
  "title": "Opération déjà en cours",
  "status": 409,
  "code": "task_already_running",
  "detail": "Une opération sur les snapshots est déjà en cours sur ce VPS. Attendez qu'elle aboutisse.",
  "request_id": "3f9a1c07b2e45d18",
  "task_id": "tsk_000002d5"
}

VPS disabled or expired: only read operations remain possible

{
  "type": "https://docs.lws.fr/kvm/errors/service-suspended",
  "title": "Service suspendu",
  "status": 409,
  "code": "service_suspended",
  "detail": "Le VPS 116807 est expiré.",
  "request_id": "3f9a1c07b2e45d18"
}

VPS locked by the hypervisor, see reason; with operation_in_progress, Retry-After gives the recommended wait

{
  "type": "https://docs.lws.fr/kvm/errors/server-locked",
  "title": "Serveur verrouillé",
  "status": 409,
  "code": "server_locked",
  "detail": "Action impossible pour le moment : une sauvegarde est en cours sur le serveur. Réessayez dans quelques minutes.",
  "request_id": "3f9a1c07b2e45d18",
  "lock": "snapshot",
  "reason": "operation_in_progress"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
429

Rate limit exceeded: rate_limited — hourly limit of the family exhausted.

{
  "type": "https://docs.lws.fr/kvm/errors/rate-limited",
  "title": "Quota dépassé",
  "status": 429,
  "code": "rate_limited",
  "detail": "Quota dépassé pour les opérations de type « heavy » sur le VPS 116807 : 6 appels par heure. Réessayez dans 214 seconde(s).",
  "request_id": "3f9a1c07b2e45d18",
  "family": "heavy",
  "limit": 6,
  "retry_after": 214
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
502

Dependency unreachable: hypervisor_unreachable — existing snapshots could not be read; upstream_unavailable — request not recorded on the hypervisor.

existing snapshots could not be read

{
  "type": "https://docs.lws.fr/kvm/errors/hypervisor-unreachable",
  "title": "Hyperviseur injoignable",
  "status": 502,
  "code": "hypervisor_unreachable",
  "detail": "Les snapshots de ce VPS n'ont pas pu être lus, la demande est donc refusée.",
  "request_id": "3f9a1c07b2e45d18"
}

request not recorded on the hypervisor

{
  "type": "https://docs.lws.fr/kvm/errors/upstream-unavailable",
  "title": "Service momentanément indisponible",
  "status": 502,
  "code": "upstream_unavailable",
  "detail": "La demande n'a pas pu être enregistrée sur l'hyperviseur. Réessayez dans quelques instants.",
  "request_id": "3f9a1c07b2e45d18"
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
503

Host server under intervention: server_maintenance — host server under an intervention announced by LWS and unreachable; honor Retry-After.

{
  "type": "https://docs.lws.fr/kvm/errors/server-maintenance",
  "title": "Intervention en cours sur le serveur hôte",
  "status": 503,
  "code": "server_maintenance",
  "detail": "Le serveur hébergeant ce VPS fait l'objet d'une intervention programmée par LWS : il est momentanément inaccessible. Fin prévue : 2026-10-21T18:00:00+02:00.",
  "request_id": "3f9a1c07b2e45d18",
  "maintenance": {
    "kind": "works",
    "started_at": "2026-10-21T14:00:00+02:00",
    "expected_end": "2026-10-21T18:00:00+02:00"
  }
}
Response fields 18
  • type string (uri)

    Example: https://docs.lws.fr/kvm/errors/vm-not-found

    required
  • title string

    Short title, in French

    Example: VPS introuvable

    required
  • status integer (int64)

    HTTP status

    Example: 404

    required
  • code string

    Stable machine-readable code (see "Errors" in Getting started)

    Example: vm_not_found

    required
  • detail string

    Detailed message, in French

    Example: Aucun VPS 999999 sur ce compte.

    required
  • request_id string

    Identifier of the request, to give to support

    Example: 3f9a1c07b2e45d18

    required
  • errors object

    validation_failed: message per faulty parameter

  • required_level string

    insufficient_scope: level required by the operation

    one of: read, exploitation, full

  • task_id string

    task_already_running: task running on this VPS

    Example: tsk_000002d5

  • family string

    rate_limited: exhausted rate limit family

    one of: read, mutation, heavy

  • limit integer (int64)

    rate_limited: hourly limit of the family

  • retry_after integer (int64)

    rate_limited: seconds to wait

  • lock string

    server_locked: lock set by the hypervisor (backup, snapshot, suspended…)

    Example: snapshot

  • reason string

    server_locked: operation_in_progress, an operation is running, retry after Retry-After; suspended, the VPS is hibernating, start it first; support_notified, abnormal lock, the LWS team has been notified and is taking care of it

    one of: operation_in_progress, suspended, support_notified

  • maintenance object

    server_maintenance: nature of the intervention, start and expected end (null for an incident)

  • kind string

    one of: works, incident

  • started_at string (date-time)
  • expected_end string (date-time)
Show the code examples and the test console
DELETE /servers/{vmid}/snapshots/{name}
LWS_API_KEY='…'curl -X DELETE \  "https://panelkvm.lwspanel.com/api/v1/servers/116807/snapshots/avantMajPhp84" \  -H "Authorization: Bearer $LWS_API_KEY"
$lwsApiKey = '…';$ch = curl_init("https://panelkvm.lwspanel.com/api/v1/servers/116807/snapshots/avantMajPhp84");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "DELETE");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "Authorization: Bearer " . $lwsApiKey,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_API_KEY = "…"res = requests.delete(    "https://panelkvm.lwspanel.com/api/v1/servers/116807/snapshots/avantMajPhp84",    headers={        "Authorization": "Bearer " + LWS_API_KEY,    },)print(res.json())
const LWS_API_KEY = "…";const res = await fetch("https://panelkvm.lwspanel.com/api/v1/servers/116807/snapshots/avantMajPhp84", {  method: "DELETE",  headers: {    "Authorization": "Bearer " + LWS_API_KEY,  },});const data = await res.json();
lwsApiKey := "…"req, _ := http.NewRequest("DELETE",    "https://panelkvm.lwspanel.com/api/v1/servers/116807/snapshots/avantMajPhp84", nil)req.Header.Set("Authorization", "Bearer "+lwsApiKey)resp, err := http.DefaultClient.Do(req)