API documentation Web hosting accessible to everyone Visit LWS

Get domain information

GET https://api.lws.net/v1/domain/{domain}

operationIdgetDomain

Get detailed information about the specified domain, such as its owner, status, DNS zone, and more.

Path parameters

domain string required

Domain name whose information to fetch

max 255 characters Example: example.fr

Responses

200

Domain information retrieved successfully

{
  "code": 200,
  "info": "Fetched domain",
  "data": {
    "domain": "example.com",
    "dns1": "ns1.lwsdns.com",
    "dns2": "ns2.lwsdns.com",
    "dns3": "ns3.lwsdns.com",
    "dns4": "ns4.lwsdns.com",
    "owner": "358240",
    "redemption": "0",
    "clientHold": "1",
    "clientTransferProhibited": "1",
    "serverHold": "0"
  }
}
Response fields 13 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 200

  • info string

    Human-readable message describing the result of the request

    Example: Fetched domain

  • data object
  • domain string

    Domain name

    Example: example.com

  • dns1 string

    First DNS of the domain

    Example: ns1.lwsdns.com

  • dns2 string

    Second DNS of the domain

    Example: ns2.lwsdns.com

  • dns3 string

    Third DNS of the domain

    Example: ns3.lwsdns.com

  • dns4 string

    Fourth DNS of the domain

    Example: ns4.lwsdns.com

  • owner string

    ID of the current owner of the domain

    Example: 358240

  • redemption string

    Domain redemption status. '1' indicates domain is in redemption period (expired but renewable), '0' indicates normal status.

    Example: 0

  • clientHold string

    Domain activation status. '1' means active, '0' means inactive (typically due to expiration).

    Example: 1

  • clientTransferProhibited string

    Transfer lock status. '1' indicates transfer is prohibited, '0' indicates transfers are allowed.

    Example: 1

  • serverHold string

    Whether the domain is blocked by the registrar (e.g. for legal reasons or non-compliant DNS). '1' means blocked, '0' means active.

    Example: 0

400

Invalid input

{
  "code": 400,
  "info": "No domain provided"
}
Response fields 2 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 400

  • info string

    Human-readable message describing the result of the request

    Example: No domain provided

314

Domain not found on the account

314 is not a registered HTTP status code. It is specific to this API.

{
  "code": 314,
  "info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Response fields 2 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 314

  • info string

    Human-readable message describing the result of the request

    Example: Provided domain has not been found on your account. You must own this domain to manage it.

500

Internal Server Error

{
  "code": 500,
  "info": "Internal Server Error",
  "data": "string"
}
Response fields 3 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 500

  • info string

    Human-readable message describing the result of the request

    Example: Internal Server Error

  • data string

    Detailled message about the error

502

Bad Gateway

{
  "code": 502,
  "info": "Invalid response from upstream server",
  "data": []
}
Response fields 3 Extends ApiEnvelope
  • code integer

    Application-level status/error code (not always equal to the HTTP status code)

    Example: 502

  • info string

    Human-readable message describing the result of the request

    Example: Invalid response from upstream server

  • data object

    Invalid response returned by the server

401

Unauthorized - Missing authentication headers

{
  "code": 401,
  "info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
  • code integer

    Example: 401

  • info string

    Example: Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed.

429

Rate limit exceeded

{
  "code": 429,
  "info": "Rate limit exceeded. Please try again later."
}
Response fields 2
  • code integer

    Example: 429

  • info string

    Example: Rate limit exceeded. Please try again later.

Show the code examples and the test console
GET /domain/{domain}
LWS_AUTH_LOGIN='…'LWS_AUTH_PASS='…'curl -X GET \  "https://api.lws.net/v1/domain/example.fr" \  -H "X-Auth-Login: $LWS_AUTH_LOGIN" \  -H "X-Auth-Pass: $LWS_AUTH_PASS"
$lwsAuthLogin = '…';$lwsAuthPass = '…';$ch = curl_init("https://api.lws.net/v1/domain/example.fr");curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_HTTPHEADER, [    "X-Auth-Login: " . $lwsAuthLogin,    "X-Auth-Pass: " . $lwsAuthPass,]);$res = json_decode(curl_exec($ch), true);
import requestsLWS_AUTH_LOGIN = "…"LWS_AUTH_PASS = "…"res = requests.get(    "https://api.lws.net/v1/domain/example.fr",    headers={        "X-Auth-Login": LWS_AUTH_LOGIN,        "X-Auth-Pass": LWS_AUTH_PASS,    },)print(res.json())
const LWS_AUTH_LOGIN = "…";const LWS_AUTH_PASS = "…";const res = await fetch("https://api.lws.net/v1/domain/example.fr", {  method: "GET",  headers: {    "X-Auth-Login": LWS_AUTH_LOGIN,    "X-Auth-Pass": LWS_AUTH_PASS,  },});const data = await res.json();
lwsAuthLogin := "…"lwsAuthPass := "…"req, _ := http.NewRequest("GET",    "https://api.lws.net/v1/domain/example.fr", nil)req.Header.Set("X-Auth-Login", lwsAuthLogin)req.Header.Set("X-Auth-Pass", lwsAuthPass)resp, err := http.DefaultClient.Do(req)