Developer API
Register domains, send SMS and WhatsApp messages, verify phone numbers with one-time codes and check websites from your own app. Pay per use from a naira wallet — no monthly fee, no dollar card. One key works for everything.
1. Get a key
- Create an account and confirm your email.
- Add your registrant contact under Domains (registries require a real name, address and phone).
- Open Account → Developer, top up your wallet and create an API key. The key is shown once — keep it on your server, never in browser code.
2. Domains & DNS
Base URL https://royalmancloud.com/api/v1. Send the key in every request: Authorization: Bearer rc_live_…. Amounts are in kobo (₦1 = 100). Up to 60 requests per minute per key.
curl https://royalmancloud.com/api/v1/domains/check?domain=mybusiness.com.ng \
-H "Authorization: Bearer $ROYALMAN_KEY"
{ "domain": "mybusiness.com.ng", "available": true, "status": "available",
"price": { "tld": "com.ng", "register": 1590000, "renew": 1590000, "years": [1, 10] } }curl -X POST https://royalmancloud.com/api/v1/domains \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Idempotency-Key: order-2026-0001" \
-H "Content-Type: application/json" \
-d '{"domain": "mybusiness.com.ng", "years": 1}'
{ "order": "RC-1042", "total": 1590000, "status": "paid",
"items": [{ "description": "Register mybusiness.com.ng · 1 year", "status": "queued" }],
"wallet": { "balance": 3410000 } }The Idempotency-Key makes retries safe: sending the same key again returns the same order and never charges twice. Use a new key for each new purchase.
// Node.js
const res = await fetch("https://royalmancloud.com/api/v1/domains/mybusiness.com.ng", {
headers: { Authorization: `Bearer ${process.env.ROYALMAN_KEY}` },
});
const domain = await res.json(); // { name, status: "active", expiresAt, nameservers }3. SMS
Send to any Nigerian number (0803… or 234803…), up to 10,000 per request. Each 160 characters is one page; you pay per page per number before sending, and numbers the network refuses are refunded to your wallet. Use a sender name approved in Account → Bulk SMS (GET /sms/senders lists them).
curl -X POST https://royalmancloud.com/api/v1/sms \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Idempotency-Key: otp-2026-0001" \
-H "Content-Type: application/json" \
-d '{"to": ["08031234567"], "from": "MyShop", "message": "Your code is 482913"}'
{ "id": "8f0c…", "status": "sent", "recipients": 1, "sent": 1, "failed": 0,
"pages": 1, "cost": 500, "refunded": 0, "invalid": [], "wallet": { "balance": 2499500 } }Ask POST /sms/quote first to see the cost. The same Idempotency-Key never sends twice. Nigerian networks don't deliver bulk SMS between 8pm and 8am: a send to more than one number in those hours comes back "status": "scheduled" with sendAt (8am), is charged only when it goes, and can be cancelled with POST /sms/{id}/cancel. A message to a single number (e.g. a login code) always goes at once.
4. Website checks
Check any website the way our AI Website Doctor does, and get the answer as data: is it online and how fast, the SSL certificate and its expiry, security headers, SEO basics, broken links, missing files, mixed content and how heavy the page is on 3G. A quick check is only online + SSL — cheap enough to run every few minutes. Pay per check; a check that can’t run at all isn’t charged.
curl -X POST https://royalmancloud.com/api/v1/checks \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "clientsite.com.ng", "type": "full"}'
{ "domain": "clientsite.com.ng", "type": "full", "status": "up", "health": 72, "responseMs": 640,
"ssl": { "validTo": "2027-01-04T…", "daysLeft": 33, "issuer": "Let's Encrypt", "error": null },
"weight": { "bytes": 2450000, "seconds3g": 8.2, … },
"issues": [{ "code": "missing_security_headers", "severity": "medium", "title": "…", "advice": "…" }],
"cost": 5000, "wallet": { "balance": 2445000 } }Good for agencies: check every client’s website each morning and send them a report. Prices: GET /checks/prices.
5. OTP codes (phone verification)
Verify a user's phone in two calls — no sender name to register, no code storage on your side. We make the code, send it by SMS (or WhatsApp), keep only a scrambled copy, and tell you if what the user typed is right. A code works once, expires (10 minutes by default), and locks after 5 wrong tries. At most 5 codes an hour go to one number. You pay per code sent; a code that can't be sent isn't charged, and checking is free.
curl -X POST https://royalmancloud.com/api/v1/otp \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Content-Type: application/json" \
-d '{"to": "08031234567", "brand": "Shoply"}'
{ "id": "5b1c…", "to": "08031234567", "channel": "sms", "expiresAt": "…", "cost": 1200 }
// The user gets: "Shoply: Your verification code is 482913. It expires in 10 minutes."
curl -X POST https://royalmancloud.com/api/v1/otp/verify \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Content-Type: application/json" \
-d '{"id": "5b1c…", "code": "482913"}'
{ "valid": true, "to": "08031234567" } // or { "valid": false, "reason": "wrong code", "attemptsLeft": 4 }Options: channel "sms" (Nigerian numbers) or "whatsapp" (any country — send the number with its country code), length 4–8 digits, expiresIn 1–30 minutes. With a test key nothing is sent and the answer includes the code, so you can test both calls.
6. WhatsApp messages
Send order updates, reminders and alerts to your customers on WhatsApp. Messages go through our verified WhatsApp Business number in a standard layout: your business name and your message. Paid per message; a message WhatsApp refuses isn't charged. Up to 1,000 messages a day per account (ask support for more).
curl -X POST https://royalmancloud.com/api/v1/whatsapp \
-H "Authorization: Bearer $ROYALMAN_KEY" \
-H "Idempotency-Key: order-42-shipped" \
-H "Content-Type: application/json" \
-d '{"to": "2348031234567", "from": "Shoply", "message": "Your order #42 has shipped. Track it at shoply.ng/t/42"}'
{ "id": "9e2f…", "to": "08031234567", "status": "sent", "cost": 2500, "wallet": { "balance": 2442500 } }Send only to people who agreed to hear from you — WhatsApp blocks numbers that get reported as spam. No marketing blasts.
Sandbox (test mode)
Create a test key (rc_test_…) in Account → Developer and use it exactly like a live key — same URLs, same answers. Nothing is real: no domain is registered, no money moves, and you start with a ₦1,000,000 test balance.
- Any name containing
taken(e.g.mytakenshop.com) is unavailable; everything else is free — so you can test both paths. - Test domains are active immediately and appear in
GET /domainsfor your test keys only; live keys never see them. - SMS from a test key is not delivered to any phone — use
"from": "TestSender". Website checks from a test key are real checks paid from the test balance. POST /sandbox/reset(test keys only) or the Reset button in your account clears test domains and restores the balance.- Responses carry
"sandbox": trueand the headerx-royalman-mode: test, so your code can tell.
When it works, switch the key in your server’s settings from rc_test_… to rc_live_…. Nothing else changes.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | /me | Your account and wallet balance. |
GET | /prices | Prices for every extension on sale (register, renew), in kobo. |
GET | /domains/check?domain=name.tld | Is it available, and what it costs. |
POST | /domains | Register a domain, paid from your wallet. Body: { "domain", "years" }. Needs an Idempotency-Key header. |
GET | /domains | All domains in your account. |
GET | /domains/{name} | One domain: status, expiry, nameservers. |
POST | /domains/{name}/renew | Renew from your wallet. Body: { "years" }. Needs an Idempotency-Key header. |
PUT | /domains/{name}/nameservers | Set 2–4 nameservers. Body: { "nameservers": [ … ] }. |
GET | /wallet | Balance and the last 50 movements. |
GET | /sms/senders | Your approved sender names. |
POST | /sms/quote | What an SMS will cost before sending. Body: { "to", "message" }. |
POST | /sms | Send an SMS, paid from your wallet. Body: { "to": [ … ], "from", "message" }. Needs an Idempotency-Key header. |
GET | /sms/{id} | One SMS send: delivered, failed, refunded. |
GET | /checks/prices | The price of a full and a quick website check, in kobo. |
POST | /checks | Check a website now. Body: { "domain", "type": "full" | "quick" }. |
POST | /otp | Send a one-time code by SMS or WhatsApp. Body: { "to", "channel"?, "brand"?, "length"?, "expiresIn"? }. |
POST | /otp/verify | Check a code. Body: { "id", "code" } → { "valid": true | false }. Free. |
GET | /otp/prices | Price of a code by SMS and by WhatsApp, in kobo. |
POST | /whatsapp | Send a WhatsApp message. Body: { "to", "from", "message" }. Needs an Idempotency-Key header. |
GET | /whatsapp/{id} | One WhatsApp message: sent or failed. |
POST | /sandbox/reset | Test keys only: clear test domains and restore the ₦1,000,000 test balance. |
Statuses and errors
- A new domain is
registration_pendinguntil the registry confirms it (usually minutes), thenactive. PollGET /domains/{name}. - Errors return JSON
{ "error": "…" }with:400bad request,401missing or revoked key,402not enough in the wallet,404not in your account,409not possible right now,429too many requests,503registrar briefly unavailable. - If a payment can’t be completed after the wallet was charged, the money goes straight back to the wallet.
Questions? Contact us or chat on WhatsApp.