This article describes the WAPI commands for the WEDOS Protection service. WAPI setup, authentication and troubleshooting are covered in WAPI – Manual. The full list of codes is in WAPI – Return Codes.
This article covers the following commands:
- wgp-domain-create – add a domain to WEDOS Protection
- wgp-domain-info – information about a domain in WEDOS Protection
- wgp-domain-renew – renew the service
- wgp-domain-delete – cancel the service
- wgp-domain-delete-order – delete the order of a domain whose setup failed
- wgp-domain-update-subscription – change the plan or billing period
- wgp-domain-create-retry – retry certificate issuance
- wgp-domain-cache-purge – purge the cache
- wgp-domain-template-replicate – apply a template to an existing domain
- wgp-domain-cert-upload – upload a custom certificate
- wgp-domain-cert-delete – delete the custom certificate
- wgp-domain-cert-type-change – switch between the custom certificate and Let’s Encrypt
- wgp-domain-show-origin-ips – list the domain’s target IP addresses
- wgp-domain-update-origin-ips – set the domain’s target IP addresses
- wgp-domain-templates-list – list template domains
- wgp-services-list – list WEDOS Protection services
Invitations of WEDOS Global members (wg-members-*) are described in the separate article WAPI – WEDOS Global Members.
General information
- Parameter names and values in JSON (
domain,mode,state…) must be used exactly as shown in this article. - Common codes: any command can return 2100 (required parameter missing) and 2101 (invalid parameter value). They are not repeated for each command.
- Plans (
variant_id,new_variant_id): through WAPI you can only order or set a plan that is currently offered; any other value returns 2273.1= Free – starter plan2= NoLimit – plan suitable for businesses4= Managed – highest level of security5= NIS2 Important – for entities subject to the NIS2 legislation6= NIS2 Essential – for entities subject to the NIS2 legislation
You can find current information about plans and prices in the WEDOS Protection pricing ⧉.
- Billing period (
period_id,new_period_id): 1 = monthly, 4 = yearly. - Test mode: a request with
"test": 1validates the input parameters and changes nothing. Some commands check more in test mode; see the command description.
wgp-domain-create
Use wgp-domain-create to add a domain to WEDOS Protection. The command is asynchronous: it returns 1001 and the result arrives in a notification.
If the domain already exists in WEDOS Protection in the disabled state (the service was previously disabled), the command reactivates it.
Parameters
- domain = domain name (required), without the
www.prefix - variant_id = service plan (required), see General information
- period_id = billing period (required): 1 = monthly, 4 = yearly
- upstream_ips = array of your server’s target IP addresses (optional); see Protection – Target Servers
- template_domain_id = template domain ID (optional), see wgp-domain-templates-list
- mode = domain mode (optional):
ns= the domain uses WEDOS DNS servers. It is activated only after the system verifies that the domain really uses WEDOS DNS. Default for second-level domains.cname= the domain stays with another DNS provider and points to WEDOS Protection using CNAME records. Default and the only mode for third- and higher-level domains (subdomains).
For more about adding a domain, see Protection – Adding a New Domain.
Return codes
- 1000 = OK
- 1001 = request accepted, the result will arrive in a notification
- 2202 = invalid or unsupported domain name format
- 2203 = invalid period_id
- 2272 = invalid IP address format
- 2273 = invalid plan or plan not currently offered
- 2274 = internal error – user_id missing
- 2275 = internal error – user not found
- 2276 = unsupported TLD or maximum domain level exceeded
- 2277 = the domain name must not start with www.
- 2278 = a service already exists for this domain
- 2279 = credit account is locked
- 2281 = credit account is not active
- 2282 = the credit account cannot pay in the given currency
- 2283 = insufficient credit account balance or invalid amount
- 2284 = error in the credit account contact details
- 2285 = incorrect VAT billing setting
- 2286 = credit account – internal error
- 2290 = the credit account transaction was not added
- 2291 = the domain already exists in WEDOS Protection for this customer account
- 2293 = unable to get the credit account balance
- 2294 = unable to get the service price
- 2295 = the domain could not be created, the payment was cancelled
- 2296 = the credit account transaction cannot be reversed
- 2400 = WEDOS Protection internal error
- 2401 = the template cannot be applied to the domain
- 2402 = invalid template domain
- 2403 = the template domain belongs to another user
- 2404 = the template domain has a different plan
- 2405 = daily template usage limit reached
- 2407 = template domain not found
- 2416 = invalid domain mode
- 2417 = invalid or unsupported subdomain name format
- 2422 = internal error – unable to determine the account type
- 2423 = internal error – WEDOS Protection call failed
- 4000 = internal error
Response data
- WGP_ID = domain ID in WEDOS Protection
- domain = domain name
- order_num = order number
- currency = credit account currency
- amount = service price
- acc_amount_before = credit account balance before the order
- acc_amount_current = credit account balance after the order
Notification data
- WGP_ID = domain ID in WEDOS Protection
- domain = domain name
- order_num = order number
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-create",
"clTRID": "your request id",
"data": {
"domain": "domain.tld",
"variant_id": 2,
"period_id": 4,
"upstream_ips": ["203.0.113.10", "2001:db8::10"],
"template_domain_id": "template domain ID (optional)",
"mode": "ns or cname (optional)"
}
}
}
JSON response (request accepted):
{
"response": {
"code": 1001,
"result": "Request pending",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-create",
"data": {
"WGP_ID": "domain ID in WEDOS Protection",
"domain": "domain.tld",
"order_num": "order number",
"currency": "currency code",
"amount": "price",
"acc_amount_before": "balance before the order",
"acc_amount_current": "balance after the order"
}
}
}
JSON notification after completion:
{
"notify": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-create",
"id": "POLL queue id",
"data": {
"WGP_ID": "domain ID in WEDOS Protection",
"domain": "domain.tld",
"order_num": "order number"
}
}
}
wgp-domain-info
Use wgp-domain-info to get the state of a domain in WEDOS Protection and the service details from the WEDOS administration.
Parameters
- domain = domain name (required). To get information about several domains at once, enter their names separated by commas (e.g.
domain1.tld,domain2.tld). Invalid names are then skipped.
Return codes
- 1000 = OK
- 2202 = invalid or unsupported domain name format
- 2274 = internal error – user_id missing
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 2418 = the verification TXT record is missing for a domain in the pending_txt state
Response data
- wgp = domain details in WEDOS Protection. The
stateitem is the domain state, andstate_dataholds data depending on the state:pending_dns= the domain’s DNS records are being loadedpending_dns_refresh= the domain’s DNS records are being loaded again because none were found in the pending_dns stateprocessing= waiting for the service to be set upstuck= waiting for software requirements to be met; just waitpending_txt= waiting for the domain to be verified by a TXT record in DNS (see the example below)pending_ns= waiting for the DNS servers in ns mode or the CNAME records in cname mode (see the examples below)pending_crt= waiting for the Let’s Encrypt certificate to be issued, usually 8–30 minuteserror_crt= the domain stayed in the pending_crt state for too long. After fixing the cause (usually the DNS settings), you can retry the certificate issuance with wgp-domain-create-retry.active= the domain is active (full example below)disabled= the service is disabled
In the pending_dns, pending_dns_refresh, processing, stuck, pending_crt and error_crt states, the response does not contain state_data.
- service = service details in the WEDOS administration. If the service does not exist in the administration yet (the domain is still being set up), it contains
"success": 0with a code and description.
When you request several domains, data contains an array of items, each with its own wgp and service.
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-info",
"clTRID": "your request id",
"data": {
"domain": "domain.tld"
}
}
}
JSON response (OK, active state):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-info",
"data": {
"wgp": {
"domain": "domain.tld",
"domain_id": "domain ID in WEDOS Protection",
"domain_tld": "tld",
"domain_registrable": "registrable domain (for a subdomain, the second-level domain)",
"mode": "ns or cname",
"settings": {
"cache": "empty = off, 1 = on"
},
"url": "https://client.wedos.global/protection/domains/-/domain.tld",
"state": "active",
"state_data": {
"dns_approval_url": "link to approve rewriting the DNS records to WEDOS Protection",
"dns_ip_addresses": ["WEDOS Protection IPv4 address", "WEDOS Protection IPv6 address"],
"dns_pointing_to_proxy": "empty = DNS does not point to WEDOS Protection, 1 = it does",
"dns_records_new": [
{ "name": "", "data": "WEDOS Protection IPv4 address", "type": "A", "ttl": 300 },
{ "name": "*", "data": "WEDOS Protection IPv4 address", "type": "A", "ttl": 300 },
{ "name": "", "data": "WEDOS Protection IPv6 address", "type": "AAAA", "ttl": 300 },
{ "name": "*", "data": "WEDOS Protection IPv6 address", "type": "AAAA", "ttl": 300 }
],
"dns_records": [
{ "name": "", "data": "current IPv4 address", "type": "A", "ttl": 300 },
{ "name": "*", "data": "current IPv4 address", "type": "A", "ttl": 300 },
{ "name": "", "data": "current IPv6 address", "type": "AAAA", "ttl": 300 },
{ "name": "*", "data": "current IPv6 address", "type": "AAAA", "ttl": 300 }
]
}
},
"service": {
"ID": "service ID",
"name": "domain.tld",
"num": "order number",
"user_id": "customer account ID",
"lang": "language code",
"currency": "currency code",
"cli_legal_type": "billing – 1 = individual, 2 = sole trader, 3 = legal entity",
"cli_company": "billing – company name",
"cli_fname": "billing – first name",
"cli_lname": "billing – last name",
"cli_email": "billing – email",
"cli_email2": "billing – backup email",
"cli_phone": "billing – phone",
"cli_mobile": "billing – mobile",
"cli_fax": "billing – fax",
"cli_ic": "billing – company ID",
"cli_dic": "billing – VAT ID",
"cli_taxpayer": "billing – VAT payer (0/1)",
"cli_addr_street": "billing – street and number",
"cli_addr_city": "billing – city",
"cli_addr_zip": "billing – postal code",
"cli_addr_country": "billing – country code",
"cli_name_vies": "billing – name in VIES",
"own_legal_type": "owner – 1 = individual, 2 = sole trader, 3 = legal entity",
"own_company": "owner – company name",
"own_fname": "owner – first name",
"own_lname": "owner – last name",
"own_email": "owner – email",
"own_phone": "owner – phone",
"own_ic": "owner – company ID",
"own_dic": "owner – VAT ID",
"own_addr_street": "owner – street and number",
"own_addr_city": "owner – city",
"own_addr_zip": "owner – postal code",
"own_addr_country": "owner – country code",
"status": "service status in the WEDOS administration",
"expiration": "expiration date YYYY-MM-DD"
}
}
}
}
The service part when the service does not exist in the administration yet:
{
"service": {
"success": 0,
"code": 3222,
"result": "Domain open failed"
}
}
The wgp part in the pending_txt state. Create the verification TXT record named name_formatted with the value value at your DNS provider. The other items are the same as in the full example:
{
"state": "pending_txt",
"state_data": {
"name": "_wgp_verification",
"name_formatted": "_wgp_verification.domain.tld",
"value": "9b8bd11961194a1343d03379c84720045cdfd03b9a"
}
}
The wgp part in the pending_ns state, ns mode:
- assigned = WEDOS DNS servers to set for the domain. They are assigned individually (
wedos-global-ns-{code}.wedos.cz/.eu/.com/.net), so always take them from the response. - assigned_own = your own DNS servers allowed instead of the assigned ones by agreement. If there are none, it is an empty array.
- resolved = DNS servers the domain currently uses.
- resolved_at, next_resolve_at = time of the last and next DNS check (UTC).
{
"state": "pending_ns",
"state_data": {
"assigned": [
"wedos-global-ns-a1b2c3d4.wedos.cz",
"wedos-global-ns-a1b2c3d4.wedos.eu",
"wedos-global-ns-a1b2c3d4.wedos.com",
"wedos-global-ns-a1b2c3d4.wedos.net"
],
"assigned_own": [],
"resolved": [
"ns1.previous-provider.tld",
"ns2.previous-provider.tld"
],
"resolved_at": "2026-11-23T08:43:04.000000Z",
"next_resolve_at": "2026-11-23T08:50:25.000000Z"
}
}
The wgp part in the pending_ns state, cname mode. Create the crt_cname and cname records at your DNS provider exactly as returned in the response.:
{
"state": "pending_ns",
"state_data": {
"crt_cname": [
{ "name": "_acme-challenge", "value": "_acme-challenge.domain.tld.wedos.global" }
],
"cname": [
{ "name": "*", "value": "domain.tld.wedos.global" },
{ "name": "www", "value": "domain.tld.wedos.global" }
],
"resolved_at": "2026-11-23T08:43:04.000000Z",
"next_resolve_at": "2026-11-23T08:50:25.000000Z"
}
}
wgp-domain-renew
Use wgp-domain-renew to renew a WEDOS Protection service for another period. A service in the active, expired or disabled state can be renewed.
Parameters
- service_id = service ID (required)
Return codes
- 1000 = OK
- 2152 = the service cannot be renewed
- 2274 = internal error – user_id missing
- 2279 = credit account is locked
- 2281 = credit account is not active
- 2282 = the credit account cannot pay in the given currency
- 2283 = insufficient credit account balance or invalid amount
- 2284 = error in the credit account contact details
- 2286 = credit account – internal error
- 2293 = unable to get the credit account balance
- 2297 = unable to determine whether the credit account includes VAT
- 2406 = service not found
- 2409 = renewal failed
- 3223 = the service belongs to another customer account
Response data
- service_id = service ID
- name = domain name
- date_from = start of the renewed period
- date_to = service expiration date
- fakt_order_num = renewal order number
- currency = currency
- price = renewal price
- credit = credit account balance after the renewal (
nullfor the Free plan and trial services)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-renew",
"clTRID": "your request id",
"data": {
"service_id": "service ID"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-renew",
"data": {
"service_id": "service ID",
"name": "domain.tld",
"date_from": "YYYY-MM-DD",
"date_to": "YYYY-MM-DD",
"fakt_order_num": "order number",
"currency": "currency code",
"price": "price",
"credit": "credit account balance"
}
}
}
wgp-domain-delete
Use wgp-domain-delete to cancel the WEDOS Protection service for a domain. If possible, WEDOS Protection restores the domain’s DNS records to their original state.
Parameters
- service_id = service ID (required)
- force = delete the domain without changing its A and AAAA records (optional). The values
true,1and"true"mean yes; any other value means no. Use it when WEDOS Protection is not authorized to change the domain’s DNS records (code 2414).
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2410 = service not found in WEDOS Protection
- 2411 = no authorization to change DNS is available
- 2412 = changing the DNS records failed
- 2413 = WEDOS Protection is not authorized to change the domain’s DNS records
- 2414 = WEDOS Protection is not authorized to change DNS and the request does not contain
"force": true - 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- wedos_client_id = customer account ID
- service_id = service ID
- service_type = service type
- wdns_data = changes made to the A and AAAA records (
rem= removed,add= added,stay= unchanged)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-delete",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"force": false
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-delete",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"wedos_client_id": "customer account ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"wdns_data": {
"domain": "domain.tld",
"rows_a": {
"rem": {
"removed record ID": { "name": "name", "ttl": "TTL", "rdtype": "A", "rdata": "IPv4 address" }
},
"add": {
"added record ID": { "name": "name", "ttl": "TTL", "rdtype": "A", "rdata": "IPv4 address" }
},
"stay": ["unchanged addresses"]
},
"rows_aaaa": {
"rem": {
"removed record ID": { "name": "name", "ttl": "TTL", "rdtype": "AAAA", "rdata": "IPv6 address" }
},
"add": {
"added record ID": { "name": "name", "ttl": "TTL", "rdtype": "AAAA", "rdata": "IPv6 address" }
},
"stay": ["unchanged addresses"]
}
}
}
}
}
wgp-domain-delete-order
Use wgp-domain-delete-order to remove a domain from WEDOS Protection when its order was not completed (no service was created). This command does not cancel an existing service; use wgp-domain-delete for that.
Parameters
- domain = domain name (required)
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 2410 = service not found in WEDOS Protection
- 2421 = the service exists, the domain will not be deleted
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- wedos_client_id = customer account ID
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-delete-order",
"clTRID": "your request id",
"data": {
"domain": "domain.tld"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-delete-order",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"wedos_client_id": "customer account ID"
}
}
}
JSON response (error – the service already exists):
{
"response": {
"code": 2421,
"result": "WGP service exists, the domain will not be deleted",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-delete-order"
}
}
wgp-domain-update-subscription
Use wgp-domain-update-subscription to change the plan or the billing period of a service. Enter at least one of new_variant_id and new_period_id; a value you omit stays unchanged.
Parameters
- service_id = service ID (required)
- new_variant_id = new plan (optional), see General information. If the service has a plan that is no longer offered, it keeps that plan as long as you do not change it.
- new_period_id = new billing period (optional): 1 = monthly, 4 = yearly
Return codes
- 1000 = OK
- 2203 = invalid new_period_id
- 2273 = invalid plan or plan not currently offered
- 2274 = internal error – user_id missing
- 2279 = credit account is locked
- 2281 = credit account is not active
- 2282 = the credit account cannot pay in the given currency
- 2283 = insufficient credit account balance or invalid amount
- 2284 = error in the credit account contact details
- 2285 = incorrect VAT billing setting
- 2286 = credit account – internal error
- 2293 = unable to get the credit account balance
- 2294 = unable to get the service price
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2408 = both new_variant_id and new_period_id are missing
- 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- wedos_client_id = customer account ID
- service_id = service ID
- service_type = service type
- variant_id = service plan
- period_id = billing period
- dirty = 1 = changed, 0 = no change
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-update-subscription",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"new_variant_id": 2,
"new_period_id": 4
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-update-subscription",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"wedos_client_id": "customer account ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"variant_id": 2,
"period_id": 4,
"dirty": 1
}
}
}
wgp-domain-create-retry
Use wgp-domain-create-retry to retry issuing the domain’s certificate. Use it when wgp-domain-info returns the error_crt state.
A test request ("test": 1) also checks that the domain exists in your customer account.
Parameters
- domain = domain name (required)
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- wedos_client_id = customer account ID
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-create-retry",
"clTRID": "your request id",
"data": {
"domain": "domain.tld"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-create-retry",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"wedos_client_id": "customer account ID"
}
}
}
wgp-domain-cache-purge
Use wgp-domain-cache-purge to purge the domain’s cache in WEDOS Protection. A limiter prevents repeated purging: the next purge is possible only after the set time has passed.
Parameters
- service_id = service ID (required)
- service_type = service type (optional):
hosting_wedos_protection(default) orhosting_domain - limiter_decay = time in seconds during which another purge is not possible (optional, default 5)
- limiter_reset = reset the limiter (optional): 0 = no (default), 1 = yes
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2415 = the cache cannot be purged yet, the limiter is still running
- 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- domain_tld = domain TLD
- service_id = service ID
- wedos_client_id = customer account ID
- limiter_available_in = seconds until the cache can be purged again
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-cache-purge",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"limiter_decay": 5,
"limiter_reset": 0
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-cache-purge",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"domain_tld": "tld",
"service_id": "service ID",
"wedos_client_id": "customer account ID",
"limiter_available_in": "number of seconds"
}
}
}
wgp-domain-template-replicate
Use wgp-domain-template-replicate to copy the settings of a selected template domain to an existing domain.
Create the template as described in Protection – Templates; templates cannot be created through WAPI. wgp-domain-templates-list returns the list of templates.
Parameters
- service_id = service ID (required)
- template_domain_id = template domain ID (required)
- service_type = service type (optional):
hosting_wedos_protection(default) orhosting_domain
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 2401 = the template cannot be applied to the domain
- 2402 = invalid template domain
- 2403 = the template domain belongs to another user
- 2404 = the template domain has a different plan
- 2405 = daily template usage limit reached
- 2406 = service not found
- 2407 = template domain not found
- 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- service_id = service ID
- service_type = service type
- template_domain_id = template domain ID
- replications_count = number of template uses
- replications_limit = maximum number of template uses
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-template-replicate",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"template_domain_id": "template domain ID",
"service_type": "hosting_wedos_protection"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-template-replicate",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"template_domain_id": "template domain ID",
"replications_count": "number of uses",
"replications_limit": "usage limit"
}
}
}
wgp-domain-cert-upload
Use wgp-domain-cert-upload to upload a custom SSL/TLS certificate for a domain in WEDOS Protection. A domain can have at most one custom certificate; a new upload replaces the previous one.
The certificate reaches the WEDOS Protection servers within a few minutes. When the custom certificate expires, the domain automatically switches to a Let’s Encrypt certificate (cert_in_use = letsencrypt, the selected cert_type stays custom).
The certificate, private key and CA chain are validated before sending (PEM format, key matches the certificate, validity). Whether the certificate is issued for the service’s domain is checked by WEDOS Protection only on a real upload.
A request with this command can be up to 64 KB (other commands 4 KB). The private key and its passphrase are not stored in the request log.
How custom certificates work in the administration is described in Protection – HTTPS Pass-Through, HSTS, Certificates.
Parameters
- service_id = service ID (required)
- service_type = service type (optional):
hosting_wedos_protection(default) orhosting_domain - crt = certificate in PEM format (required). It can include intermediate certificates; the first one must be the domain certificate.
- private_key = private key in PEM format (required)
- ca = certificate authority chain in PEM format (optional)
- passphrase = passphrase of an encrypted private key (optional)
- activate = start using the custom certificate immediately (optional):
true/1(default) = the domain starts using the custom certificate immediatelyfalse/0= the domain stays on Let’s Encrypt until you switch it with wgp-domain-cert-type-change
Return codes
- 1000 = OK
- 2007 = the request exceeds the maximum size
- 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2425 = invalid certificate
- 2426 = invalid private key or wrong passphrase
- 2427 = the private key does not match the certificate
- 2428 = invalid CA chain
- 2429 = the certificate has expired
- 2430 = the certificate is not issued for the domain (the domain is neither in the SAN nor covered by a wildcard)
- 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- service_id = service ID
- service_type = service type
- cert_type = selected certificate type (
custom/letsencrypt) - cert_in_use = certificate the domain actually uses (
custom/letsencrypt) - custom_cert = custom certificate details, or
nullif the domain has none:- names = domain names in the certificate
- issuer = issuer
- valid_from = start of validity (Prague time)
- valid_to = end of validity (Prague time)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-cert-upload",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"crt": "-----BEGIN CERTIFICATE-----\n...\n-----END CERTIFICATE-----\n",
"private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
"ca": "CA chain in PEM format (optional)",
"passphrase": "key passphrase (optional)",
"activate": true
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-cert-upload",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"cert_type": "custom",
"cert_in_use": "custom",
"custom_cert": {
"names": ["domain.tld", "www.domain.tld"],
"issuer": "certificate issuer",
"valid_from": "YYYY-MM-DD HH:MM:SS",
"valid_to": "YYYY-MM-DD HH:MM:SS"
}
}
}
}
A test request ("test": 1) validates the parameters, including the certificate, key and CA chain. It does not check whether the certificate is issued for the service’s domain: code 2430 is returned only on a real upload.
wgp-domain-cert-delete
Use wgp-domain-cert-delete to delete the domain’s custom certificate. The domain returns to the Let’s Encrypt certificate.
Parameters
- service_id = service ID (required)
- service_type = service type (optional):
hosting_wedos_protection(default) orhosting_domain
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2431 = the domain has no custom certificate
- 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
The same as for wgp-domain-cert-upload. After deletion, both cert_type and cert_in_use are letsencrypt and custom_cert is null.
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-cert-delete",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"service_type": "hosting_wedos_protection"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-cert-delete",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"cert_type": "letsencrypt",
"cert_in_use": "letsencrypt",
"custom_cert": null
}
}
}
A test request ("test": 1) only validates the parameters and service ownership. Whether the domain has a custom certificate (code 2431) is checked only on a real request.
wgp-domain-cert-type-change
Use wgp-domain-cert-type-change to switch the domain between the custom certificate and the Let’s Encrypt certificate.
You can switch to the custom certificate (custom) only if the domain has an uploaded custom certificate that has not expired. Setting the same value again changes nothing and returns 1000. Switching to Let’s Encrypt does not delete the custom certificate; it stays saved and you can switch back later.
Parameters
- service_id = service ID (required)
- service_type = service type (optional):
hosting_wedos_protection(default) orhosting_domain - cert_type = certificate type (required):
custom= custom certificate,letsencrypt= Let’s Encrypt
Return codes
- 1000 = OK
- 2101 = invalid parameter value (including
cert_typeother thancustom/letsencrypt) - 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 2406 = service not found
- 2429 = the custom certificate has expired (only for
custom) - 2431 = the domain has no custom certificate (only for
custom) - 3223 = the service belongs to another customer account
- 4000 = internal error
Response data
The same as for wgp-domain-cert-upload.
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-cert-type-change",
"clTRID": "your request id",
"data": {
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"cert_type": "letsencrypt"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-cert-type-change",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"service_id": "service ID",
"service_type": "hosting_wedos_protection",
"cert_type": "letsencrypt",
"cert_in_use": "letsencrypt",
"custom_cert": {
"names": ["domain.tld", "www.domain.tld"],
"issuer": "certificate issuer",
"valid_from": "YYYY-MM-DD HH:MM:SS",
"valid_to": "YYYY-MM-DD HH:MM:SS"
}
}
}
}
A test request ("test": 1) only validates the parameters and service ownership. The validity and existence of the custom certificate (codes 2429 and 2431) are checked only on a real request.
wgp-domain-show-origin-ips
Use wgp-domain-show-origin-ips to list the domain’s target IP addresses. These are the addresses of your server to which WEDOS Protection forwards visitor traffic. In the WEDOS Global administration, you can find them on the domain’s Target servers page.
You identify the domain by its name, not by the service ID. The domain must be in WEDOS Protection under your customer account.
Parameters
- domain = domain name (required)
Return codes
- 1000 = OK
- 2202 = invalid or unsupported domain name format
- 2274 = internal error – user_id missing
- 2276 = unsupported TLD or maximum domain level exceeded
- 2277 = the domain name must not start with www.
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 2417 = invalid or unsupported subdomain name format
- 4000 = internal error
Response data
- domain = domain name
- domain_id = domain ID in WEDOS Protection
- domain_tld = domain TLD
- wedos_client_id = customer account ID
- state = domain state in WEDOS Protection
- ipv4 = target IPv4 addresses
- ipv6 = target IPv6 addresses
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-show-origin-ips",
"clTRID": "your request id",
"data": {
"domain": "domain.tld"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-show-origin-ips",
"data": {
"domain": "domain.tld",
"domain_id": "domain ID",
"domain_tld": "tld",
"wedos_client_id": "customer account ID",
"state": "active",
"ipv4": ["203.0.113.10"],
"ipv6": ["2001:db8::10"]
}
}
}
A test request ("test": 1) only validates the parameters and returns 1000 without data. It does not check whether the domain exists.
wgp-domain-update-origin-ips
Use wgp-domain-update-origin-ips to set the domain’s target IP addresses (the same as on the Target servers page in the WEDOS Global administration).
The addresses you send replace all existing ones. To add an address, send the existing addresses (from wgp-domain-show-origin-ips) together with the new one. An empty array deletes all target addresses, which is why upstream_ips is required even in that case.
Only individual public IP addresses (IPv4 and IPv6) are allowed. Ranges, CIDR notation (/24), leading zeros (010.0.0.1) and non-public addresses (private networks, loopback, link-local, documentation ranges, etc.) are not allowed. Addresses are converted to canonical form and duplicates are skipped.
Parameters
- domain = domain name (required)
- upstream_ips = array of target IP addresses, IPv4 and IPv6 in one array (required). An empty array deletes all target addresses.
Return codes
- 1000 = OK
- 2202 = invalid or unsupported domain name format
- 2272 = invalid IP address format
- 2274 = internal error – user_id missing
- 2276 = unsupported TLD or maximum domain level exceeded
- 2277 = the domain name must not start with www.
- 2292 = the domain does not exist in WEDOS Protection for this customer account
- 2400 = WEDOS Protection internal error
- 2417 = invalid or unsupported subdomain name format
- 2432 = the IP address is not public
- 4000 = internal error
Response data
- domain = domain name
- upstream_ips = target IP addresses that were set
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-update-origin-ips",
"clTRID": "your request id",
"data": {
"domain": "domain.tld",
"upstream_ips": ["203.0.113.10", "2001:db8::10"]
}
}
}
XML request (an array is sent by repeating the element):
<request>
<user>your@login.tld</user>
<auth>generated auth string</auth>
<command>wgp-domain-update-origin-ips</command>
<clTRID>your request id</clTRID>
<data>
<domain>domain.tld</domain>
<upstream_ips>203.0.113.10</upstream_ips>
<upstream_ips>2001:db8::10</upstream_ips>
</data>
</request>
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-update-origin-ips",
"data": {
"domain": "domain.tld",
"upstream_ips": ["203.0.113.10", "2001:db8::10"]
}
}
}
A test request ("test": 1) validates the parameters, the IP addresses and that the domain exists in your customer account. It does not change the target addresses.
wgp-domain-templates-list
Use wgp-domain-templates-list to get a list of template domains for the selected plan.
Create the template as described in Protection – Templates; templates cannot be created through WAPI.
Parameters
- variant_id = plan (required), see General information
- per_page = records per page (optional, default 15,
-1= all) - page = page number (optional, default 1)
- locale = language of the paging labels (optional):
en(default) orcs - search = text to search for in
custom_nameandname(optional)
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
- 2400 = WEDOS Protection internal error
- 4000 = internal error
Response data
- data = list of template domains:
- id = template domain ID
- custom_name = template name set by the user
- name = system name of the template domain
- url = template domain URL
- first_page_url, last_page_url, next_page_url, prev_page_url = URLs of the first, last, next and previous page
- from, to = position of the first and last record on the page
- last_page = number of the last page
- links = paging links (
url,label,active) - path = list URL
- per_page = records per page
- total = total number of records (after search)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-domain-templates-list",
"clTRID": "your request id",
"data": {
"variant_id": 2,
"per_page": 15,
"page": 1,
"locale": "en",
"search": "search text (optional)"
}
}
}
JSON response (OK):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-domain-templates-list",
"data": {
"data": [
{
"id": "template domain ID",
"custom_name": "template name",
"name": "system-name.template",
"url": "template domain URL"
}
],
"first_page_url": "URL of the first page",
"from": 1,
"last_page": 1,
"last_page_url": "URL of the last page",
"links": [
{ "url": "page URL", "label": "label", "active": true }
],
"next_page_url": null,
"path": "list URL",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
}
}
}
wgp-services-list
Use wgp-services-list to get a list of WEDOS Protection services in your customer account. You can filter the list by status, search it and page through it.
The list only includes domains for which a service has already been created. A domain added in B2B mode appears only after its setup is complete; until then, use wgp-domain-info to check its state.
Parameters
- status = service status (optional):
active,expired,disabledordeleted - search = text to search for in the domain name, case-insensitive (optional)
- page = page number starting from 1 (optional, default 1)
- page_limit = items per page, at most 1000 (optional). If omitted or 0, all items are returned.
If you enter search, page or page_limit, the command returns the services as an array in the service item and adds total (number of items after filtering), page and page_limit. Without these parameters, the response keeps its original form (services keyed by ID). Paging works the same as for other lists; see WAPI – Manual.
A test request ("test": 1) returns only the return code, without the list.
Return codes
- 1000 = OK
- 2274 = internal error – user_id missing
Response data
- ID = service ID
- name = domain name
- status = service status
- expiration = service expiration date (YYYY-MM-DD)
Templates
JSON request:
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-services-list",
"clTRID": "your request id",
"data": {
"status": "active"
}
}
}
JSON response (OK, without paging):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-services-list",
"data": {
"12345": {
"ID": "12345",
"name": "domain.tld",
"status": "active",
"expiration": "YYYY-MM-DD"
}
}
}
}
JSON request (search and paging):
{
"request": {
"user": "your@login.tld",
"auth": "generated auth string",
"command": "wgp-services-list",
"clTRID": "your request id",
"data": {
"status": "active",
"search": "domain",
"page": 1,
"page_limit": 50
}
}
}
JSON response (OK, with paging):
{
"response": {
"code": 1000,
"result": "OK",
"timestamp": "UNIX time",
"clTRID": "your request id",
"svTRID": "server request id",
"command": "wgp-services-list",
"data": {
"service": [
{
"ID": "12345",
"name": "domain.tld",
"status": "active",
"expiration": "YYYY-MM-DD"
}
],
"total": 1,
"page": 1,
"page_limit": 50
}
}
}