# WAPI – Manual

> In this article, you will learn how WAPI works with WEDOS Global and how to activate it in the admin panel.

URL: https://kb.wedos.global/wapi/manual/
Updated: 2026-11-24

> This article explains what WAPI is, how to activate it in the WEDOS Global administration and how to send your first request. The commands for individual services are described in separate articles, for example [WAPI – WEDOS Protection (WGP)](https://kb.wedos.global/wapi/wgp/).

In this article, you will learn:

- [How WAPI works](https://kb.wedos.global/wapi/manual/#wapi)
- [What you need to get started](https://kb.wedos.global/wapi/manual/#start)
- [Supported services](https://kb.wedos.global/wapi/manual/#services)
- [Request limits](https://kb.wedos.global/wapi/manual/#restrictions)
- [Synchronous and asynchronous requests](https://kb.wedos.global/wapi/manual/#sync)
- [Return codes](https://kb.wedos.global/wapi/manual/#codes)
- [How to activate WAPI in the WEDOS Global administration](https://kb.wedos.global/wapi/manual/#activate)
- [How to integrate WAPI into your system](https://kb.wedos.global/wapi/manual/#integrate)
- [How to page and search lists](https://kb.wedos.global/wapi/manual/#paging)
- [Basic requests for testing WAPI](https://kb.wedos.global/wapi/manual/#basic)
- [How to solve common problems](https://kb.wedos.global/wapi/manual/#troubleshooting)
- [Frequently asked questions](https://kb.wedos.global/wapi/manual/#faq)

---

## WEDOS API (WAPI)

WEDOS API, or WAPI for short, lets you manage WEDOS services directly from your own system using requests and responses.

WAPI is an interface for programs, not for people. Instead of clicking in the administration, your script or application sends a request to WAPI (for example, “list my domains”) and receives a response with the result. Every response contains a numeric code that tells you whether the request succeeded.

- Communication is either synchronous (the response usually arrives within a few seconds) or asynchronous (processing takes longer and you track progress through [notifications](https://kb.wedos.global/wapi/manual/#notifications)).
- Data is sent over HTTPS using the POST method in the `request` parameter, encoded in UTF-8.
- The supported formats are XML and JSON.

> Using WAPI requires an active [credit account](https://kb.wedos.global/wedos/credit/), from which the system deducts payments for registrations, renewals and other paid operations.

### What You Need to Get Started

Before sending your first request, you need:

- an active [credit account](https://kb.wedos.global/wedos/credit/),
- WAPI activated in the administration with your server’s IP addresses and a WAPI password (see [Activating WAPI](https://kb.wedos.global/wapi/manual/#activate)),
- a script that sends requests to WAPI, for example the PHP script in [Connecting to WAPI](https://kb.wedos.global/wapi/manual/#connect).

Start with the [`ping`](https://kb.wedos.global/wapi/manual/#ping) request. It changes nothing and only verifies your login, WAPI password and IP address. Code `1000` in the response means your connection works. If you get `2050` or `2051`, see [Solving Common Problems](https://kb.wedos.global/wapi/manual/#troubleshooting).

### Supported Services

WAPI currently supports these WEDOS Global services:

- [WEDOS Global Members](https://kb.wedos.global/wapi/wg-members/) (`wg-members-*`)
- [WEDOS Protection](https://kb.wedos.global/wapi/wgp/) (`wgp-domain-*`, `wgp-services-list`)
- [WEDOS DNS](https://kb.wedos.global/wapi/wdns/) (`dns-*`) and [NSSET](https://kb.wedos.global/wapi/nsset/) (`nsset-*`)

You can also use the services of the WEDOS domain registrar:

- [Domains](https://kb.wedos.global/wapi/domains/) (`domains-list`, `domain-*`)
- [Domain contacts](https://kb.wedos.global/wapi/contacts/) (`contact-*`)
- [Credit account](https://kb.wedos.global/wapi/credit/) (`credit-info`, `account-list`)

The commands of each service are described in separate articles.

### WAPI Limits

To prevent abuse, WAPI applies these limits:

- One user account can send at most 1,000 requests per hour. This applies to all request types. When the limit is reached, WAPI rejects further requests (code `2006`) until the time limit expires.
- One user account can send at most 100 domain availability requests per hour. This applies to `domain-check`, `domain-create` and `domain-transfer-check`.
- A request can be at most 4 KB (XML and JSON). The exception is `wgp-domain-cert-upload` with a limit of 64 KB. WAPI rejects a larger request with code `2007`.
- Repeated invalid requests (authentication failure, access from a disallowed IP address, invalid input, missing or incorrect parameters, unknown command, commands ending with an error, or requests exceeding other limits) block the IP address for 1 minute per invalid request once there are more than 10 invalid requests (code `2052`). Each further invalid request extends the block.

### Synchronous and Asynchronous Requests

Most requests are synchronous: you send a request and usually get the result within a few seconds.

Some requests are asynchronous and can take a very long time to process (even hours or days). In that case, WAPI does not return the final result but code `1001` (request accepted). The system then sends you progress and the final result as [notifications](https://kb.wedos.global/wapi/manual/#notifications).

### Return Codes

Every response contains a numeric return code. The most common codes are:

- **1000** = OK
- **1001** = request accepted, the result will arrive in a [notification](https://kb.wedos.global/wapi/manual/#notifications)
- **2006** = request limit exceeded
- **2007** = maximum request size exceeded
- **2010** = unknown command
- **2050** = authentication failure
- **2051** = access from this IP address is not allowed
- **2052** = IP address temporarily blocked due to too many failed requests
- **4000** = internal error

Code categories by the first digit:

- **1xxx** = the request succeeded
- **2xxx** = incorrect request (missing or invalid parameters, wrong format or value)
- **3xxx** = target object error: the action cannot be performed because the object is not in the right state (for example, registering a domain that is already taken)
- **4xxx** = error while executing the request (for example, the domain registry is unavailable or communication failed)
- **5xxx** = internal error or state of our system

Code categories by the second digit:

- **x0xx, x1xx** = general codes
- **x2xx** = domains, contacts, credit account
- **x3xx** = DNS
- **x4xx** = WEDOS Global and WEDOS Protection

The codes of individual commands are listed in the article for each service; the full list is in [WAPI – Response Codes](https://kb.wedos.global/wapi/codes/).

---

## Activating WAPI

> Before activating WAPI, make sure you have an active [WEDOS credit account](https://kb.wedos.global/wedos/credit/).

Before you start using WAPI, activate it:

1. Log in to the [WEDOS Global administration](https://client.wedos.global/).
2. In the left panel, select **WAPI**.
3. If WAPI is not active yet, check **I agree with the terms and conditions of WEDOS services.** in the **WAPI Activation** section.
4. Click **Activate**.
5. In the **WAPI settings** form, fill in the details and confirm with **Set**:
   - **Allowed IP addresses:** comma-separated list of IP addresses (IPv4 and IPv6, CIDR notation supported) from which your system connects to WAPI.
   - **Notification mode:** how [notifications](https://kb.wedos.global/wapi/manual/#notifications) about asynchronous requests are delivered (POLL queue, email or URL).
   - **Preferred protocol:** format (XML or JSON) of [system notifications](https://kb.wedos.global/wapi/manual/#system-notifications) and of notifications sent by email or to a URL. Responses always use the same format as the request.
6. In the **Password settings** form, enter the WAPI password twice and click **Set**.

[Activate WAPI in the WEDOS Global Admin Panel](https://client.wedos.global/wapi)

![Setting allowed IP addresses and a Password for WAPI in WEDOS Global](https://kb.wedos.global/wp-content/uploads/2025/02/Global-WAPI-img01-1024x380.png)

The settings usually take effect immediately, at the latest within a few minutes.

You can change all settings later in the same way. Deleting all allowed IP addresses turns off access to WAPI.

---

## Integrating WAPI into Your System

After activation, you integrate WAPI into your system in these steps:

1. [set up a script to connect to WAPI](https://kb.wedos.global/wapi/manual/#connect),
2. [send a request](https://kb.wedos.global/wapi/manual/#request),
3. [receive and process the response](https://kb.wedos.global/wapi/manual/#response),
4. [receive and process notifications](https://kb.wedos.global/wapi/manual/#notifications) (for asynchronous requests).

> The following text assumes JSON. For XML, adjust your code accordingly.

### Connecting to WAPI

To connect, you need:

- your WEDOS login email and WAPI password,
- the WAPI URL for your format:
  - XML: `https://api.wedos.com/wapi/xml`
  - JSON: `https://api.wedos.com/wapi/json`

Every request contains the authorization string `auth`. It changes every hour and is calculated as follows:

1. Calculate the SHA-1 hash of the WAPI password.
2. Append it to your login email.
3. Append the current hour as two digits (`00`–`23`, for example `09`).
4. Calculate the **SHA-256** hash of the whole string (64 hexadecimal characters).

For backward compatibility, WAPI also accepts a string where the last step uses SHA-1 (40 characters). Use SHA-256 for new integrations.

The hour is taken in the Europe/Prague time zone (CET, UTC+1; during daylight saving time CEST, UTC+2). WAPI accepts the string for the current, previous and next hour, so a small clock difference around the turn of the hour does not matter.

> Use the WAPI password to communicate with WAPI. The customer account password does not work.

The following PHP script connects to WAPI and sends a [`ping`](https://kb.wedos.global/wapi/manual/#ping) request. Replace the login email and WAPI password with your own. For other commands, change `command` and add the `data` part with the command parameters.

```
<?php
date_default_timezone_set('Europe/Prague');
$login = 'your@login.tld';
$wpass = 'your-WAPI-password';
$auth = hash('sha256', $login . sha1($wpass) . date('H', time()));
$url = 'https://api.wedos.com/wapi/json';
$input = [ 'request' => [
    'user' => $login,
    'auth' => $auth,
    'command' => 'ping',
    'clTRID' => 'my-first-ping',
    // 'data' => ['parameter' => 'value'], // command parameters, if any
    // 'test' => 1, // optional: only checks the request, makes no changes
  ]
];

$post = json_encode($input);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, 'request=' . urlencode($post));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/x-www-form-urlencoded']);
$res = curl_exec($ch);
curl_close($ch);
echo $res; // WAPI response in JSON
?>
```

### WAPI Request

A request contains this data:

- **user** = login email of your WEDOS customer account (required)
- **auth** = authorization string (required), see [Connecting to WAPI](https://kb.wedos.global/wapi/manual/#connect)
- **command** = command name (required)
- **clTRID** = your request ID (optional). You can put any string here; WAPI returns it in the response.
- **data** = command parameters (optional). The parameters of each command are described in the article for the service.
- **test** = test mode (optional). With the value `1`, WAPI only checks the request and makes no changes.

JSON request template:

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "command name",
    "clTRID": "your request id (optional)",
    "data": {
      "parameter name": "value"
    },
    "test": 1
  }
}
```

### WAPI Response

A response contains this data:

- **code** = return code, see [Return Codes](https://kb.wedos.global/wapi/manual/#codes) and the article for the service
- **result** = description of the return code
- **timestamp** = processing time as a UNIX timestamp (seconds since 1 January 1970)
- **clTRID** = your request ID
- **svTRID** = server-side request ID
- **command** = command name
- **data** = returned data. If the request fails or is a test request, data is usually not returned.
- **test** = included only in responses to test requests

JSON response template:

```
{
  "response": {
    "code": 1000,
    "result": "OK",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "command name",
    "data": {
      "item name": "value"
    }
  }
}
```

Example response to a test `domain-create` request:

```
{
  "response": {
    "code": 1000,
    "result": "OK",
    "timestamp": 1286356644,
    "clTRID": "your request id",
    "svTRID": "1286356644.0246.21616",
    "command": "domain-create",
    "test": 1
  }
}
```

### Paging and Searching Lists

List commands have optional search and paging parameters. If you do not use them, WAPI returns the whole list in the same form as before.

Parameters in the `data` part of the request:

- **search** = text to search for, case-insensitive. For `domains-list` and `wgp-services-list` it searches the domain name, for `dns-rows-list` the record name or data.
- **page** = page number starting from 1 (default 1)
- **page_limit** = items per page, at most 1,000 (WAPI lowers a larger value to 1,000). If omitted or 0, WAPI returns all items.

The `dns-rows-list` command also has these filters:

- **row_name** = exact record name; `@` means a record directly on the domain
- **rdtype** = record type (`A`, `AAAA`, `MX`, `TXT`…), case-insensitive

If you enter any of these parameters, WAPI returns the list as an array (in the `domain` item for `domains-list`, `row` for `dns-rows-list`, `service` for `wgp-services-list`) and adds to the `data` part of the response:

- **total** = total number of items after filtering
- **page** = number of the returned page
- **page_limit** = items per page used (0 = all)

Things to keep in mind:

- A page beyond the end of the list returns an empty list with `total`, not an error.
- WAPI does not reject an invalid `page` or `page_limit` value (text, negative number); it replaces it with the default: `page` 1, `page_limit` 0 (all items).
- An array instead of a value in `page` or `page_limit` returns error `2101`.
- The `dns-domains-list` command always returns `total`, `page` and `page_limit`. If `page_limit` is omitted or 0, it uses 1,000.
- The `wgp-domain-templates-list` command has its own paging (`per_page`, `page`); see [WAPI – WEDOS Protection (WGP)](https://kb.wedos.global/wapi/wgp/).

`domains-list` request: active domains containing “example”, first page with two domains.

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "domains-list",
    "clTRID": "your request id",
    "data": {
      "status": "active",
      "search": "example",
      "page": 1,
      "page_limit": 2
    }
  }
}
```

`dns-rows-list` request: A records of the domain example.com, first page with 50 records.

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "dns-rows-list",
    "clTRID": "your request id",
    "data": {
      "domain": "example.com",
      "rdtype": "A",
      "page": 1,
      "page_limit": 50
    }
  }
}
```

### Notifications

Asynchronous requests cannot be completed immediately; you track their progress and result through notifications. Synchronous requests do not use notifications.

If WAPI cannot complete an operation immediately, it returns `1001` (Request pending). When the operation is completed (for more complex actions also after individual steps), it creates a notification similar to a response. You match a notification to its request by `clTRID` or `svTRID`.

Notification data is always encoded in UTF-8.

Depending on your WAPI settings, you can receive notifications:

- **through the POLL queue**, see the [`poll-req` and `poll-ack`](https://kb.wedos.global/wapi/manual/#poll) commands,
- **by email** to the address you entered,
- **over HTTP or HTTPS** to the URL you entered, using POST in the `request` parameter. An HTTP response with code 200 counts as successful delivery. If delivery fails, the system retries at intervals of several minutes.

JSON notification template:

```
{
  "notify": {
    "code": 1000,
    "result": "OK",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "command name",
    "id": "POLL queue id",
    "data": {
      "item name": "value"
    }
  }
}
```

### System Notifications

System notifications inform you about important events that were not triggered by your request. Currently, this is only the transfer of a domain to another registrar. If you have WAPI active, the system sends this information as a notification, just like for an asynchronous request.

The format of system notifications sent by email or to a URL is set by **Preferred protocol** in the [WAPI settings](https://kb.wedos.global/wapi/manual/#activate). A notification downloaded from the POLL queue comes in the same format in which you sent the `poll-req` command.

The structure is the same as for a regular notification; `command` is always `system-notify` and the details are in the `data` part.

### Request and Notification Log

You can find an overview of your WAPI requests in the WEDOS Global administration:

1. Log in to the [WEDOS Global administration](https://client.wedos.global/).
2. In the left panel, select **WAPI**.
3. Select **WAPI requests**.

We keep the request log for 30 days.

Sent and unsent notifications are in the same section under **WAPI notifications**. For each notification, you can see its type, command, return code, state, creation and sending time and the number of delivery attempts.

---

## Basic Requests

The basic requests are [`ping`](https://kb.wedos.global/wapi/manual/#ping), [`ping-async`](https://kb.wedos.global/wapi/manual/#ping-async) and the POLL queue commands [`poll-req` and `poll-ack`](https://kb.wedos.global/wapi/manual/#poll).

### ping

The `ping` request tests WAPI: your login, IP address or code.

Return codes:

- 1000 = OK

JSON request:

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "ping",
    "clTRID": "your request id"
  }
}
```

JSON response:

```
{
  "response": {
    "code": 1000,
    "result": "OK",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "ping"
  }
}
```

### ping-async

The `ping-async` request tests WAPI notification delivery.

Return codes:

- 1000 = OK
- 1001 = request accepted, the result will arrive in a notification

JSON request:

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "ping-async",
    "clTRID": "your request id"
  }
}
```

JSON response:

```
{
  "response": {
    "code": 1001,
    "result": "Request pending",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "ping-async"
  }
}
```

JSON notification:

```
{
  "notify": {
    "code": 1000,
    "result": "OK",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "ping-async",
    "id": "POLL queue id",
    "data": {
      "round": "attempt number",
      "time": "time",
      "done": 1
    }
  }
}
```

### poll-req and poll-ack

You download notifications from the POLL queue with a combination of `poll-req` and `poll-ack`:

- `poll-req` downloads the oldest unread notification,
- `poll-ack` marks it as read and makes the next one available, until the queue is empty.

> Notifications in the POLL queue are deleted automatically after 30 days.

`poll-req` return codes:

- 1000 = notification downloaded
- 1003 = there is no unread notification in the queue
- 2150 = downloading notifications from the POLL queue is not allowed for this account

JSON `poll-req` request:

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "poll-req",
    "clTRID": "your request id"
  }
}
```

JSON `poll-req` response (notification available):

```
{
  "response": {
    "code": 1000,
    "result": "OK",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "poll-req",
    "data": {
      "notify": {
        "code": 1000,
        "result": "OK",
        "timestamp": "UNIX time",
        "clTRID": "your id of the original request",
        "svTRID": "server id of the original request",
        "command": "command name",
        "id": "POLL queue id"
      }
    }
  }
}
```

JSON `poll-req` response (queue empty):

```
{
  "response": {
    "code": 1003,
    "result": "Empty notifications queue",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "poll-req"
  }
}
```

`poll-ack` parameters:

- **id** = notification ID in the POLL queue (required)

`poll-ack` return codes:

- 1002 = notification marked as read
- 2151 = notification not found

JSON `poll-ack` request:

```
{
  "request": {
    "user": "your@login.tld",
    "auth": "generated auth string",
    "command": "poll-ack",
    "clTRID": "your request id",
    "data": {
      "id": "POLL notification id"
    }
  }
}
```

JSON `poll-ack` response:

```
{
  "response": {
    "code": 1002,
    "result": "Notification acquired",
    "timestamp": "UNIX time",
    "clTRID": "your request id",
    "svTRID": "server request id",
    "command": "poll-ack"
  }
}
```

---

## Solving Common Problems

The most common WAPI problems are:

- [request authentication failure](https://kb.wedos.global/wapi/manual/#issue-auth),
- [no response to requests](https://kb.wedos.global/wapi/manual/#issue-no-response).

### Request Authentication Failure

**Problem:** WAPI returns code `2050` (authentication failure) or `2051` (access from this IP address is not allowed).

**Cause:** the authorization string is wrong (wrong login, password or time), or your system connects from an IP address that is not allowed.

**Solution:** make sure that:

- your system’s IP address is among the allowed IP addresses in the [administration](https://client.wedos.global/wapi) (see [Activating WAPI](https://kb.wedos.global/wapi/manual/#activate)),
- your script uses the WAPI password, not the customer account password,
- your script takes the hour in the Europe/Prague time zone and the server clock is synchronized,
- your script calculates `auth` exactly as described in [Connecting to WAPI](https://kb.wedos.global/wapi/manual/#connect) (SHA-1 of the password, then SHA-256 or SHA-1 of the whole string),
- enough time has passed since you changed the WAPI settings (see [Activating WAPI](https://kb.wedos.global/wapi/manual/#activate)).

Every invalid request counts towards the [invalid request limit](https://kb.wedos.global/wapi/manual/#restrictions). If WAPI returns code `2052`, your IP address is temporarily blocked. Fix the cause first, then send a new request.

### No Response to Requests

**Problem:** I do not get any responses to my requests.

**Cause:** the request did not reach WAPI or the connection failed. It is not an authentication error; in that case WAPI responds with code `2050` or `2051`.

**Solution:** check [WEDOS Status](https://wedos.status.online/en/) for outages. Then make sure that:

- your script sends the request to the correct [WAPI URL](https://kb.wedos.global/wapi/manual/#connect) over HTTPS using POST,
- your server can open outgoing HTTPS connections.

If the problem persists, contact us through the [contact form](https://client.wedos.com/en/contact/cform.html).

---

## Frequently Asked Questions

**Can I use all WAPI commands if I activated WAPI through WEDOS Global?**

Yes. Regardless of which administration you activated WAPI in, you can use all commands in your system.

**Do I have to switch from SHA-1 to SHA-256?**

No, WAPI still accepts an authorization string calculated with SHA-1. We recommend SHA-256 for new integrations.
