The regcity API gives your scripts everything the client area can do: check and order domains one by one or in bulk, renew them, change nameservers and contacts, pay invoices, manage your profile and talk to support. Prices, balance and rules are the same as in the client area.
Contents
- Getting started
- Checking domains and prices
- Ordering a single domain (cart)
- Transferring a domain
- Bulk registration, renewal and nameservers
- Your domains
- Managing a domain
- Renewing a domain
- Invoices, payments and balance
- Profile, API key and domain contacts
- Support tickets
- Other calls
- Errors and limits
1. Getting started
API key
Open Profile → API Key and click Generate a New Key. Anyone with the key can spend your balance: keep it secret and generate a new one if it leaks — the old key stops working at once.
Request format
POST https://regcity.net/api/<role>/<module>/<method>
Content-Type: application/json
roleisguestfor public calls that need no key, orclientfor calls on your account.- Client calls use HTTP Basic authentication: username
client, password your API key. - Parameters go in the JSON body.
GETwith query parameters also works for read-only calls.
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' \
-X POST https://regcity.net/api/client/client/balance_get_total -d '{}'
Every response looks like this:
{"result": 25.4, "error": null}
On failure result is null and error is {"message": "...", "code": 123}.
Sessions and cookies
Most calls are independent. The cart (section 3) is the exception: it lives in your session, so a script that orders through the cart must keep cookies between requests. With curl, add -c cookies.txt -b cookies.txt to every call of the sequence. Send one authenticated client call first, so the session knows it is you before you fill the cart.
Lists and paging
Calls that return lists (get_list) accept page and per_page (default 100, up to 500) and return:
{"pages": 3, "page": 1, "per_page": 20, "total": 47, "list": [ ... ]}
2. Checking domains and prices
No API key needed. Checks do not reserve a domain.
| Call | Body | Returns |
|---|---|---|
guest/domaincheck/check |
{"sld": "example", "tld": ".com"} |
available (true/false), price_registration, price_renew, min_years |
guest/domaincheck/suggest |
{"sld": "example", "tlds": [".com", ".net", ".io"]} |
the same for each extension |
guest/domaincheck/bulk |
{"domains": ["example.com", "example.org"]} |
the same for each domain (string with one domain per line also accepted) |
guest/domaincheck/bulk_limits |
{} |
max_per_request and extensions that cannot be checked or registered in bulk |
guest/servicedomain/tlds |
{} |
every extension we sell with price_registration, price_renew, price_transfer, min_years, allow_register, allow_transfer |
guest/servicedomain/pricing |
{"tld": ".com"} |
prices for one extension |
guest/servicedomain/can_be_transferred |
{"sld": "example", "tld": ".com"} |
true if the domain can be transferred to us |
sld is the name without the extension; tld includes the leading dot. A bulk check accepts up to max_per_request domains (see bulk_limits, currently 25); for more, split the list.
curl -s -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/guest/domaincheck/check -d '{"sld": "example", "tld": ".com"}'
{"result": {"domain": "example.com", "available": true, "price_registration": 14.69, "price_renew": 14.69, "min_years": 1}, "error": null}
3. Ordering a single domain (cart)
Ordering works like the website: put the domain in the cart, then check out. Keep cookies between the steps.
Step 1 — start an authenticated session
curl -s -c cookies.txt -b cookies.txt -u client:YOUR_API_KEY -H 'Content-Type: application/json' \
-X POST https://regcity.net/api/client/profile/get -d '{}'
Step 2 — find the domain product ID
curl -s -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/guest/product/get_list -d '{}'
Use the id of the product whose type is domain.
Step 3 — add the domain to the cart
curl -s -c cookies.txt -b cookies.txt -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/guest/cart/add_item -d '{
"id": DOMAIN_PRODUCT_ID,
"action": "register",
"register_sld": "example",
"register_tld": ".com",
"register_years": 1,
"ns1": "ns1.example.org",
"ns2": "ns2.example.org"
}'
| Parameter | Meaning |
|---|---|
id |
domain product ID from step 2 |
action |
register or transfer (section 4) |
register_sld, register_tld |
the domain, e.g. example and .com |
register_years |
registration period in years (at least the extension's min_years) |
ns1–ns4 |
optional nameservers; without them your default nameservers are used |
contact_id |
optional domain contact (section 10); without it your default contact is used |
multiple |
true to keep what is already in the cart; by default the cart is emptied first, so one domain per order |
If your domain contact is missing details the registrar requires, this call fails and names the missing fields.
Check what is in the cart with guest/cart/get, remove an item with guest/cart/remove_item ({"id": ITEM_ID}), empty it with guest/cart/reset, and apply a promo code with guest/cart/apply_promo ({"promocode": "CODE"}).
Step 4 — check out
curl -s -c cookies.txt -b cookies.txt -u client:YOUR_API_KEY -H 'Content-Type: application/json' \
-X POST https://regcity.net/api/client/cart/checkout -d '{}'
{"result": {"order_id": 1234, "invoice_hash": null, "orders": [ ... ]}, "error": null}
- If your balance covers the total, the invoice is paid from the balance right away and
invoice_hashisnull. The domain is registered within a few minutes. - Otherwise the order waits for payment and
invoice_hashpoints to the unpaid invoice (section 9). - If the domain turns out to be taken after payment, the amount is returned to your balance automatically.
4. Transferring a domain
Unlock the domain at your current provider and get its authorisation (EPP) code. Then use the cart as in section 3, with:
{
"id": DOMAIN_PRODUCT_ID,
"action": "transfer",
"transfer_sld": "example",
"transfer_tld": ".com",
"transfer_code": "AUTH-CODE"
}
Check first with guest/servicedomain/can_be_transferred; the price is price_transfer from guest/servicedomain/tlds. A transfer usually takes up to 5–7 days and adds one year to the registration.
5. Bulk registration, renewal and nameservers
Use these calls for many domains at once. domains is an array or a string with one domain per line, up to 200 per request.
Register many domains
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/client/bulkdomain/register \
-d '{"domains": ["example.com", "example.net"], "years": 1, "ns1": "ns1.example.org", "ns2": "ns2.example.org"}'
Optional: years (default 1), ns1–ns4 (default: your nameservers), contact_id (default: your default contact). Availability is not checked — check first (section 2).
Returns at once: {"batch_id": 12, "queued": 2, "errors": {}}. Orders are placed in the background and one invoice is issued for the batch, paid from your balance if it is enough. Track progress with:
| Call | Body | Returns |
|---|---|---|
client/bulkdomain/batches |
{} |
your batches: status, total, ordered, waiting, failed, errors per domain, invoice_hash |
client/bulkdomain/process_batch |
{"id": BATCH_ID} |
speeds up processing of one batch and returns its progress |
Renew many domains
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/client/bulkdomain/renew -d '{"domains": ["example.com", "example.net"]}'
Renews every listed domain that is active in your account for one more period, on one invoice paid from the balance when possible. Returns renewed, errors (for example, a domain that is not yours or already has an unpaid renewal) and invoice_hash.
Change nameservers on many domains
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/client/bulkdomain/update_nameservers \
-d '{"domains": ["example.com", "example.net"], "ns1": "ns1.example.org", "ns2": "ns2.example.org"}'
Returns queued and errors. The changes are sent to the registrar within a few minutes; see the result with client/bulkdomain/jobs ({"limit": 100}).
6. Your domains
| Call | Body | Returns |
|---|---|---|
client/order/get_list |
{"type": "domain", "per_page": 100, "page": 1} |
your domain orders: id, title, status, period, expires_at, … |
client/order/get_list |
{"type": "domain", "status": "active"} |
only active domains |
client/order/get_list |
{"expiring": 1} |
orders that expire soon |
client/order/get |
{"id": ORDER_ID} |
one order |
client/order/service |
{"id": ORDER_ID} |
domain details: domain, ns1–ns4, privacy, locked, registered_at, expires_at, contact |
client/order/delete |
{"id": ORDER_ID} |
cancels an order that has not been paid yet |
Order statuses: pending_setup (paid, being registered), active, failed_setup (registration failed), failed_renew, suspended, canceled.
The order ID is what you pass as order_id to the domain calls below.
7. Managing a domain
All calls take order_id and are sent to the registrar immediately.
| Call | Extra parameters | What it does |
|---|---|---|
client/servicedomain/update_nameservers |
ns1, ns2, optional ns3, ns4 |
changes the nameservers |
client/servicedomain/update_contacts |
contact (see below) |
changes the registrant contact of this domain |
client/servicedomain/lock |
— | enables the transfer lock |
client/servicedomain/unlock |
— | disables the transfer lock (needed before transferring away) |
client/servicedomain/enable_privacy_protection |
— | hides your contact details in WHOIS |
client/servicedomain/disable_privacy_protection |
— | shows them |
client/servicedomain/get_transfer_code |
— | returns the authorisation (EPP) code |
client/servicedomain/sync |
— | refreshes expiry date, lock and privacy status from the registrar |
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/client/servicedomain/update_nameservers \
-d '{"order_id": 1234, "ns1": "ns1.example.org", "ns2": "ns2.example.org"}'
For update_contacts, send every field (use an empty string for fields you do not need):
{
"order_id": 1234,
"contact": {
"first_name": "Jane", "last_name": "Doe", "company": "",
"email": "jane@example.org",
"address1": "1 Main St", "address2": "",
"city": "Springfield", "state": "IL", "postcode": "62701", "country": "US",
"phone_cc": "1", "phone": "5555550100"
}
}
8. Renewing a domain
curl -s -u client:YOUR_API_KEY -H 'Content-Type: application/json' -X POST \
https://regcity.net/api/client/invoice/renewal_invoice -d '{"order_id": 1234}'
Returns the hash of the renewal invoice. If your balance covers it, the invoice is paid at once and the domain is renewed within a few minutes. If not, the invoice stays unpaid; top up your balance and call renewal_invoice again — it reuses the same invoice and pays it from the balance.
To renew many domains in one invoice, use client/bulkdomain/renew (section 5).
9. Invoices, payments and balance
| Call | Body | Returns |
|---|---|---|
client/invoice/get_list |
{"status": "unpaid", "per_page": 20} |
your invoices (status: paid, unpaid, refunded, canceled) |
client/invoice/get |
{"hash": "INVOICE_HASH"} |
one invoice with its lines and total |
client/invoice/transaction_get_list |
{} |
your processed payments |
client/client/balance_get_total |
{} |
current balance |
client/client/balance_get_list |
{} |
balance history: top-ups, payments, refunds |
client/invoice/funds_invoice |
{"amount": 50} |
creates a top-up invoice and returns its hash |
guest/invoice/gateways |
{} |
available payment methods |
Paying an invoice. Orders, renewals and bulk operations are paid from your balance automatically whenever it is enough, so the easiest way to automate is to keep the balance topped up. To pay an unpaid invoice or a top-up invoice, open its page:
https://regcity.net/invoice/INVOICE_HASH
and choose a payment method (cryptocurrency, or account balance for regular invoices). A PDF copy is at https://regcity.net/invoice/pdf/INVOICE_HASH.
10. Profile, API key and domain contacts
Profile
| Call | Body | What it does |
|---|---|---|
client/profile/get |
{} |
your profile |
client/profile/update |
fields to change, e.g. {"phone": "5555550100"} |
updates the profile |
client/profile/change_password |
{"current_password": "...", "new_password": "...", "confirm_password": "..."} |
changes the password |
client/profile/api_key_reset |
{} |
issues a new API key (the current one stops working) |
client/bulkdomain/profile_status |
{} or {"contact_id": ID} |
complete: true, or the missing fields the registrar needs |
Domain contacts
The first contact in the list is your default. New domains are registered with it unless you pass contact_id.
| Call | Body | What it does |
|---|---|---|
client/bulkdomain/contacts |
{} |
your saved contacts |
client/bulkdomain/save_contact |
contact fields; add id to update an existing one |
creates or updates a contact |
client/bulkdomain/set_default_contact |
{"id": CONTACT_ID} |
makes it the default |
client/bulkdomain/delete_contact |
{"id": CONTACT_ID} |
deletes it |
client/bulkdomain/zone_rules |
{} |
extensions that need a contact from a certain region (.eu, .us, .ca, …) |
Contact fields for save_contact:
{
"label": "Main contact",
"first_name": "Jane", "last_name": "Doe", "company": "",
"email": "jane@example.org",
"address_1": "1 Main St", "address_2": "",
"city": "Springfield", "state": "IL", "postcode": "62701", "country": "US",
"phone_cc": "1", "phone": "5555550100"
}
label is your own name for the contact. state is required for US and Canadian addresses. Note the underscore in address_1/address_2 here, unlike update_contacts in section 7.
Default nameservers
| Call | Body | What it does |
|---|---|---|
client/bulkdomain/nameservers |
{} |
your default nameservers |
client/bulkdomain/save_nameservers |
{"ns1": "...", "ns2": "...", "ns3": "", "ns4": ""} |
sets them; empty values restore ours |
11. Support tickets
| Call | Body | What it does |
|---|---|---|
client/support/helpdesk_get_pairs |
{} |
departments you can write to (id → name) |
client/support/ticket_create |
{"support_helpdesk_id": 1, "subject": "...", "content": "..."} |
opens a ticket, returns its ID |
client/support/ticket_get_list |
{"status": "open"} |
your tickets |
client/support/ticket_get |
{"id": TICKET_ID} |
a ticket with all messages |
client/support/ticket_reply |
{"id": TICKET_ID, "content": "..."} |
adds a reply (reopens a closed ticket) |
client/support/ticket_close |
{"id": TICKET_ID} |
closes it |
Knowledge base articles are available without a key: guest/support/kb_article_get_list, guest/support/kb_article_get ({"id": ID}).
12. Other calls
| Call | Body | Returns |
|---|---|---|
client/email/get_list |
{} |
emails we sent you |
client/email/get |
{"id": ID} |
one email |
client/email/resend |
{"id": ID} |
sends it again |
client/invoice/get_tax_rate |
{} |
tax rate that applies to you |
guest/currency/get_pairs |
{} |
currencies |
guest/system/countries |
{} |
country codes for contact forms |
guest/system/company |
{} |
our company details |
13. Errors and limits
| Error | Meaning |
|---|---|
Authentication Failed (201–206) |
missing, wrong or reset API key, or wrong username (must be client) |
Order not found |
the order does not exist or is not yours |
The domain contact is missing details … |
complete your contact (section 10) |
| rate-limit error | too many requests; wait a minute and retry |
- Availability checks, ordering and payment calls are rate-limited per IP address. Pause between large batches, and use the bulk calls instead of many single ones.
- Calls that change something at the registrar can take several seconds.
- Keep a log of
order_id,batch_idandinvoice_hashvalues your script receives.
Need help?
Open a ticket (section 11) or write to support@regcity.net, and include the call you made and the full error response. Never send your API key.