Introduction Русская версия | Last update: 17.05.2025

Authorization

Authorization using an API key is used if access to your personal account is required. Such requests must contain the following headers:

  • Authorization: Bearer {API Key} API key, string

The API key can be obtained in the bot itself (Profile -> API)

Warning

Only you should have access to the API key.

Interaction with API

https://userapi.getdomain.sbs base URL

Content-Type: application/json for POST requests

Errors

If the request was processed with an error, you will receive the result in the following format:


{ "ok": false, "error_code": "EXAMPLE_ERROR" }

Error code Description
AUTHORIZATION_REQUIRED Authorization required (invalid API key, header not passed)
REQUIRED_PARAMETRS_MISSED Required parameters are missing
USER_BANNED Permanent blocking in the bot (contact support for information)
RATE_LIMIT Maximum number of requests per minute exceeded
REQUIRED_SUBSCRIPTION An active Prime subscription is required for access.
INTERNAL_SERVER_ERROR Internal server error

Account

Account data

Method
GET /account/get

Request parameters
no

Request example
https://userapi.getdomain.sbs/account/get

Response example

{ "ok": true, "user_id": 1, "balance": 100, "ref_balance": 10 }

Domains

TLDs list

Returns a list of domain zones. No authorization required

Method
GET /tlds/get

Request parameters
no

Request example
https://userapi.getdomain.sbs/tlds/get

Response example

{ "ok": true, "items": [ { "text": "shop", "price": 5 } ] }

Domains list

Returns a list of active domains from your account.

Method
GET /domains/list

Request parameters
no

Request example
https://userapi.getdomain.sbs/domains/list

Response example

{ "ok": true, "items": [ { "id": 1, "text": "example.com" } ] }

Domain data

Method
GET /domains/get

Request parameters
Parametr Value
domain_id Domain ID integer

Request example
https://userapi.getdomain.sbs/domains/get?domain_id=1

Response example

{ ok: true, id: 1, domain: "example.com", nameservers: ["ns1.test.com", "ns2.test.com"], main_record: "127.0.0.1", bans: { metamask: false, google: false }, cloudflare: { ssl_status: false, security_level: "medium" } }

Register domain

Method
POST /domains/register

Request parameters
Parametr Value
domain Domain for registration string

Request example

{ "domain": "example.com" }

Response example

{ "ok": true, "domainId": 1 }

Possible errors
Parametr Value
PURCHASE_UNAVAILABLE The domain is not available for purchase
INSUFFICIENT_FUNDS Insufficient funds to purchase
REGISTRATION_ERROR Error registering domain

NS records

Update Nameservers

When passing an empty array as Nameservers, ours will be applied.

Method
POST /nameservers/update

Request parameters
Parametr Value
domain_id Domain ID integer
nameservers String array with Nameservers array[string]

Request example

{ "domain_id": 1, "nameservers": ["ns1.test.com", "ns2.test.com"] }

Response example

{ "ok": true }

Possible errors
Parametr Value
DOMAIN_NOT_FOUND Domain not found
TOO_MUCH_NAMESERVERS Number of Nameservers exceeded. Maximum: 4
INCORRECT_NAMESERVERS Incorrect Nameservers
CANNOT_CHANGE_NAMESERVERS Failed to change Nameservers, please try again later.

Update NS record

Updating the base A record for your domain.

Method
POST /nameservers/updateRecord

Request parameters
Parametr Value
domain_id Domain ID integer
content IP address string

Request example

{ "domain_id": 1, "content": "127.0.0.1" }

Response example

{ "ok": true }

Possible errors
Parametr Value
DOMAIN_NOT_FOUND Domain not found
CANNOT_CHANGE_NS_RECORD Failed to change NS record, try again later.

Cloudflare

Enable/disable SSL certificate

Method
POST /cloudflare/updateSSL

Request parameters
Parametr Value
domain_id Domain ID integer
status Enable or disable SSL certificate boolean

Request example

{ "domain_id": 1, "status": true }

Response example

{ "ok": true }

Possible errors
Parametr Value
DOMAIN_NOT_FOUND Domain not found
CANNOT_CHANGE_STATUS Failed to enable/disable SSL certificate. Try again later.

Select security level

Method
POST /nameservers/updateSecurityLevel

Request parameters
Parametr Value
domain_id Domain ID integer
level Security level (under_attack, high, medium, low, off) string

Request example

{ "domain_id": 1, "level": "off" }

Response example

{ "ok": true }

Possible errors
Parametr Value
DOMAIN_NOT_FOUND Domain not found
CANNOT_CHANGE_SECURITY_LEVEL Failed to change security level, please try again later.