Default

Check availability and prices for multiple domains

post

Принимает JSON { "domains": ["example.com"] }. Возвращает статус и цену по каждому домену.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainsstring[]Required

Список доменов для проверки (минимум 1, максимум 100)

Responses
200

Результаты проверки по каждому домену

application/json
post
/api/v1/info
POST /api/v1/info HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 37

{
  "domains": [
    "example.com",
    "site.io"
  ]
}
{
  "results": [
    {
      "domain": "example.com",
      "status": "available",
      "code": 0,
      "price": 9.99
    },
    {
      "domain": "taken.com",
      "status": "registered",
      "code": 0,
      "price": 0
    }
  ],
  "success": true,
  "total": 2
}

Get DNS records for a domain

get

Требуется тело запроса { "domain": "example.com" }. Проверяется Authorization Bearer token. Если домен подключён к Cloudflare — возвращаются CF-записи (включая поле proxy). Если включён EDNS провайдера — возвращаются записи формата EDNS (включая поле priority для MX/SRV).

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Список DNS записей (Cloudflare или EDNS)

application/json
get
/api/v1/dns
GET /api/v1/dns HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "records": [
    {
      "id": "rec_1",
      "type": "A",
      "name": "@",
      "content": "192.0.2.1",
      "proxy": false
    },
    {
      "id": "rec_2",
      "type": "CNAME",
      "name": "www",
      "content": "example.com",
      "proxy": true
    }
  ],
  "code": 0
}

Add DNS record (Cloudflare or EDNS)

post

Добавляет DNS запись. Валидация IP для A/AAAA выполняется на стороне сервера.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired
subdomainstringRequired

Имя записи, например 'www' или '@'

contentstringRequired

IP для A/AAAA или значение для CNAME/TXT

typestringRequired

Тип записи: A, AAAA, CNAME, TXT, MX и т.п.

Responses
200

Запись добавлена

application/json
post
/api/v1/addrecord
POST /api/v1/addrecord HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 75

{
  "domain": "example.com",
  "subdomain": "www",
  "content": "192.0.2.1",
  "type": "A"
}
{
  "message": "Record added",
  "success": true,
  "code": 0
}

Enable Cloudflare for a domain

put

Запускает процесс подключения Cloudflare: создаёт зону и обновляет флаги в БД. Если домен уже зарегистрирован — будет использована текущая регистрационная информация.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Cloudflare queued

application/json
put
/api/v1/enablecf
PUT /api/v1/enablecf HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Cloudflare enable queued",
  "success": true,
  "code": 0
}

Disable Cloudflare for a domain

put

Отключает Cloudflare: возвращает неймсерверы регистратора и очищает CF-конфигурацию.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Cloudflare disabled

application/json
put
/api/v1/disablecf
PUT /api/v1/disablecf HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Cloudflare disabled",
  "success": true,
  "code": 0
}

Get domain registry info (expire, status)

get

Возвращает состояние домена в реестре. Тело запроса { "domain": "example.com" }.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Domain info

application/json
get
/api/v1/domain
GET /api/v1/domain HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "domain": "example.com",
  "expire": 1788777591195,
  "status": "ok",
  "code": 0
}

Register a domain

post

Обычная регистрация домена.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Registered

application/json
post
/api/v1/register
POST /api/v1/register HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Domain registered",
  "success": true,
  "code": 0
}

Register a domain and enable Cloudflare immediately

post

Регистрирует и одновременно создаёт Cloudflare-зону; используется, если нужно сразу зарегестрировать домен с Cloudflare.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Registered + CF enabled

application/json
post
/api/v1/registerwithcf
POST /api/v1/registerwithcf HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Operation completed",
  "success": true,
  "code": 0
}

Register a domain and set to provider's DNS (EDNS)

post

Регистрирует домен и включает EDNS провайдера

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Registered + EDNS enabled

application/json
post
/api/v1/registerwithdns
POST /api/v1/registerwithdns HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Operation completed",
  "success": true,
  "code": 0
}

List domains owned by API key

get

Возвращает список доменов, связанных с переданным в Authorization ключом API.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Array of domain objects

application/json
get
/api/v1/domains
GET /api/v1/domains HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
  {
    "id": "1",
    "domain": "example.com",
    "cf_enabled": true,
    "creation_time": 1670000000000,
    "red_trust": false
  }
]

Get balance

get

Возвращает баланс в долларах

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Responses
200

Balance

application/json
get
/api/v1/balance
GET /api/v1/balance HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "balance": 42.5
}

Get domain nameservers (from registrar)

get

Требуется тело { "domain": "example.com" }. Возвращает массив неймсерверов.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired

Домен в формате example.com

Responses
200

Nameservers

application/json
get
/api/v1/nameservers
GET /api/v1/nameservers HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
200

Nameservers

{
  "ns": [
    "ns1.registrar.example",
    "ns2.registrar.example"
  ],
  "code": 0
}

Patch nameservers for domain

patch

Обновляет неймсерверы домена. Если домен был подключён к Cloudflare — CF настройки удаляются.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired
ns0stringRequired
ns1stringRequired
Responses
200

Nameservers updated

application/json
patch
/api/v1/nameservers
PATCH /api/v1/nameservers HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 72

{
  "domain": "example.com",
  "ns0": "ns1.example.net",
  "ns1": "ns2.example.net"
}
{
  "message": "Operation completed",
  "success": true,
  "code": 0
}

Delete domain from system

delete

Удаление домена.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Body
domainstringRequired
Responses
200

Deleted

application/json
delete
/api/v1/delete
DELETE /api/v1/delete HTTP/1.1
Host: api.eternity.domains
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 24

{
  "domain": "example.com"
}
{
  "message": "Operation completed",
  "success": true,
  "code": 0
}