API documentation Web hosting accessible to everyone Visit LWS

Request port 25 unblocking

POST /api/v1/servers/{vmid}/firewall/unblock-port25

operationIdpostServerUnblockPort25

Required level
Operations
Rate limit
mutation, 300 calls per hour

Outgoing port 25 (SMTP) is blocked by default on VPS. This call submits an unblocking request, reviewed by the LWS team: it is not an immediate action on the VPS, and there is no task to track until the request is accepted.

The response is the firewall state of the VPS, in which port_25.status becomes pending. Then track its progress with GET /servers/{vmid}/firewall: pending (awaiting review), processing (accepted, unblocking in progress), done, failed. A refused request brings the state back to none.

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

Request body

  • reason string

    Reason for the request, read by the LWS team

    max 500 characters min 1 characters

    required
Example request
{
  "reason": "Serveur de messagerie transactionnelle pour notre boutique en ligne."
}

Responses

200

Request recorded; firewall state updated

{
  "data": {
    "enabled": false,
    "available": true,
    "client_rules": [],
    "lws_rules": [
      {
        "port": "25",
        "protocol": "TCP",
        "sources": [],
        "open_to_any": true,
        "set": "LWS - Protection mail"
      }
    ],
    "port_25": {
      "status": "pending"
    }
  }
}
Response fields 17
  • data object required
  • enabled boolean

    null: unknown state (hypervisor database unreachable)

  • available boolean

    false if the state could not be read

  • client_rules object[]
  • port string

    Port or start-end range

    Example: 443

  • protocol string

    Protocol, always in uppercase

    one of: TCP, UDP

  • sources string[]

    Authorized addresses or CIDR ranges; empty if the rule is open to all

  • open_to_any boolean

    true if no address restricts the rule

  • set string

    Rule set the rule comes from

  • lws_rules object[]

    Rules set by LWS, which cannot be modified

  • port string

    Port or start-end range

    Example: 443

  • protocol string

    Protocol, always in uppercase

    one of: TCP, UDP

  • sources string[]

    Authorized addresses or CIDR ranges; empty if the rule is open to all

  • open_to_any boolean

    true if no address restricts the rule

  • set string

    Rule set the rule comes from

  • port_25 object
  • status string

    Tracking of the outgoing port 25 unblocking request

    one of: none, pending, processing, done, failed

400

Invalid parameters: validation_failed — reason missing, empty, or longer than 500 characters.

{
  "type": "https://docs.lws.fr/kvm/errors/validation-failed",
  "title": "Paramètres invalides",
  "status": 400,
  "code": "validation_failed",
  "detail": "Paramètre « reason » invalide.",
  "request_id": "3f9a1c07b2e45d18",
  "errors": {
    "reason": "Motif requis, chaîne non vide."
  }
}
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 « exploitation » requis.",
  "request_id": "3f9a1c07b2e45d18",
  "required_level": "exploitation"
}

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: vm_not_found — 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: invalid_state — a request is already awaiting review (pending) for this VPS; service_suspended — VPS disabled or expired: only read operations remain possible.

a request is already awaiting review (pending) for this VPS

{
  "type": "https://docs.lws.fr/kvm/errors/invalid-state",
  "title": "Opération impossible en l'état",
  "status": 409,
  "code": "invalid_state",
  "detail": "Une demande de déblocage du port 25 est déjà en cours pour ce VPS.",
  "request_id": "3f9a1c07b2e45d18"
}

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"
}
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 « mutation » : 300 appels par heure. Réessayez dans 95 seconde(s).",
  "request_id": "3f9a1c07b2e45d18",
  "family": "mutation",
  "limit": 300,
  "retry_after": 95
}
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: upstream_unavailable — VPS inventory temporarily unavailable.

{
  "type": "https://docs.lws.fr/kvm/errors/upstream-unavailable",
  "title": "Service momentanément indisponible",
  "status": 502,
  "code": "upstream_unavailable",
  "detail": "Inventaire des VM indisponible.",
  "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
POST /servers/{vmid}/firewall/unblock-port25
LWS_API_KEY='…'curl -X POST \  "https://panelkvm.lwspanel.com/api/v1/servers/116807/firewall/unblock-port25" \  -H "Authorization: Bearer $LWS_API_KEY" \  -H "Content-Type: application/json" \  -d '{"reason":"Serveur de messagerie transactionnelle pour notre boutique en ligne."}'
$lwsApiKey = '…';$ch = curl_init("https://panelkvm.lwspanel.com/api/v1/servers/116807/firewall/unblock-port25");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "Authorization: Bearer " . $lwsApiKey,    "Content-Type: application/json",]);curl_setopt($ch, CURLOPT_POSTFIELDS, '{"reason":"Serveur de messagerie transactionnelle pour notre boutique en ligne."}');$res = json_decode(curl_exec($ch), true);
import requestsLWS_API_KEY = "…"res = requests.post(    "https://panelkvm.lwspanel.com/api/v1/servers/116807/firewall/unblock-port25",    headers={        "Authorization": "Bearer " + LWS_API_KEY,    },    json={"reason": "Serveur de messagerie transactionnelle pour notre boutique en ligne."},)print(res.json())
const LWS_API_KEY = "…";const res = await fetch("https://panelkvm.lwspanel.com/api/v1/servers/116807/firewall/unblock-port25", {  method: "POST",  headers: {    "Authorization": "Bearer " + LWS_API_KEY,    "Content-Type": "application/json",  },  body: JSON.stringify({"reason":"Serveur de messagerie transactionnelle pour notre boutique en ligne."}),});const data = await res.json();
lwsApiKey := "…"body := strings.NewReader(`{"reason":"Serveur de messagerie transactionnelle pour notre boutique en ligne."}`)req, _ := http.NewRequest("POST",    "https://panelkvm.lwspanel.com/api/v1/servers/116807/firewall/unblock-port25", body)req.Header.Set("Authorization", "Bearer "+lwsApiKey)req.Header.Set("Content-Type", "application/json")resp, err := http.DefaultClient.Do(req)