
With a sandbox_ key, or while the API is in preparation, changes and purchases are simulated and nothing is charged. See Sandbox and Production.
List and see
GET /v1/domains returns the domains of the account, the next to expire first. You can filter with status, for example ?status=active. The list comes in pages. GET /v1/domains/{domain} accepts the name or the id. It needs domains:read.
curl
curl "https://api.interweb.ao/v1/domains" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Check a name
GET /v1/domains/availability says whether a name is free and the price of one year. unknown means it could not be confirmed now: in that case registration through the API does not go ahead.
Register, renew and transfer
POST /v1/domains/registerregisters.POST /v1/domains/{domain}/renewrenews.POST /v1/domains/transfertransfers to us, with the transfer code.
These operations need the billing:purchase and domains:write permissions, and the Idempotency-Key header. They are paid with account credit only, within the spending limit of the key. If credit is short, the price changes or the account profile is incomplete, nothing is charged. A domain cannot be valid for more than 10 years.
The response is 202 with an action_id, to follow at GET /v1/actions/{id}. Some extensions, including .mz, are handled manually and take longer.
What is handled in the portal
These cases answer 422 with portal_url, and are handled in Meu Interweb:
- .mz and .ao names of up to 3 characters, which have their own price.
- The .ac.mz, .gov.mz and .mil.mz extensions, which ask for documents.
- Extensions that ask for extra owner details.
- Transfers of .mz and .ao.
Nameservers
GET /v1/domains/{domain}/nameservers reads the nameservers from the registry. PUT /v1/domains/{domain}/nameservers changes them, from 2 to 5.
If the account email, or the email of a user of the account, is on this domain or on a subdomain of it, changing the nameservers answers 409 with the code account_email_domain, also in Sandbox: anyone who controls that mail receives the password reset and the login code. Make the change in the Meu Interweb. The same applies to nameservers when registering a domain.
Reading the nameservers, the lock and the contacts has a limit of 30 per minute, per account. The nameservers and the lock can come from a copy up to 60 seconds old, which does not count towards that limit; the contacts are always read live. What you change through the API shows at once.
Lock, renewal and contacts
- GET and
PUT /v1/domains/{domain}/lock: the transfer lock. PUT /v1/domains/{domain}/auto-renew: auto-renewal.GET /v1/domains/{domain}/contacts: the contacts in the registry.
Transfer code
POST /v1/domains/{domain}/transfer-code needs the domains:transfer_code permission and the domain name in confirm. The code never comes in the response: it goes to the email of the account or of the domain owner.
What is planned
- Change the contacts and the owner.
- Privacy and forwarding.
Operations
13 operations in this area. Click an operation to see its parameters, examples and responses, or to try it in the Playground, without leaving the page.
GETList the domains
/v1/domains
https://api.interweb.ao/v1/domainsNeeds domains:read. The domains of the account, the next to expire first.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
status | query | string: pending, pending_registration, pending_transfer, active, grace, redemption, expired, transferred_away, cancelled, fraud | no | Only results in this status. |
page | query | integer | no | The page number. The first is 1. |
per_page | query | integer | no | Results per page, from 1 to 100. The default is 10. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
List the domains.
{
"data": [
{
"id": 41,
"domain": "example.co.mz",
"status": "active",
"type": "register",
"registered_at": "2026-02-01",
"expires_at": "2027-02-01",
"next_due_date": "2027-02-01",
"period_years": 1,
"renewal_amount": 1900.0,
"currency": "AOA",
"auto_renew": true,
"premium": false,
"features": {
"dns_management": true,
"email_forwarding": false,
"id_protection": false
}
}
],
"meta": {
"page": 1,
"per_page": 10,
"total": 1,
"total_pages": 1
}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
GETSee a domain
/v1/domains/{domain}
https://api.interweb.ao/v1/domains/{domain}Needs domains:read. By name or by id.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains/VALUE" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains/VALUE", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
See a domain.
{
"data": {
"id": 41,
"domain": "example.co.mz",
"status": "active",
"type": "register",
"registered_at": "2026-02-01",
"expires_at": "2027-02-01",
"next_due_date": "2027-02-01",
"period_years": 1,
"renewal_amount": 1900.0,
"currency": "AOA",
"auto_renew": true,
"premium": false,
"features": {
"dns_management": true,
"email_forwarding": false,
"id_protection": false
}
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
GETCheck a domain name
/v1/domains/availability
https://api.interweb.ao/v1/domains/availabilityNeeds domains:read. Limited to 30 per minute. unknown means the answer could not be confirmed. portal_only means this name is handled in the account portal.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | query | string | yes | The domain name. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains/availability?domain=example.co.mz" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/availability?domain=example.co.mz');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains/availability?domain=example.co.mz", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/availability?domain=example.co.mz", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
Check a domain name.
{
"data": {
"domain": "example.co.mz",
"extension": ".co.mz",
"status": "available",
"available": true,
"one_year_price": {
"register": 1900.0,
"renew": 1900.0,
"transfer": 1900.0
},
"currency": "AOA",
"portal_only": false,
"portal_reason": null
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
POSTRegister a domain
/v1/domains/register
https://api.interweb.ao/v1/domains/registerNeeds billing:purchase. Also needs domains:write and the Idempotency-Key header. Paid with credit only, within the spending limit of the key. Answers 202: follow it with GET /v1/actions/{id}. Limited to 5 per minute. On the domain of the account email, or of the email of a user of the account, it answers 409 with the code account_email_domain: make the change in the account portal.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: billing:purchase.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | Any unique value, up to 255 visible characters. Valid for 24 hours per key. Repeating the same request returns the saved answer; a different body, or a first request still in progress, returns 409. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | |
years | integer | no | |
nameservers | array<string> | no |
Examples
curl
curl -X POST "https://api.interweb.ao/v1/domains/register" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Idempotency-Key: 9f1c2d3e-example" \
-H "Content-Type: application/json" \
-d '{"domain": "example.co.mz", "years": 1}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/register');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{"domain": "example.co.mz", "years": 1}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Idempotency-Key: 9f1c2d3e-example',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
}
payload = {"domain": "example.co.mz", "years": 1}
r = requests.post("https://api.interweb.ao/v1/domains/register", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/register", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
"Content-Type": "application/json",
},
body: JSON.stringify({"domain": "example.co.mz", "years": 1}),
});
console.log(response.status);
console.log(await response.text());Responses
202
Register a domain.
{
"data": {
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
"status": "simulated",
"simulated": true,
"domain": "example.co.mz",
"years": 1,
"amount": 1900.0,
"currency": "AOA",
"credit_sufficient": true,
"within_spending_limit": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
400
The request is not valid, for example the body is not JSON or the connection is not HTTPS.
{
"error": {
"code": "invalid_request",
"message": "The request is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}402
Not enough credit. Nothing was charged.
{
"error": {
"code": "insufficient_credit",
"message": "The account does not have enough credit. Nothing was charged.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"amount": 1900.0,
"currency": "AOA"
}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is not valid, for example the body is not JSON or the connection is not HTTPS. |
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 402 | insufficient_credit | Not enough credit. Nothing was charged. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
POSTTransfer a domain to us
/v1/domains/transfer
https://api.interweb.ao/v1/domains/transferNeeds billing:purchase. Also needs domains:write and the Idempotency-Key header. Paid with credit only, within the spending limit of the key. Answers 202: follow it with GET /v1/actions/{id}. Limited to 5 per minute.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: billing:purchase.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | Any unique value, up to 255 visible characters. Valid for 24 hours per key. Repeating the same request returns the saved answer; a different body, or a first request still in progress, returns 409. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
domain | string | yes | |
transfer_code | string | yes |
Examples
curl
curl -X POST "https://api.interweb.ao/v1/domains/transfer" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Idempotency-Key: 9f1c2d3e-example" \
-H "Content-Type: application/json" \
-d '{"domain": "example.com", "transfer_code": "CODIGO-DO-DOMINIO"}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/transfer');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{"domain": "example.com", "transfer_code": "CODIGO-DO-DOMINIO"}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Idempotency-Key: 9f1c2d3e-example',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
}
payload = {"domain": "example.com", "transfer_code": "CODIGO-DO-DOMINIO"}
r = requests.post("https://api.interweb.ao/v1/domains/transfer", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/transfer", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
"Content-Type": "application/json",
},
body: JSON.stringify({"domain": "example.com", "transfer_code": "CODIGO-DO-DOMINIO"}),
});
console.log(response.status);
console.log(await response.text());Responses
202
Transfer a domain to us.
{
"data": {
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
"status": "simulated",
"simulated": true,
"domain": "example.co.mz",
"years": 1,
"amount": 1900.0,
"currency": "AOA",
"credit_sufficient": true,
"within_spending_limit": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
400
The request is not valid, for example the body is not JSON or the connection is not HTTPS.
{
"error": {
"code": "invalid_request",
"message": "The request is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}402
Not enough credit. Nothing was charged.
{
"error": {
"code": "insufficient_credit",
"message": "The account does not have enough credit. Nothing was charged.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"amount": 1900.0,
"currency": "AOA"
}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is not valid, for example the body is not JSON or the connection is not HTTPS. |
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 402 | insufficient_credit | Not enough credit. Nothing was charged. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
POSTRenew a domain
/v1/domains/{domain}/renew
https://api.interweb.ao/v1/domains/{domain}/renewNeeds billing:purchase. Also needs domains:write and the Idempotency-Key header. Paid with credit only, within the spending limit of the key. Answers 202: follow it with GET /v1/actions/{id}. Limited to 5 per minute. If there is already an unpaid invoice for the domain, it answers 409 with invoice_id.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: billing:purchase.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
Idempotency-Key | header | string | no | Any unique value, up to 255 visible characters. Valid for 24 hours per key. Repeating the same request returns the saved answer; a different body, or a first request still in progress, returns 409. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
years | integer | no |
Examples
curl
curl -X POST "https://api.interweb.ao/v1/domains/VALUE/renew" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Idempotency-Key: 9f1c2d3e-example" \
-H "Content-Type: application/json" \
-d '{"years": 1}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/renew');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{"years": 1}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Idempotency-Key: 9f1c2d3e-example',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
}
payload = {"years": 1}
r = requests.post("https://api.interweb.ao/v1/domains/VALUE/renew", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/renew", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
"Content-Type": "application/json",
},
body: JSON.stringify({"years": 1}),
});
console.log(response.status);
console.log(await response.text());Responses
202
Renew a domain.
{
"data": {
"action_id": "6f1d2c3a-8b4e-4f7a-9c21-1d2e3f4a5b6c",
"status": "simulated",
"simulated": true,
"domain": "example.co.mz",
"years": 1,
"amount": 1900.0,
"currency": "AOA",
"credit_sufficient": true,
"within_spending_limit": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
400
The request is not valid, for example the body is not JSON or the connection is not HTTPS.
{
"error": {
"code": "invalid_request",
"message": "The request is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}402
Not enough credit. Nothing was charged.
{
"error": {
"code": "insufficient_credit",
"message": "The account does not have enough credit. Nothing was charged.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"amount": 1900.0,
"currency": "AOA"
}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | The request is not valid, for example the body is not JSON or the connection is not HTTPS. |
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 402 | insufficient_credit | Not enough credit. Nothing was charged. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
GETSee the nameservers
/v1/domains/{domain}/nameservers
https://api.interweb.ao/v1/domains/{domain}/nameserversNeeds domains:read. Reads them from the registry. Limit: 30 per minute, per account. The answer can come from a copy up to 60 seconds old, which does not count towards the limit.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains/VALUE/nameservers" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains/VALUE/nameservers", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/nameservers", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
See the nameservers.
{
"data": {
"domain": "example.co.mz",
"nameservers": [
"ns1.example.com",
"ns2.example.com"
],
"uses_our_nameservers": false
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
PUTChange the nameservers
/v1/domains/{domain}/nameservers
https://api.interweb.ao/v1/domains/{domain}/nameserversNeeds domains:write. From 2 to 5. Limited to 20 changes per minute. On the domain of the account email, or of the email of a user of the account, it answers 409 with the code account_email_domain: make the change in the account portal.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
nameservers | array<string> | yes |
Examples
curl
curl -X PUT "https://api.interweb.ao/v1/domains/VALUE/nameservers" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Content-Type: application/json" \
-d '{"nameservers": ["ns1.example.com", "ns2.example.com"]}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/nameservers');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{"nameservers": ["ns1.example.com", "ns2.example.com"]}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
payload = {"nameservers": ["ns1.example.com", "ns2.example.com"]}
r = requests.put("https://api.interweb.ao/v1/domains/VALUE/nameservers", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/nameservers", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Content-Type": "application/json",
},
body: JSON.stringify({"nameservers": ["ns1.example.com", "ns2.example.com"]}),
});
console.log(response.status);
console.log(await response.text());Responses
200
Change the nameservers.
{
"data": {
"domain": "example.co.mz",
"nameservers": [
"ns1.example.com",
"ns2.example.com"
],
"simulated": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
GETSee the transfer lock
/v1/domains/{domain}/lock
https://api.interweb.ao/v1/domains/{domain}/lockNeeds domains:read. null means the registry does not say. Limit: 30 per minute, per account. The answer can come from a copy up to 60 seconds old, which does not count towards the limit.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains/VALUE/lock" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/lock');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains/VALUE/lock", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/lock", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
See the transfer lock.
{
"data": {
"domain": "example.co.mz",
"locked": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
PUTChange the transfer lock
/v1/domains/{domain}/lock
https://api.interweb.ao/v1/domains/{domain}/lockNeeds domains:write. Turns the lock on or off.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
locked | boolean | yes |
Examples
curl
curl -X PUT "https://api.interweb.ao/v1/domains/VALUE/lock" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Content-Type: application/json" \
-d '{"locked": true}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/lock');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{"locked": true}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
payload = {"locked": true}
r = requests.put("https://api.interweb.ao/v1/domains/VALUE/lock", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/lock", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Content-Type": "application/json",
},
body: JSON.stringify({"locked": true}),
});
console.log(response.status);
console.log(await response.text());Responses
200
Change the transfer lock.
{
"data": {
"domain": "example.co.mz",
"locked": true,
"simulated": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
PUTChange auto-renewal
/v1/domains/{domain}/auto-renew
https://api.interweb.ao/v1/domains/{domain}/auto-renewNeeds domains:write. Turns the renewal invoices of the domain on or off.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
auto_renew | boolean | yes |
Examples
curl
curl -X PUT "https://api.interweb.ao/v1/domains/VALUE/auto-renew" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Content-Type: application/json" \
-d '{"auto_renew": true}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/auto-renew');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'PUT',
CURLOPT_POSTFIELDS => '{"auto_renew": true}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
payload = {"auto_renew": true}
r = requests.put("https://api.interweb.ao/v1/domains/VALUE/auto-renew", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/auto-renew", {
method: "PUT",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Content-Type": "application/json",
},
body: JSON.stringify({"auto_renew": true}),
});
console.log(response.status);
console.log(await response.text());Responses
200
Change auto-renewal.
{
"data": {
"domain": "example.co.mz",
"auto_renew": true,
"simulated": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
GETSee the domain contacts
/v1/domains/{domain}/contacts
https://api.interweb.ao/v1/domains/{domain}/contactsNeeds domains:read. As the registry has them. The fields depend on the extension. Limit: 30 per minute, per account. Always read live.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Examples
curl
curl "https://api.interweb.ao/v1/domains/VALUE/contacts" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en"PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/contacts');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
}
r = requests.get("https://api.interweb.ao/v1/domains/VALUE/contacts", headers=headers, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/contacts", {
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
},
});
console.log(response.status);
console.log(await response.text());Responses
200
See the domain contacts.
{
"data": {
"domain": "example.co.mz",
"contacts": {
"Registrant": {
"Full Name": "Ana Silva",
"Email": "[email protected]"
}
}
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
POSTRequest the transfer code
/v1/domains/{domain}/transfer-code
https://api.interweb.ao/v1/domains/{domain}/transfer-codeNeeds domains:transfer_code. The code never comes in the response: it goes to the email of the account or of the domain owner. Limited to 3 per hour.
Authentication
Needs a valid key in the Authorization: Bearer header. Required permission: domains:transfer_code.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
domain | path | string | yes | The domain name or its id. |
X-API-Mode | header | string: sandbox, production | no | Optional. If it does not match the mode of the key, the request is refused with invalid_request and reason mode_mismatch. Use it to make sure a program never runs with the wrong key. |
Idempotency-Key | header | string | no | A unique identifier for this request, so it can be repeated without duplicating it. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
confirm | string | yes | The domain name, to confirm. |
Examples
curl
curl -X POST "https://api.interweb.ao/v1/domains/VALUE/transfer-code" \
-H "Authorization: Bearer $RLX_API_KEY" \
-H "Accept-Language: en" \
-H "Idempotency-Key: 9f1c2d3e-example" \
-H "Content-Type: application/json" \
-d '{"confirm": "example.co.mz"}'PHP
<?php
$ch = curl_init('https://api.interweb.ao/v1/domains/VALUE/transfer-code');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS => '{"confirm": "example.co.mz"}',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('RLX_API_KEY'),
'Accept-Language: en',
'Idempotency-Key: 9f1c2d3e-example',
'Content-Type: application/json',
],
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
echo $status, PHP_EOL, $body, PHP_EOL;Python
import os
import requests
headers = {
"Authorization": "Bearer " + os.environ["RLX_API_KEY"],
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
}
payload = {"confirm": "example.co.mz"}
r = requests.post("https://api.interweb.ao/v1/domains/VALUE/transfer-code", headers=headers, json=payload, timeout=30)
print(r.status_code)
print(r.text)JavaScript
const response = await fetch("https://api.interweb.ao/v1/domains/VALUE/transfer-code", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RLX_API_KEY}`,
"Accept-Language": "en",
"Idempotency-Key": "9f1c2d3e-example",
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": "example.co.mz"}),
});
console.log(response.status);
console.log(await response.text());Responses
200
Request the transfer code.
{
"data": {
"domain": "example.co.mz",
"status": "simulated",
"simulated": true
},
"meta": {}
}| Header | Description |
|---|---|
X-Correlation-ID | Identifier of this request. Give it to support when you report a problem. |
X-RateLimit-Limit | Requests allowed per minute. |
X-RateLimit-Remaining | Requests left in the current minute. |
X-RateLimit-Reset | When the minute ends, as a Unix timestamp in seconds. |
X-API-Mode | The mode of the key that made the request: sandbox or production. |
401
The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account.
{
"error": {
"code": "unauthorized",
"message": "Missing or invalid API key.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}403
The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed).
{
"error": {
"code": "insufficient_scope",
"message": "This key does not have the required permission.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"required": "dns:read"
}
}
}404
Not found.
{
"error": {
"code": "not_found",
"message": "Not found.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}409
The operation cannot be done in the current state. See details.reason.
{
"error": {
"code": "conflict",
"message": "This operation only works on an active domain.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"reason": "domain_not_active"
}
}
}422
Some of the data is not valid.
{
"error": {
"code": "validation_failed",
"message": "Some of the data is not valid.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}429
Too many requests. Wait for the time in Retry-After.
{
"error": {
"code": "rate_limited",
"message": "Too many requests. Please try again shortly.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {
"retry_after": 42
}
}
}| Header | Description |
|---|---|
Retry-After | Seconds to wait before trying again. |
500
An internal error occurred. Give the correlation_id to support.
{
"error": {
"code": "internal_error",
"message": "An internal error occurred. Please give the correlation_id to support.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}502
The service behind the API did not respond as expected.
{
"error": {
"code": "upstream_error",
"message": "The service did not respond as expected. Please try again later.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}503
The API is turned off.
{
"error": {
"code": "disabled",
"message": "The API is currently turned off.",
"correlation_id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"details": {}
}
}Errors
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | The key is missing, invalid, revoked or expired, or the user who created it no longer has access to the account. |
| 403 | forbidden, insufficient_scope, ip_not_allowed | The account cannot use the API (forbidden), the key lacks the permission (insufficient_scope), or the IP address is not on the list of the key (ip_not_allowed). |
| 404 | not_found | Not found. |
| 409 | conflict | The operation cannot be done in the current state. See details.reason. |
| 422 | validation_failed | Some of the data is not valid. |
| 429 | rate_limited | Too many requests. Wait for the time in Retry-After. |
| 500 | internal_error | An internal error occurred. Give the correlation_id to support. |
| 502 | upstream_error | The service behind the API did not respond as expected. |
| 503 | disabled | The API is turned off. |
The error format is explained in Errors.
No operation found.