API
2.0.0 OpenAPI 3.1.0 methods: 45

Regex API v2

Партнёрский API регистрации доменов.

Guide

Access

  1. Open the bot @REGEX_domainbot → "API integration" → "Create account", then "Keys" → "Issue key".
  2. Send the key in the Authorization: Bearer <key> header with every request. No key or a wrong key — 401.
  3. Check access with GET /v2/account: the response has your balance and limits.

Buying a domain

  1. POST /v2/quotes — a quote: the price is locked for 10 minutes.
  2. POST /v2/orders with quote_id — an order at the locked price, the total won't move.
  3. GET /v2/orders/{order_id} or the order.completed webhook — the result for each domain.

Sandbox

A test key regex_test_… works in the sandbox: $1000 of play money, no real money or domains. Reset — POST /v2/sandbox/reset.

Money and format

JSON format, USD currency, ISO 8601 UTC times. The API balance is topped up in the bot; an order that fails charges nothing.

Аккаунт

Баланс и лимиты

GET/v2/account Key required

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/account
curl 'https://api.regexdomain.com/v2/account' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "partner_id": 0,
  "name": "string",
  "status": "string",
  "markup_percent": "12.50",
  "balance": {
    "available": "12.50",
    "reserved": "12.50",
    "currency": "USD"
  },
  "rate_limit": {
    "per_second": 0
  },
  "sandbox": false
}

Ключи

GET/v2/keys Key required

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/keys
curl 'https://api.regexdomain.com/v2/keys' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "prefix": "string",
      "scope": "string",
      "label": "string",
      "test": true,
      "ip_whitelist": [
        "string"
      ],
      "created_at": "2027-11-16T09:20:00Z",
      "last_used_at": "2027-11-16T09:20:00Z",
      "key": "string"
    }
  ]
}

Выпустить ключ с правами (ключ — один раз)

POST/v2/keys Key required

Request body

Name Type Description
scope "read" | "dns" | "full"
label string
ip_whitelist string[]

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/keys
curl -X POST 'https://api.regexdomain.com/v2/keys' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"scope": "read", "label": "", "ip_whitelist": ["string"]}'
{
  "prefix": "string",
  "scope": "string",
  "label": "string",
  "test": true,
  "ip_whitelist": [
    "string"
  ],
  "created_at": "2027-11-16T09:20:00Z",
  "last_used_at": "2027-11-16T09:20:00Z",
  "key": "string"
}

Отозвать ключ

DELETE/v2/keys/{prefix} Key required

Parameters

Name In Type Description
prefixrequired path string

Responses

  • 204 Успешный ответ
  • 422 Ошибка в параметрах
DELETE /v2/keys/{prefix}
curl -X DELETE 'https://api.regexdomain.com/v2/keys/{prefix}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Выписка: все движения баланса

GET/v2/account/transactions Key required

Parameters

Name In Type Description
from query string (date)
to query string (date)
type query "deposit" | "hold" | "charge" | "refund" | "cashback" | "adjustment"
cursor query string
limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/account/transactions
curl 'https://api.regexdomain.com/v2/account/transactions' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": "id_123",
      "type": "string",
      "amount": "12.50",
      "available_after": "12.50",
      "reserved_after": "12.50",
      "note": "",
      "created_at": "2027-11-16T09:20:00Z"
    }
  ],
  "next_cursor": "string"
}

Счёт на пополнение баланса API

POST/v2/account/topups Key required

Request body

Name Type Description
amountrequired number | string

Сколько зачислить на баланс API, $1–$10000

methodrequired "cryptobot" | "xrocket" | "usdt_trc20" | "usdt_bep20"

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/account/topups
curl -X POST 'https://api.regexdomain.com/v2/account/topups' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"amount": "12.50", "method": "cryptobot"}'
{
  "id": "id_123",
  "amount": "12.50",
  "method": "string",
  "status": "awaiting_payment",
  "pay_url": "https://example.com/hook",
  "pay_address": "string",
  "pay_amount": "35.00",
  "reason": "string",
  "sandbox": false
}

Статус счёта на пополнение

GET/v2/account/topups/{topup_id} Key required

Parameters

Name In Type Description
topup_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/account/topups/{topup_id}
curl 'https://api.regexdomain.com/v2/account/topups/{topup_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "amount": "12.50",
  "method": "string",
  "status": "awaiting_payment",
  "pay_url": "https://example.com/hook",
  "pay_address": "string",
  "pay_amount": "35.00",
  "reason": "string",
  "sandbox": false
}

Поиск и цены

Зоны и цены

GET/v2/zones Key required

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/zones
curl 'https://api.regexdomain.com/v2/zones' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "zone": "com",
      "register": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      },
      "renew": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      }
    }
  ],
  "count": 10
}

Котировка: цена на 10 минут

POST/v2/quotes Key required

Request body

Name Type Description
itemsrequired object[]

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/quotes
curl -X POST 'https://api.regexdomain.com/v2/quotes' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"items": [{"action": "register", "domain": "example.com", "years": 1}]}'
{
  "id": "id_123",
  "expires_at": "2027-11-16T09:20:00Z",
  "items": [
    {
      "action": "string",
      "domain": "example.com",
      "years": 1,
      "price": "12.50",
      "markup": "12.50",
      "total": "12.50"
    }
  ],
  "total": "12.50"
}

Поиск до 100 имён за запрос

POST/v2/domains/search Key required

Request body

Name Type Description
namesrequired string[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/domains/search
curl -X POST 'https://api.regexdomain.com/v2/domains/search' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"names": ["string"]}'
{
  "items": [
    {
      "domain": "example.com",
      "available": true,
      "premium": false,
      "register": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      },
      "renew": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      },
      "error": {
        "code": "string",
        "message": "string"
      }
    }
  ]
}

Подбор свободных имён

GET/v2/domains/suggest Key required

Parameters

Name In Type Description
qrequired query string
zones query string

Через запятую: com,io

limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains/suggest
curl 'https://api.regexdomain.com/v2/domains/suggest?q=…' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "domain": "example.com",
      "available": true,
      "premium": false,
      "register": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      },
      "renew": {
        "price": "12.50",
        "markup": "12.50",
        "total": "12.50"
      },
      "error": {
        "code": "string",
        "message": "string"
      }
    }
  ]
}

Заказы

Список заказов

GET/v2/orders Key required

Parameters

Name In Type Description
status query "pending" | "completed" | "partial" | "failed" | "refunded"
cursor query string
limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/orders
curl 'https://api.regexdomain.com/v2/orders' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": "id_123",
      "status": "string",
      "quote_id": "id_123",
      "customer_ref": "order-42",
      "labels": [
        "string"
      ],
      "items": [
        {
          "action": "string",
          "domain": "example.com",
          "years": 1,
          "status": "string",
          "price": "12.50",
          "markup": "12.50",
          "total": "12.50",
          "expires_at": "2027-11-16T09:20:00Z",
          "error": {
            "code": null,
            "message": null
          }
        }
      ],
      "total": "12.50",
      "sandbox": false,
      "created_at": "2027-11-16T09:20:00Z",
      "updated_at": "2027-11-16T09:20:00Z"
    }
  ],
  "next_cursor": "string"
}

Создать заказ

POST/v2/orders Key required

Request body

Name Type Description
quote_id string
items object[]
customer_ref string
labels string[]
nameservers string[]

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/orders
curl -X POST 'https://api.regexdomain.com/v2/orders' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"quote_id": "id_123", "items": [{"action": "register", "domain": "example.com", "years": 1}], "customer_ref": "order-42", "labels": ["string"], "nameservers": ["ns1.example.net"]}'
{
  "id": "id_123",
  "status": "string",
  "quote_id": "id_123",
  "customer_ref": "order-42",
  "labels": [
    "string"
  ],
  "items": [
    {
      "action": "string",
      "domain": "example.com",
      "years": 1,
      "status": "string",
      "price": "12.50",
      "markup": "12.50",
      "total": "12.50",
      "expires_at": "2027-11-16T09:20:00Z",
      "error": {
        "code": "string",
        "message": "string"
      }
    }
  ],
  "total": "12.50",
  "sandbox": false,
  "created_at": "2027-11-16T09:20:00Z",
  "updated_at": "2027-11-16T09:20:00Z"
}

Статус заказа

GET/v2/orders/{order_id} Key required

Parameters

Name In Type Description
order_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/orders/{order_id}
curl 'https://api.regexdomain.com/v2/orders/{order_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "status": "string",
  "quote_id": "id_123",
  "customer_ref": "order-42",
  "labels": [
    "string"
  ],
  "items": [
    {
      "action": "string",
      "domain": "example.com",
      "years": 1,
      "status": "string",
      "price": "12.50",
      "markup": "12.50",
      "total": "12.50",
      "expires_at": "2027-11-16T09:20:00Z",
      "error": {
        "code": "string",
        "message": "string"
      }
    }
  ],
  "total": "12.50",
  "sandbox": false,
  "created_at": "2027-11-16T09:20:00Z",
  "updated_at": "2027-11-16T09:20:00Z"
}

Домены

Список доменов с фильтрами

GET/v2/domains Key required

Parameters

Name In Type Description
zone query string
status query "active" | "expiring" | "expired"
expires_before query string (date)
customer_ref query string
label query string
sort query "domain" | "-domain" | "expires_at" | "-expires_at" | "registered_at" | "-registered_at"
cursor query string
limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains
curl 'https://api.regexdomain.com/v2/domains' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "domain": "example.com",
      "zone": "com",
      "status": "active",
      "actions": [
        "string"
      ],
      "registered_at": "2027-11-16T09:20:00Z",
      "expires_at": "2027-11-16T09:20:00Z",
      "nameservers": [
        "ns1.example.net"
      ],
      "customer_ref": "order-42",
      "labels": [
        "string"
      ],
      "sandbox": false
    }
  ],
  "count": 10,
  "next_cursor": "string"
}

Карточка домена

GET/v2/domains/{domain} Key required

Parameters

Name In Type Description
domainrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains/{domain}
curl 'https://api.regexdomain.com/v2/domains/{domain}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "domain": "example.com",
  "zone": "com",
  "status": "active",
  "actions": [
    "string"
  ],
  "registered_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "nameservers": [
    "ns1.example.net"
  ],
  "customer_ref": "order-42",
  "labels": [
    "string"
  ],
  "sandbox": false
}

Метки домена: customer_ref и labels

PATCH/v2/domains/{domain} Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
customer_ref string
labels string[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
PATCH /v2/domains/{domain}
curl -X PATCH 'https://api.regexdomain.com/v2/domains/{domain}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"customer_ref": "order-42", "labels": ["string"]}'
{
  "domain": "example.com",
  "zone": "com",
  "status": "active",
  "actions": [
    "string"
  ],
  "registered_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "nameservers": [
    "ns1.example.net"
  ],
  "customer_ref": "order-42",
  "labels": [
    "string"
  ],
  "sandbox": false
}

Заявки на перенос по домену

GET/v2/domains/{domain}/transfer-requests Key required

Parameters

Name In Type Description
domainrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains/{domain}/transfer-requests
curl 'https://api.regexdomain.com/v2/domains/{domain}/transfer-requests' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": "id_123",
      "domain": "example.com",
      "status": "open",
      "comment": "",
      "reason": "string",
      "sandbox": false,
      "created_at": "2027-11-16T09:20:00Z",
      "decided_at": "2027-11-16T09:20:00Z"
    }
  ]
}

Заявка на перенос домена от нас

POST/v2/domains/{domain}/transfer-requests Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
comment string

Куда переносите и кому передать код — владелец прочтёт это

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/domains/{domain}/transfer-requests
curl -X POST 'https://api.regexdomain.com/v2/domains/{domain}/transfer-requests' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"comment": ""}'
{
  "id": "id_123",
  "domain": "example.com",
  "status": "open",
  "comment": "",
  "reason": "string",
  "sandbox": false,
  "created_at": "2027-11-16T09:20:00Z",
  "decided_at": "2027-11-16T09:20:00Z"
}

Все заявки на перенос

GET/v2/transfer-requests Key required

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/transfer-requests
curl 'https://api.regexdomain.com/v2/transfer-requests' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": "id_123",
      "domain": "example.com",
      "status": "open",
      "comment": "",
      "reason": "string",
      "sandbox": false,
      "created_at": "2027-11-16T09:20:00Z",
      "decided_at": "2027-11-16T09:20:00Z"
    }
  ]
}

Статус заявки

GET/v2/transfer-requests/{request_id} Key required

Parameters

Name In Type Description
request_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/transfer-requests/{request_id}
curl 'https://api.regexdomain.com/v2/transfer-requests/{request_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "domain": "example.com",
  "status": "open",
  "comment": "",
  "reason": "string",
  "sandbox": false,
  "created_at": "2027-11-16T09:20:00Z",
  "decided_at": "2027-11-16T09:20:00Z"
}

Отозвать открытую заявку

DELETE/v2/transfer-requests/{request_id} Key required

Parameters

Name In Type Description
request_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
DELETE /v2/transfer-requests/{request_id}
curl -X DELETE 'https://api.regexdomain.com/v2/transfer-requests/{request_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "domain": "example.com",
  "status": "open",
  "comment": "",
  "reason": "string",
  "sandbox": false,
  "created_at": "2027-11-16T09:20:00Z",
  "decided_at": "2027-11-16T09:20:00Z"
}

DNS

Сменить NS пачкой (до 50 доменов)

PATCH/v2/domains/nameservers Key required

Request body

Name Type Description
itemsrequired object[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
PATCH /v2/domains/nameservers
curl -X PATCH 'https://api.regexdomain.com/v2/domains/nameservers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"items": [{"domain": "example.com", "nameservers": ["ns1.example.net"]}]}'
{
  "items": [
    {
      "domain": "example.com",
      "nameservers": [
        "ns1.example.net"
      ],
      "error": {
        "code": "string",
        "message": "string"
      }
    }
  ]
}

DNS-записи домена

GET/v2/domains/{domain}/dns Key required

Parameters

Name In Type Description
domainrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains/{domain}/dns
curl 'https://api.regexdomain.com/v2/domains/{domain}/dns' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "domain": "example.com",
  "records": [
    {
      "type": "a",
      "host": "",
      "value": "203.0.113.10",
      "mx_priority": 0,
      "redirect_code": 301
    }
  ]
}

Заменить все записи пачкой

PUT/v2/domains/{domain}/dns Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
recordsrequired object[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
PUT /v2/domains/{domain}/dns
curl -X PUT 'https://api.regexdomain.com/v2/domains/{domain}/dns' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"records": [{"type": "a", "host": "", "value": "203.0.113.10", "mx_priority": 0, "redirect_code": 301}]}'
{
  "domain": "example.com",
  "records": [
    {
      "type": "a",
      "host": "",
      "value": "203.0.113.10",
      "mx_priority": 0,
      "redirect_code": 301
    }
  ]
}

Применить DNS-шаблон

POST/v2/domains/{domain}/dns/templates Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
templaterequired "vercel" | "github_pages" | "google_workspace" | "redirect"
params object

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/domains/{domain}/dns/templates
curl -X POST 'https://api.regexdomain.com/v2/domains/{domain}/dns/templates' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"template": "vercel", "params": {}}'
{
  "domain": "example.com",
  "records": [
    {
      "type": "a",
      "host": "",
      "value": "203.0.113.10",
      "mx_priority": 0,
      "redirect_code": 301
    }
  ]
}

Сменить NS домена

PUT/v2/domains/{domain}/nameservers Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
nameserversrequired string[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
PUT /v2/domains/{domain}/nameservers
curl -X PUT 'https://api.regexdomain.com/v2/domains/{domain}/nameservers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"nameservers": ["ns1.example.net"]}'
{
  "domain": "example.com",
  "nameservers": [
    "ns1.example.net"
  ],
  "error": {
    "code": "string",
    "message": "string"
  }
}

Дочерние серверы имён

GET/v2/domains/{domain}/nameserver-hosts Key required

Parameters

Name In Type Description
domainrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/domains/{domain}/nameserver-hosts
curl 'https://api.regexdomain.com/v2/domains/{domain}/nameserver-hosts' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "domain": "example.com",
  "hosts": [
    {
      "host": "string",
      "ips": [
        "203.0.113.10"
      ]
    }
  ]
}

Завести дочерний сервер имён

POST/v2/domains/{domain}/nameserver-hosts Key required

Parameters

Name In Type Description
domainrequired path string

Request body

Name Type Description
hostrequired string

ns1 или ns1.<домен>

ipsrequired string[]

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/domains/{domain}/nameserver-hosts
curl -X POST 'https://api.regexdomain.com/v2/domains/{domain}/nameserver-hosts' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"host": "string", "ips": ["203.0.113.10"]}'
{
  "host": "string",
  "ips": [
    "203.0.113.10"
  ]
}

Сменить адреса дочернего сервера имён

PUT/v2/domains/{domain}/nameserver-hosts/{host} Key required

Parameters

Name In Type Description
domainrequired path string
hostrequired path string

Request body

Name Type Description
ipsrequired string[]

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
PUT /v2/domains/{domain}/nameserver-hosts/{host}
curl -X PUT 'https://api.regexdomain.com/v2/domains/{domain}/nameserver-hosts/{host}' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"ips": ["203.0.113.10"]}'
{
  "host": "string",
  "ips": [
    "203.0.113.10"
  ]
}

Удалить дочерний сервер имён

DELETE/v2/domains/{domain}/nameserver-hosts/{host} Key required

Parameters

Name In Type Description
domainrequired path string
hostrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
DELETE /v2/domains/{domain}/nameserver-hosts/{host}
curl -X DELETE 'https://api.regexdomain.com/v2/domains/{domain}/nameserver-hosts/{host}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "host": "string",
  "ips": [
    "203.0.113.10"
  ]
}

Вебхуки

Список вебхуков

GET/v2/webhooks Key required

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/webhooks
curl 'https://api.regexdomain.com/v2/webhooks' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": 0,
      "url": "https://example.com/hook",
      "events": [
        "string"
      ],
      "label": "string",
      "active": true,
      "api_version": "string",
      "created_at": "2027-11-16T09:20:00Z",
      "secret": "string"
    }
  ]
}

Создать вебхук (секрет — один раз)

POST/v2/webhooks Key required

Request body

Name Type Description
urlrequired string
events "order.completed" | "order.failed" | "domain.registered" | "domain.failed" | "domain.renewed" | "domain.expiring"[]

Пусто — все события

label string

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/webhooks
curl -X POST 'https://api.regexdomain.com/v2/webhooks' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"url": "https://example.com/hook", "events": ["order.completed"], "label": ""}'
{
  "id": 0,
  "url": "https://example.com/hook",
  "events": [
    "string"
  ],
  "label": "string",
  "active": true,
  "api_version": "string",
  "created_at": "2027-11-16T09:20:00Z",
  "secret": "string"
}

Удалить вебхук

DELETE/v2/webhooks/{webhook_id} Key required

Parameters

Name In Type Description
webhook_idrequired path integer

Responses

  • 204 Успешный ответ
  • 422 Ошибка в параметрах
DELETE /v2/webhooks/{webhook_id}
curl -X DELETE 'https://api.regexdomain.com/v2/webhooks/{webhook_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Тестовое событие на этот адрес

POST/v2/webhooks/{webhook_id}/test Key required

Parameters

Name In Type Description
webhook_idrequired path integer

Responses

  • 202 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/webhooks/{webhook_id}/test
curl -X POST 'https://api.regexdomain.com/v2/webhooks/{webhook_id}/test' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Сменить секрет подписи (новый — один раз)

POST/v2/webhooks/{webhook_id}/secret Key required

Parameters

Name In Type Description
webhook_idrequired path integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/webhooks/{webhook_id}/secret
curl -X POST 'https://api.regexdomain.com/v2/webhooks/{webhook_id}/secret' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": 0,
  "url": "https://example.com/hook",
  "events": [
    "string"
  ],
  "label": "string",
  "active": true,
  "api_version": "string",
  "created_at": "2027-11-16T09:20:00Z",
  "secret": "string"
}

Журнал доставок

GET/v2/webhooks/{webhook_id}/deliveries Key required

Parameters

Name In Type Description
webhook_idrequired path integer
status query "pending" | "success" | "failed"
cursor query string
limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/webhooks/{webhook_id}/deliveries
curl 'https://api.regexdomain.com/v2/webhooks/{webhook_id}/deliveries' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "event_id": "id_123",
      "event": "string",
      "status": "string",
      "attempts": 0,
      "last_http_status": 0,
      "last_error": "string",
      "next_attempt_at": "2027-11-16T09:20:00Z",
      "delivered_at": "2027-11-16T09:20:00Z",
      "created_at": "2027-11-16T09:20:00Z"
    }
  ],
  "next_cursor": "string"
}

Повторить неудачную доставку

POST/v2/webhooks/{webhook_id}/deliveries/{event_id}/retry Key required

Parameters

Name In Type Description
webhook_idrequired path integer
event_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/webhooks/{webhook_id}/deliveries/{event_id}/retry
curl -X POST 'https://api.regexdomain.com/v2/webhooks/{webhook_id}/deliveries/{event_id}/retry' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "event_id": "id_123",
  "event": "string",
  "status": "string",
  "attempts": 0,
  "last_http_status": 0,
  "last_error": "string",
  "next_attempt_at": "2027-11-16T09:20:00Z",
  "delivered_at": "2027-11-16T09:20:00Z",
  "created_at": "2027-11-16T09:20:00Z"
}

Платёжка

Счета

GET/v2/payments Key required

Parameters

Name In Type Description
status query "pending" | "paid" | "expired" | "cancelled"
order_id query string
limit query integer

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/payments
curl 'https://api.regexdomain.com/v2/payments' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "items": [
    {
      "id": "id_123",
      "status": "pending",
      "network": "string",
      "currency": "USDT",
      "wallet": "string",
      "price": "35.00",
      "surcharge": "string",
      "pay_amount": "35.00",
      "pay_url": "https://example.com/hook",
      "order_id": "id_123",
      "description": "string",
      "return_url": "https://example.com/hook",
      "created_at": "2027-11-16T09:20:00Z",
      "expires_at": "2027-11-16T09:20:00Z",
      "paid_at": "2027-11-16T09:20:00Z",
      "tx_hash": "string",
      "payer": "string",
      "sandbox": false
    }
  ]
}

Счёт на оплату USDT

POST/v2/payments Key required

Request body

Name Type Description
amountrequired string

Цена в USDT, до центов: от 1 до 100000

network "trc20" | "bep20"

Сеть. Не задана, а кошельков два — её выберет клиент на странице оплаты

order_id string

Ваш номер заказа — вернётся в вебхуке

description string

Что оплачивают — видно клиенту

return_url string

https-адрес «Вернуться в магазин»

lifetime_minutes integer

Срок счёта, 10–180 минут

Responses

  • 201 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/payments
curl -X POST 'https://api.regexdomain.com/v2/payments' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"amount": "25.00", "network": "trc20", "order_id": "", "description": "", "return_url": "", "lifetime_minutes": 0}'
{
  "id": "id_123",
  "status": "pending",
  "network": "string",
  "currency": "USDT",
  "wallet": "string",
  "price": "35.00",
  "surcharge": "string",
  "pay_amount": "35.00",
  "pay_url": "https://example.com/hook",
  "order_id": "id_123",
  "description": "string",
  "return_url": "https://example.com/hook",
  "created_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "paid_at": "2027-11-16T09:20:00Z",
  "tx_hash": "string",
  "payer": "string",
  "sandbox": false
}

Статус счёта

GET/v2/payments/{payment_id} Key required

Parameters

Name In Type Description
payment_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
GET /v2/payments/{payment_id}
curl 'https://api.regexdomain.com/v2/payments/{payment_id}' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "status": "pending",
  "network": "string",
  "currency": "USDT",
  "wallet": "string",
  "price": "35.00",
  "surcharge": "string",
  "pay_amount": "35.00",
  "pay_url": "https://example.com/hook",
  "order_id": "id_123",
  "description": "string",
  "return_url": "https://example.com/hook",
  "created_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "paid_at": "2027-11-16T09:20:00Z",
  "tx_hash": "string",
  "payer": "string",
  "sandbox": false
}

Отменить счёт

POST/v2/payments/{payment_id}/cancel Key required

Parameters

Name In Type Description
payment_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/payments/{payment_id}/cancel
curl -X POST 'https://api.regexdomain.com/v2/payments/{payment_id}/cancel' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "status": "pending",
  "network": "string",
  "currency": "USDT",
  "wallet": "string",
  "price": "35.00",
  "surcharge": "string",
  "pay_amount": "35.00",
  "pay_url": "https://example.com/hook",
  "order_id": "id_123",
  "description": "string",
  "return_url": "https://example.com/hook",
  "created_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "paid_at": "2027-11-16T09:20:00Z",
  "tx_hash": "string",
  "payer": "string",
  "sandbox": false
}

Песочница: изобразить оплату

POST/v2/payments/{payment_id}/simulate Key required

Parameters

Name In Type Description
payment_idrequired path string

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/payments/{payment_id}/simulate
curl -X POST 'https://api.regexdomain.com/v2/payments/{payment_id}/simulate' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "id": "id_123",
  "status": "pending",
  "network": "string",
  "currency": "USDT",
  "wallet": "string",
  "price": "35.00",
  "surcharge": "string",
  "pay_amount": "35.00",
  "pay_url": "https://example.com/hook",
  "order_id": "id_123",
  "description": "string",
  "return_url": "https://example.com/hook",
  "created_at": "2027-11-16T09:20:00Z",
  "expires_at": "2027-11-16T09:20:00Z",
  "paid_at": "2027-11-16T09:20:00Z",
  "tx_hash": "string",
  "payer": "string",
  "sandbox": false
}

Служебные

Состояние сервиса

GET/v2/health No key

Без ключа. 200 — сервис отвечает.

Responses

  • 200 Успешный ответ
GET /v2/health
curl 'https://api.regexdomain.com/v2/health'
{
  "status": "ok",
  "time": "2027-11-16T09:20:00Z"
}

Сбросить песочницу

POST/v2/sandbox/reset Key required

Только для ключей regex_test_…: баланс снова $1000, тестовые домены и заказы стираются.

Responses

  • 200 Успешный ответ
  • 422 Ошибка в параметрах
POST /v2/sandbox/reset
curl -X POST 'https://api.regexdomain.com/v2/sandbox/reset' \
  -H 'Authorization: Bearer YOUR_API_KEY'
{
  "balance": {
    "available": "12.50",
    "reserved": "12.50",
    "currency": "USD"
  },
  "domains_deleted": 0,
  "orders_deleted": 0
}