{"openapi":"3.0.3","info":{"title":"Zonic247 API","version":"1.0.0","description":"Zonic247 API: search, purchase and renew domains, run their DNS, check multi-currency wallet balances and start hosted payment checkouts.\n\nAuthenticate with an API key created in your Zonic247 dashboard (`Authorization: Bearer wd_<key>`). Public search, country/location lookups, and `GET /api/v1/whois/{domain}` also accept anonymous requests.\n\n### Authentication & API Key Scopes\n- `Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4` — permanent, scope-restricted API key generated from your dashboard. Supported scopes: `domains:read`, `domains:buy`, `wallet:read`, and `profile:write`.\n\n### Country & Currency Behaviour\n- Pricing and default wallet preference automatically follow the user's country (`NG` -> `NGN`, all other countries -> `USD`).\n- **Website / Anonymous visitors**: country is resolved from trusted proxy headers or visitor IP geolocation.\n- **API key callers**: country is resolved from your account's saved registrant profile (`GET/PUT /api/v1/profile`), falling back to trusted visitor IP.\n- **Nigeria cheapest-provider selection**: when multiple registrars are enabled and the caller is in Nigeria (`NGN`), `POST /api/v1/search` converts every registrar's quote to Naira first and streams only the single cheapest quote per domain.\n\n### What You Can Build via API Keys\n1. **Domain Search & Live Quotes** — Stream live availability, NGN/USD registration & renewal prices, suggestions, and RDAP dates via `POST /api/v1/search` (SSE). Authenticated searches persist quotes and return `quoteId` (`id`).\n2. **Buy & Renew Domains** — Check wallet balance via `GET /api/v1/wallets`, optionally preview assigned nameservers via `POST /api/v1/quotes/{id}/nameservers`, reserve an order via `POST /api/v1/orders` (or `/api/v1/orders/bulk` for up to 20 domains) with a unique `Idempotency-Key`, and poll `GET /api/v1/orders/{id}` until `succeeded` or `failed`. Failed orders refund your wallet automatically.\n3. **Hosted Checkout & Payment Gateways** — Preview wallet + gateway split via `POST /api/v1/checkout/preview`, start hosted gateway checkout via `POST /api/v1/checkout` or `POST /api/v1/payments`, and verify settlement via `POST /api/v1/payments/{id}/verify`. Direct wallet credits cannot be issued via generated API keys.\n4. **Managed DNS & Nameservers** — Manage 16 DNS record types (`A`, `AAAA`, `CNAME`, `MX`, `TXT`, `NS`, `SRV`, `CAA`, `PTR`, `TLSA`, `HTTPS`, `SVCB`, `SSHFP`, `URI`, `LOC`, `DS`) via `POST`/`PUT`/`PATCH`/`DELETE /api/v1/domains/{domain}/dns/records`, apply bulk changes via `/dns/batch`, or update custom nameservers via `/nameservers` (HostAfrica registrations support custom nameservers; Cloudflare registrations remain on managed platform DNS). Cloudflare proxy (`proxied: true`) is strictly supported on `A`, `AAAA`, and `CNAME` records (`record_proxy_unsupported` 422 otherwise).\n5. **Expiry & Drop-Catch Monitors** — Create renewal or watch/auto-buy monitors via `POST /api/v1/monitors` with price caps and priority bids.\n6. **Invoices & PDF Receipts** — List invoices via `GET /api/v1/invoices` and download PDFs via `GET /api/v1/invoices/{id}/receipt`.\n\n### Documentation Formats & AI Agents\n- **Scalar API Reference**: `/api/v1/docs`\n- **Swagger UI**: `/api/v1/swagger`\n- **OpenAPI 3.0.3 JSON**: `/api/v1/docs/openapi.json`\n- **AI / LLM Documentation**: `/llms.txt` (concise index) and `/llms-full.txt` (complete API reference in Markdown)\n\n### First integration\nCreate an API key from your dashboard and copy it when shown once. Authorize requests with `Authorization: Bearer wd_<key>`. Each endpoint below includes copyable cURL and JavaScript `fetch` samples. List endpoints accept `page` (1-based), `limit` (1–100, default 25), optional literal-text `q`, `sort`, and `order`.\n\n### Money safety\nWallet debits, order reservation, and payment verification are idempotent and ledgered. Customer redirects never prove payment: call the verify endpoint after gateway checkout completes.\n\n### Responses & Human-Readable Errors\nEvery JSON response shares one envelope. Success returns `{\"success\":true,\"message\":\"...\",\"data\":{...}}`. Failures return `{\"success\":false,\"statusCode\":...,\"message\":\"<human-readable explanation>\",\"error\":{\"code\":\"<machine_code>\"}}` (plus `errors` mapping field names to messages on HTTP 422). Insufficient wallet balances return HTTP `402` (`insufficient_balance`) with exact required, available, and shortfall amounts in `message`. Order polling returns `errorMessage` alongside `errorCode` when an order fails or needs attention.\n\nAll endpoints use /api/v1. JSON responses use success, message and data. Failures include statusCode and validation errors. SSE and documentation use their native formats."},"servers":[{"url":"/","description":"This deployment (relative)"},{"url":"https://your-domain.example","description":"Replace with your deployment origin"}],"tags":[{"name":"Health","description":"Liveness probes"},{"name":"Documentation","description":"This reference"},{"name":"Locations","description":"Country, state and city catalog"},{"name":"Search","description":"Availability and pricing quotes"},{"name":"Orders","description":"Registration, renewal and checkout"},{"name":"Documents","description":"Private registration documents"},{"name":"DNS","description":"Zone, nameserver and record management"},{"name":"Wallets","description":"Balances and ledger history"},{"name":"Monitors","description":"Drop-catch and renewal monitoring with auto-buy"},{"name":"Domains","description":"Owned domains and registry WHOIS"},{"name":"Payments","description":"Hosted gateway checkout and verification"},{"name":"Invoices","description":"Domain purchase, renewal and monitoring invoices and receipts"},{"name":"Profile","description":"Registrant contact details"},{"name":"Notifications","description":"Order state notifications"},{"name":"Audit","description":"Tenant audit log"},{"name":"Providers","description":"Registrar provider inventory"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Permanent scoped key created in the dashboard: `Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4`."}},"schemas":{"Error":{"type":"object","required":["success","statusCode","message","error"],"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}},"properties":{"success":{"type":"boolean","example":false},"statusCode":{"type":"integer","description":"Mirrors the HTTP status."},"message":{"type":"string","description":"Human-readable outcome."},"error":{"type":"object","required":["code"],"properties":{"code":{"type":"string","description":"Stable machine-readable error code, e.g. `insufficient_scope`, `quote_expired`, `rate_limited`."}}},"errors":{"type":"object","description":"Present on 422 only: field name to message, for mapping under form inputs.","additionalProperties":{"type":"string"}}},"additionalProperties":false},"Contact":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30,"pattern":"^[+()\\d][+()\\d\\s.\\-]*$"},"street":{"type":"string","minLength":2,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":20},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["name","email","phone","street","city","state","postalCode","countryCode"],"additionalProperties":false,"example":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"}},"RegistrationSupport":{"type":"object","properties":{"organizationName":{"type":"string","minLength":1,"maxLength":200},"registrationNumber":{"type":"string","minLength":1,"maxLength":100},"supportingDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId"],"additionalProperties":false}}},"additionalProperties":false,"example":{"organizationName":"Example Ventures Ltd","registrationNumber":"RC-123456"}},"WhoisEntity":{"type":"object","example":{"roles":["registrant"],"name":"Ada Obi","email":"owner@example.ng","address":"1 Example Road, Lagos, NG","country":"NG"},"properties":{"roles":{"type":"array","items":{"type":"string"}},"handle":{"type":"string"},"name":{"type":"string"},"organization":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"address":{"type":"string"},"country":{"type":"string"}}},"WhoisRecord":{"type":"object","example":{"domain":"example.com","available":false,"registeredAt":"2024-01-01T00:00:00.000Z","expiresAt":"2027-01-01T00:00:00.000Z","changedAt":"2025-06-01T00:00:00.000Z","registrar":"Example Registrar, Inc.","registrarId":"1234","statuses":["client transfer prohibited"],"nameservers":["ns1.example.com","ns2.example.com"],"dnssec":false,"registrant":{"roles":["registrant"],"country":"NG"},"entities":[{"roles":["registrar"],"organization":"Example Registrar, Inc."},{"roles":["abuse"],"email":"abuse@example.com"}],"fetchedAt":"2026-10-08T09:30:00.000Z","cached":false,"redacted":true},"properties":{"domain":{"type":"string"},"available":{"type":"boolean","nullable":true},"registeredAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"},"changedAt":{"type":"string","format":"date-time"},"transferredAt":{"type":"string","format":"date-time"},"registrar":{"type":"string"},"registrarId":{"type":"string"},"statuses":{"type":"array","items":{"type":"string"}},"nameservers":{"type":"array","items":{"type":"string"}},"dnssec":{"type":"boolean"},"registrant":{"$ref":"#/components/schemas/WhoisEntity"},"entities":{"type":"array","items":{"$ref":"#/components/schemas/WhoisEntity"}},"fetchedAt":{"type":"string","format":"date-time"},"cached":{"type":"boolean","enum":[false]},"redacted":{"type":"boolean","description":"Present when the registrar or registry redacts registrant details."}}},"Order":{"type":"object","example":{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"},"properties":{"id":{"type":"string","format":"uuid"},"quoteId":{"type":"string","format":"uuid"},"domain":{"type":"string"},"provider":{"type":"string"},"operation":{"type":"string","enum":["register","renew"]},"state":{"type":"string","enum":["reserved","dispatching","pending","succeeded","failed","uncertain"]},"currency":{"type":"string"},"charged":{"type":"string","description":"Major units"},"chargedMinor":{"type":"string","description":"Minor units as an exact integer string"},"dnsMode":{"type":"string","enum":["platform","external"]},"renewalInvoicesEnabled":{"type":"boolean"},"errorCode":{"type":"string","nullable":true},"errorMessage":{"type":"string","nullable":true,"description":"Human-readable explanation when errorCode is present."},"documentStatus":{"type":"string","nullable":true,"enum":["awaiting_review","submitted","rejected",null]},"documentReview":{"type":"object","nullable":true,"additionalProperties":true},"organizationName":{"type":"string","nullable":true},"registrationNumber":{"type":"string","nullable":true},"supportingDocuments":{"type":"array","nullable":true,"items":{"type":"object","additionalProperties":true}},"details":{"type":"object","additionalProperties":true,"description":"Returned only once the order succeeded. registeredAt and expiresAt are validated registrar dates when available; an absent date is unknown.","properties":{"registeredAt":{"type":"string","format":"date-time"},"expiresAt":{"type":"string","format":"date-time"}}},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}}},"Quote":{"type":"object","example":{"id":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","currency":"NGN","price":"24000.00","priceMinor":"2400000","renewalPrice":"26400.00","renewalMinor":"2640000","termYears":1,"expiresAt":"2026-10-04T12:05:00.000Z","purchasable":true,"sandbox":false},"properties":{"id":{"type":"string","format":"uuid"},"domain":{"type":"string"},"provider":{"type":"string"},"operation":{"type":"string","enum":["register","renew"]},"currency":{"type":"string"},"price":{"type":"string"},"priceMinor":{"type":"string"},"renewalPrice":{"type":"string"},"renewalMinor":{"type":"string"},"termYears":{"type":"integer","enum":[1]},"expiresAt":{"type":"string","format":"date-time"},"purchasable":{"type":"boolean"},"sandbox":{"type":"boolean"}}},"Wallet":{"type":"object","example":{"currency":"NGN","balance":"50000.00","balanceMinor":"5000000"},"properties":{"currency":{"type":"string"},"balance":{"type":"string"},"balanceMinor":{"type":"string"}}},"LedgerEntry":{"type":"object","example":{"id":"6d7e8f9a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","currency":"NGN","amount":"50000.00","amountMinor":"5000000","kind":"topup","reference":"paystack:c4e8a9d2","createdAt":"2026-10-04T12:00:00.000Z"},"properties":{"id":{"type":"string","format":"uuid"},"currency":{"type":"string"},"amount":{"type":"string"},"amountMinor":{"type":"string"},"kind":{"type":"string","enum":["topup","reservation","refund"]},"reference":{"type":"string"},"createdAt":{"type":"string","format":"date-time"}}},"Invoice":{"type":"object","example":{"kind":"renewal","orderId":null,"sourceReference":null,"id":"e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b","domain":"example.ng","provider":"cloudflare","periodEnd":"2027-10-04T00:00:00.000Z","currency":"NGN","amount":"26400.00","amountMinor":"2640000","status":"open","renewalOrderId":null,"createdAt":"2026-10-04T12:00:00.000Z","paidAt":null},"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["registration","renewal","monitoring","monitor_success"]},"orderId":{"type":"string","format":"uuid","nullable":true},"sourceReference":{"type":"string","nullable":true},"domain":{"type":"string"},"provider":{"type":"string"},"periodEnd":{"type":"string","format":"date-time","nullable":true},"currency":{"type":"string"},"amount":{"type":"string"},"amountMinor":{"type":"string"},"status":{"type":"string","enum":["open","paid","cancelled"]},"renewalOrderId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"},"paidAt":{"type":"string","format":"date-time","nullable":true}}},"Payment":{"type":"object","example":{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"},"properties":{"id":{"type":"string","format":"uuid"},"gateway":{"type":"string","enum":["bachs","paystack","opay","paypal","stripe","nowpayments"]},"invoiceId":{"type":"string","format":"uuid","nullable":true},"currency":{"type":"string"},"amount":{"type":"string"},"amountMinor":{"type":"string"},"state":{"type":"string","enum":["pending","paid","uncertain"]},"checkoutUrl":{"type":"string","format":"url","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Document":{"type":"object","example":{"id":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","type":"identity","filename":"bvn-slip.pdf","contentType":"application/pdf","sizeBytes":184320,"state":"uploaded","orderId":null,"createdAt":"2026-10-04T11:40:00.000Z"},"properties":{"id":{"type":"string","format":"uuid"},"type":{"type":"string"},"filename":{"type":"string"},"contentType":{"type":"string","enum":["application/pdf","image/jpeg","image/png"]},"sizeBytes":{"type":"integer"},"state":{"type":"string","enum":["uploading","uploaded"]},"orderId":{"type":"string","format":"uuid","nullable":true},"createdAt":{"type":"string","format":"date-time"}}},"Notification":{"type":"object","description":"A purchase update (`kind: order`) or a monitoring alert (`kind: monitor`).","example":{"id":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","kind":"order","state":"succeeded","readAt":null,"createdAt":"2026-10-04T12:01:00.000Z","orderId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","monitorId":null,"domain":"example.ng","title":null,"message":null,"currency":"NGN","amount":"24000.00"},"properties":{"id":{"type":"string","format":"uuid"},"kind":{"type":"string","enum":["order","monitor"]},"state":{"type":"string","nullable":true,"description":"Order state, or the monitoring alert type for `kind: monitor`."},"readAt":{"type":"string","format":"date-time","nullable":true},"createdAt":{"type":"string","format":"date-time"},"orderId":{"type":"string","format":"uuid","nullable":true},"monitorId":{"type":"string","nullable":true},"domain":{"type":"string"},"title":{"type":"string","nullable":true},"message":{"type":"string","nullable":true},"currency":{"type":"string","nullable":true},"amount":{"type":"string","nullable":true}}},"AuditLog":{"type":"object","example":{"action":"order_reserved","resourceId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","metadata":{"domain":"example.ng","currency":"NGN","amount":"24000.00"},"createdAt":"2026-10-04T12:00:00.000Z"},"properties":{"action":{"type":"string"},"resourceId":{"type":"string","nullable":true},"metadata":{"type":"object","additionalProperties":true},"createdAt":{"type":"string","format":"date-time"}}},"DnsRecord":{"type":"object","example":{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.10","ttl":300,"proxied":true,"priority":null},"properties":{"id":{"type":"string"},"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string"},"content":{"type":"string"},"ttl":{"type":"integer"},"proxied":{"type":"boolean"},"priority":{"type":"integer","nullable":true}}},"Download":{"type":"object","example":{"url":"https://pub-xxx.r2.dev/registration-documents/tenant/doc.pdf?X-Amz-Signature=...","expiresIn":300},"properties":{"url":{"type":"string","format":"url","description":"Presigned private URL, 5 minute lifetime"},"expiresIn":{"type":"integer","enum":[300]}}},"Gateway":{"type":"object","example":{"code":"paystack","currencies":["NGN","USD"],"chargeCurrency":"NGN","enabled":true,"configured":true},"properties":{"code":{"type":"string","enum":["bachs","paystack","opay","paypal","stripe","nowpayments"]},"currencies":{"type":"array","items":{"type":"string"}},"chargeCurrency":{"type":"string","enum":["NGN","USD"],"description":"Currency the gateway actually charges; present on currency-filtered listings and differs when the amount auto-converts."},"enabled":{"type":"boolean"},"configured":{"type":"boolean"}}},"WalletsResponse":{"type":"object","example":{"preferredCurrency":"NGN","country":"NG","wallets":[{"currency":"NGN","balance":"50000.00","balanceMinor":"5000000"},{"currency":"USD","balance":"0.00","balanceMinor":"0"}]},"properties":{"preferredCurrency":{"type":"string","enum":["NGN","USD"],"description":"NGN for a Nigerian registrant or visitor location, otherwise USD."},"country":{"type":"string","nullable":true,"description":"Resolved two-letter ISO country code reflected for this account or visitor."},"wallets":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}}},"OrdersResponse":{"type":"object","example":{"orders":[{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}]},"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}}}},"DocumentsResponse":{"type":"object","example":{"documents":[{"id":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","type":"identity","filename":"bvn-slip.pdf","contentType":"application/pdf","sizeBytes":184320,"state":"uploaded","orderId":null,"createdAt":"2026-10-04T11:40:00.000Z"}]},"properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}}}},"InvoicesResponse":{"type":"object","example":{"invoices":[{"kind":"renewal","orderId":null,"sourceReference":null,"id":"e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b","domain":"example.ng","provider":"cloudflare","periodEnd":"2027-10-04T00:00:00.000Z","currency":"NGN","amount":"26400.00","amountMinor":"2640000","status":"open","renewalOrderId":null,"createdAt":"2026-10-04T12:00:00.000Z","paidAt":null}]},"properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}}}},"PaymentsResponse":{"type":"object","example":{"payments":[{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"}]},"properties":{"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}}}},"GatewaysResponse":{"type":"object","example":{"gateways":[{"code":"paystack","currencies":["NGN","USD"]}]},"properties":{"gateways":{"type":"array","items":{"$ref":"#/components/schemas/Gateway"}}}},"LedgerResponse":{"type":"object","example":{"entries":[{"id":"6d7e8f9a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","currency":"NGN","amount":"50000.00","amountMinor":"5000000","kind":"topup","reference":"paystack:c4e8a9d2","createdAt":"2026-10-04T12:00:00.000Z"}]},"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}}}},"AuditResponse":{"type":"object","example":{"logs":[{"action":"order_reserved","resourceId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","metadata":{"domain":"example.ng"},"createdAt":"2026-10-04T12:00:00.000Z"}]},"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}}}},"NotificationsResponse":{"type":"object","example":{"notifications":[{"id":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","state":"succeeded","readAt":null,"createdAt":"2026-10-04T12:01:00.000Z","orderId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","domain":"example.ng","currency":"NGN","amount":"24000.00"}],"unreadCount":1},"properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"unreadCount":{"type":"integer"}}},"RecordsResponse":{"type":"object","example":{"provider":"hostafrica","mode":"platform","nameservers":["alice.ns.cloudflare.com","bob.ns.cloudflare.com"],"status":"active","records":[{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.10","ttl":300,"proxied":true,"priority":null}]},"properties":{"provider":{"type":"string","enum":["cloudflare","hostafrica"]},"mode":{"type":"string","enum":["platform","external"]},"nameservers":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"records":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}}}},"CountriesResponse":{"type":"object","example":{"countries":[{"id":160,"iso2":"NG","name":"Nigeria"}]},"properties":{"countries":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"iso2":{"type":"string"},"name":{"type":"string"}}}}}},"StatesResponse":{"type":"object","example":{"states":[{"id":30,"name":"Lagos"}]},"properties":{"states":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}},"CitiesResponse":{"type":"object","example":{"cities":[{"id":1058,"name":"Lagos"}]},"properties":{"cities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}}}}}},"ProfileResponse":{"type":"object","nullable":true,"example":{"countryId":160,"stateId":30,"cityId":1058,"registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"}},"properties":{"countryId":{"type":"integer"},"stateId":{"type":"integer"},"cityId":{"type":"integer"},"registrant":{"$ref":"#/components/schemas/Contact"}}},"ProvidersResponse":{"type":"object","example":{"providers":[{"code":"cloudflare","registration":true,"renewal":false,"sandbox":false}]},"properties":{"providers":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"registration":{"type":"boolean"},"renewal":{"type":"boolean"},"sandbox":{"type":"boolean"}}}}}}}},"paths":{"/api/v1/health":{"get":{"summary":"Liveness probe","tags":["Health"],"security":[],"responses":{"200":{"description":"Service is accepting traffic.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"status":{"type":"string","enum":["ok"]}}}}},"example":{"success":true,"message":"Request successful","data":{"status":"ok"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getHealth","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/health'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/health', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/docs":{"get":{"summary":"Scalar API reference (this page)","tags":["Documentation"],"security":[],"responses":{"200":{"description":"HTML document.","content":{"text/html":{"schema":{"type":"string"},"example":"<!doctype html>\n<html lang=\"en\">\n  <head><title>Zonic247 API</title></head>\n  <body id=\"app\"></body>\n</html>"}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getDocs","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/docs'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/docs', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/docs/openapi.json":{"get":{"summary":"OpenAPI document for this deployment","tags":["Documentation"],"security":[],"responses":{"200":{"description":"The OpenAPI 3.0 document rendered above.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"openapi":"3.0.3","info":{"title":"Zonic247 API","version":"1.0.0"}}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getDocsOpenapiJson","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/docs/openapi.json'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/docs/openapi.json', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/swagger":{"get":{"summary":"Swagger UI API reference","tags":["Documentation"],"security":[],"description":"Interactive Swagger UI documentation backed by `/api/v1/docs/openapi.json` with Bearer API key authentication support.","responses":{"200":{"description":"Swagger UI HTML document.","content":{"text/html":{"schema":{"type":"string"},"example":"<!doctype html>\n<html lang=\"en\">\n  <head><title>Zonic247 Swagger UI</title></head>\n  <body><div id=\"swagger-ui\"></div></body>\n</html>"}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getSwagger","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/swagger'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/swagger', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/locations/countries":{"get":{"summary":"All countries","tags":["Locations"],"security":[],"responses":{"200":{"description":"Country catalog.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["countries","meta"],"properties":{"countries":{"type":"array","items":{"type":"object","required":["id","iso2","name"],"properties":{"id":{"type":"integer","example":160},"iso2":{"type":"string","example":"NG"},"name":{"type":"string","example":"Nigeria"}}}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"countries":[{"id":160,"iso2":"NG","name":"Nigeria"},{"id":27,"iso2":"ZA","name":"South Africa"}],"meta":{"total":2,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated all countries response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","id"],"example":"name"},"example":"name","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `countries` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getLocationsCountries","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/locations/countries?page=1&limit=25&q=example&sort=name&order=desc'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/locations/countries?page=1&limit=25&q=example&sort=name&order=desc', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/locations/states":{"get":{"summary":"States in a country","tags":["Locations"],"security":[],"parameters":[{"name":"countryId","in":"query","required":true,"schema":{"type":"integer","example":160},"example":160,"description":"Numeric country id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","id"],"example":"name"},"example":"name","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"responses":{"200":{"description":"State catalog.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["states","meta"],"properties":{"states":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","example":30},"name":{"type":"string","example":"Lagos"}}}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"states":[{"id":30,"name":"Lagos"},{"id":26,"name":"Kano"}],"meta":{"total":2,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated states in a country response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"description":"Returns a paginated `states` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getLocationsStates","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/locations/states?countryId=160&page=1&limit=25&q=example&sort=name&order=desc'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/locations/states?countryId=160&page=1&limit=25&q=example&sort=name&order=desc', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/locations/cities":{"get":{"summary":"Cities in a state","tags":["Locations"],"security":[],"parameters":[{"name":"countryId","in":"query","required":true,"schema":{"type":"integer","example":160},"example":160,"description":"Numeric country id"},{"name":"stateId","in":"query","required":true,"schema":{"type":"integer","example":30},"example":30,"description":"Numeric state id"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["name","id"],"example":"name"},"example":"name","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"responses":{"200":{"description":"Up to 1000 cities.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["cities","meta"],"properties":{"cities":{"type":"array","items":{"type":"object","required":["id","name"],"properties":{"id":{"type":"integer","example":1058},"name":{"type":"string","example":"Lagos"}}}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"cities":[{"id":1058,"name":"Lagos"},{"id":1060,"name":"Lekki"}],"meta":{"total":2,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated cities in a state response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"description":"Returns a paginated `cities` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getLocationsCities","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/locations/cities?countryId=160&stateId=30&page=1&limit=25&q=example&sort=name&order=desc'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/locations/cities?countryId=160&stateId=30&page=1&limit=25&q=example&sort=name&order=desc', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/search":{"post":{"summary":"Search that persists purchasable quotes","tags":["Search"],"description":"Works with or without authentication. When `operation=register` (the default), callers may pass either full domains (`example.ng`) or bare names without an extension (`example` — automatically checked across `.com` and `.ng` for Nigeria, plus suggestions). Authenticated searches persist each quote and return a purchasable `id` for `POST /api/v1/orders`; anonymous requests return `purchasable:false` with nothing persisted. Pricing and currency follow the caller's resolved country (`NG` -> `NGN`, otherwise `USD`). When multiple registrars are enabled and the client is in Nigeria (`NGN`), prices are converted to Naira first and only the single cheapest quote per domain is emitted. `suggestions:true` adds alternate-ending `quote`/`unavailable` events flagged `suggestion:true`; taken names carry RDAP `registeredAt`/`expiresAt` when published.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domains":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":253}},"operation":{"type":"string","enum":["register","renew"]}},"required":["domains"],"additionalProperties":false},"example":{"domains":["example.ng","example.com"],"operation":"register","suggestions":true}}}},"responses":{"200":{"description":"Events: `quote` (with an `id` when authenticated, `country`, plus `suggestion:true` for alternate endings), `unavailable` (`provider`, `domain`, `reason`, plus RDAP `registeredAt`/`expiresAt` when known), `provider_error` (`provider`, `domain`, `code`, `message`), `complete` (`quotes`, `providers`).","content":{"text/event-stream":{"schema":{"type":"string"},"example":"event: quote\ndata: {\"id\":\"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\"purchasable\":true,\"domain\":\"example.ng\",\"provider\":\"cloudflare\",\"operation\":\"register\",\"currency\":\"NGN\",\"country\":\"NG\",\"priceMinor\":\"2400000\",\"price\":\"24000.00\",\"renewalMinor\":\"2640000\",\"renewalPrice\":\"26400.00\",\"termYears\":1,\"expiresAt\":\"2026-10-04T12:05:00.000Z\",\"sandbox\":false}\n\nevent: complete\ndata: {\"quotes\":1,\"providers\":2}\n\n"}}},"403":{"description":"domain_not_owned when operation=renew","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"security":[{},{"apiKey":[]}],"operationId":"postSearch","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/search' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -H 'Accept: text/event-stream' \\\n  -d '{\n  \"domains\": [\n    \"example.ng\",\n    \"example.com\"\n  ],\n  \"operation\": \"register\",\n  \"suggestions\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/search', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json',\n    'Accept': 'text/event-stream'\n  },\n  body: JSON.stringify({\n    \"domains\": [\n      \"example.ng\",\n      \"example.com\"\n    ],\n    \"operation\": \"register\",\n    \"suggestions\": true\n  })\n})\nconst stream = response.body.getReader(); // Server-Sent Events"}]}},"/api/v1/quotes/{id}/nameservers":{"post":{"summary":"Prepare assigned checkout nameservers","tags":["DNS"],"description":"Requires a live tenant-owned registration quote and domains:buy. Prepares or revalidates a full Cloudflare zone and returns its assigned nameservers. This does not buy a domain, debit a wallet, or grant DNS ownership. HostAfrica uses Cloudflare platform DNS by default and also permits custom nameservers. Cloudflare Registrar requires Cloudflare DNS. Untracked existing zones are never adopted from a quote.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45"},"example":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","description":"Quote id"}],"responses":{"200":{"description":"Assigned nameservers for checkout.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"domain":"example.ng","registrar":"cloudflare","dnsProvider":"cloudflare","nameservers":["alice.ns.cloudflare.com","bob.ns.cloudflare.com"],"canUseExternal":false}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain quote was not found. Search for the domain again to generate a fresh quote.","error":{"code":"quote_not_found"}}}}},"409":{"description":"quote_expired","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This domain quote has expired. Search for the domain again to get a live quote before buying.","error":{"code":"quote_expired"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"502":{"description":"zone_identity_mismatch","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":502,"message":"Managed DNS zone verification failed for this domain. Please contact support.","error":{"code":"zone_identity_mismatch"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postQuotesByIdNameservers","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/quotes/3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45/nameservers' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/quotes/3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45/nameservers', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/quotes/{id}":{"get":{"summary":"Fetch a stored quote","tags":["Search"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45"},"example":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","description":"Quote id"}],"responses":{"200":{"description":"Quote detail.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Quote"}}},"example":{"success":true,"message":"Request successful","data":{"id":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","currency":"NGN","price":"24000.00","priceMinor":"2400000","renewalPrice":"26400.00","renewalMinor":"2640000","termYears":1,"expiresAt":"2026-10-04T12:05:00.000Z","purchasable":true,"sandbox":false}}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain quote was not found. Search for the domain again to generate a fresh quote.","error":{"code":"quote_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getQuotesById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/quotes/3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/quotes/3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/documents":{"post":{"summary":"Upload a registration document","tags":["Documents"],"description":"Requires `domains:buy`. `multipart/form-data` with `file` (PDF/JPEG/PNG, max 5 MB) and `type`. Stored in a private R2 bucket; never served publicly.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file","type"],"properties":{"file":{"type":"string","format":"binary"},"type":{"type":"string","maxLength":100}}},"example":{"file":"@bvn-slip.pdf","type":"identity"}}}},"responses":{"201":{"description":"Uploaded.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"document":{"$ref":"#/components/schemas/Document"}}}}},"example":{"success":true,"message":"Request successful","data":{"document":{"id":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","type":"identity","filename":"bvn-slip.pdf","contentType":"application/pdf","sizeBytes":184320,"state":"uploaded","orderId":null,"createdAt":"2026-10-04T11:40:00.000Z"}}}}}},"409":{"description":"document_limit_reached","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"You have reached the maximum number of unattached documents. Remove unused uploads or attach them to an order first.","error":{"code":"document_limit_reached"}}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":413,"message":"The request body exceeds the maximum allowed size.","error":{"code":"body_too_large"}}}}},"422":{"description":"document_type_not_supported","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Unsupported file format or size. Upload a PDF, JPEG, or PNG file up to 5 MB.","error":{"code":"document_type_not_supported"},"errors":{"request":"Unsupported file format or size. Upload a PDF, JPEG, or PNG file up to 5 MB."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"502":{"description":"document_upload_failed","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":502,"message":"Document upload failed in storage. Please try uploading again.","error":{"code":"document_upload_failed"}}}}},"503":{"description":"r2_configuration_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Document storage is not configured on this deployment.","error":{"code":"r2_configuration_required"}}}}}},"operationId":"postDocuments","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/documents' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -F 'file=@bvn-slip.pdf' \\\n  -F 'type=identity'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/documents', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n  body: multipartForm, // new FormData() carrying file, type\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"get":{"summary":"List uploaded documents","tags":["Documents"],"responses":{"200":{"description":"Most recent 100 documents.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["documents","meta"],"properties":{"documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"documents":[{"id":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","type":"identity","filename":"bvn-slip.pdf","contentType":"application/pdf","sizeBytes":184320,"state":"uploaded","orderId":null,"createdAt":"2026-10-04T11:40:00.000Z"}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated list uploaded documents response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `documents` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getDocuments","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/documents?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/documents?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/documents/{id}":{"delete":{"summary":"Delete an unattached document","tags":["Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a"},"example":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","description":"Document id"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}},"example":{"success":true,"message":"Request successful","data":{"deleted":true}}}}},"404":{"description":"document_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"One or more supporting documents could not be found or have not finished uploading.","error":{"code":"document_not_found"}}}}},"409":{"description":"document_attached_to_order","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This document is already attached to an order and cannot be deleted.","error":{"code":"document_attached_to_order"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"502":{"description":"document_delete_failed","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":502,"message":"Could not delete the document from storage. Please try again.","error":{"code":"document_delete_failed"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"deleteDocumentsById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X DELETE 'https://your-domain.example/api/v1/documents/2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/documents/2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a', {\n  method: 'DELETE',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/documents/{id}/download":{"get":{"summary":"Presigned download URL","tags":["Documents"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a"},"example":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","description":"Document id"}],"responses":{"200":{"description":"Short-lived private URL.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Download"}}},"example":{"success":true,"message":"Request successful","data":{"url":"https://pub-xxx.r2.dev/registration-documents/tenant/doc.pdf?X-Amz-Signature=...","expiresIn":300}}}}},"404":{"description":"document_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"One or more supporting documents could not be found or have not finished uploading.","error":{"code":"document_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getDocumentsByIdDownload","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/documents/2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a/download' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/documents/2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a/download', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/orders":{"get":{"summary":"List orders","tags":["Orders"],"responses":{"200":{"description":"Most recent 200 orders.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["orders","meta"],"properties":{"orders":{"type":"array","items":{"$ref":"#/components/schemas/Order"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"orders":[{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated list orders response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `orders` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getOrders","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/orders?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/orders?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"post":{"summary":"Reserve a quote and open an order","tags":["Orders"],"description":"Requires `domains:buy`. Debits the wallet immediately and hands the order to the durable worker. Fails on an expired quote.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","example":"order-2026-10-04-0001"},"example":"order-2026-10-04-0001","description":"Unique 8-128 character key. Replaying the same key with the same body returns the original result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationName":{"type":"string","minLength":1,"maxLength":200},"registrationNumber":{"type":"string","minLength":1,"maxLength":100},"supportingDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId"],"additionalProperties":false}},"quoteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"registrant":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30,"pattern":"^[+()\\d][+()\\d\\s.\\-]*$"},"street":{"type":"string","minLength":2,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":20},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["name","email","phone","street","city","state","postalCode","countryCode"],"additionalProperties":false},"dnsMode":{"default":"platform","type":"string","enum":["platform","external"]},"nameservers":{"maxItems":5,"type":"array","items":{"type":"string"}}},"required":["quoteId","registrant"],"additionalProperties":false},"example":{"quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"},"dnsMode":"platform","organizationName":"Example Ventures Ltd","registrationNumber":"RC-123456","supportingDocuments":[{"documentId":"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a"}]}}}},"responses":{"202":{"description":"Order accepted for processing.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Order"}}},"example":{"success":true,"message":"Request successful","data":{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}}}}},"400":{"description":"idempotency_key_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":400,"message":"Include an Idempotency-Key header (8 to 128 characters: letters, numbers, :, _, or -) so retries never double-charge your wallet.","error":{"code":"idempotency_key_required"}}}}},"402":{"description":"insufficient_balance","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":402,"message":"Your wallet balance is not enough to complete this purchase. Please fund your wallet in the required currency and try again.","error":{"code":"insufficient_balance"}}}}},"403":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain quote was not found. Search for the domain again to generate a fresh quote.","error":{"code":"quote_not_found"}}}}},"409":{"description":"quote_expired / idempotency_conflict / renewal_already_pending","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This domain quote has expired. Search for the domain again to get a live quote before buying.","error":{"code":"quote_expired"}}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":413,"message":"The request body exceeds the maximum allowed size.","error":{"code":"body_too_large"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postOrders","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/orders' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Idempotency-Key: order-2026-10-04-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n  \"registrant\": {\n    \"name\": \"Ada Obi\",\n    \"email\": \"owner@example.ng\",\n    \"phone\": \"+234.8123456789\",\n    \"street\": \"1 Example Road\",\n    \"city\": \"Lagos\",\n    \"state\": \"Lagos\",\n    \"postalCode\": \"100001\",\n    \"countryCode\": \"NG\"\n  },\n  \"dnsMode\": \"platform\",\n  \"organizationName\": \"Example Ventures Ltd\",\n  \"registrationNumber\": \"RC-123456\",\n  \"supportingDocuments\": [\n    {\n      \"documentId\": \"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a\"\n    }\n  ]\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/orders', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Idempotency-Key': 'order-2026-10-04-0001',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n    \"registrant\": {\n      \"name\": \"Ada Obi\",\n      \"email\": \"owner@example.ng\",\n      \"phone\": \"+234.8123456789\",\n      \"street\": \"1 Example Road\",\n      \"city\": \"Lagos\",\n      \"state\": \"Lagos\",\n      \"postalCode\": \"100001\",\n      \"countryCode\": \"NG\"\n    },\n    \"dnsMode\": \"platform\",\n    \"organizationName\": \"Example Ventures Ltd\",\n    \"registrationNumber\": \"RC-123456\",\n    \"supportingDocuments\": [\n      {\n        \"documentId\": \"2d4e6f8a-b0c1-4d3e-9f5a-7b8c9d0e1f2a\"\n      }\n    ]\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/orders/bulk":{"post":{"summary":"Reserve several quotes and open one order each","tags":["Orders"],"description":"Requires `domains:buy`. One Idempotency-Key reserves up to 20 quotes atomically: every wallet is debited and every order opens, or nothing is. Registrant, DNS choice and supporting information apply to all orders; attached documents wait for review on the first order while the rest proceed. Replaying the same key with the same body returns the original orders.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","example":"order-2026-10-04-0001"},"example":"order-2026-10-04-0001","description":"Unique 8-128 character key. Replaying the same key with the same body returns the original result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"organizationName":{"type":"string","minLength":1,"maxLength":200},"registrationNumber":{"type":"string","minLength":1,"maxLength":100},"supportingDocuments":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"documentId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["documentId"],"additionalProperties":false}},"quoteIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"registrant":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30,"pattern":"^[+()\\d][+()\\d\\s.\\-]*$"},"street":{"type":"string","minLength":2,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":20},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["name","email","phone","street","city","state","postalCode","countryCode"],"additionalProperties":false},"dnsMode":{"default":"platform","type":"string","enum":["platform","external"]},"nameservers":{"maxItems":5,"type":"array","items":{"type":"string"}}},"required":["quoteIds","registrant"],"additionalProperties":false},"example":{"quoteIds":["3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"],"registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"},"dnsMode":"platform"}}}},"responses":{"202":{"description":"Orders accepted for processing, in request order.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/OrdersResponse"}}},"example":{"success":true,"message":"Request successful","data":{"orders":[{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}]}}}}},"400":{"description":"idempotency_key_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":400,"message":"Include an Idempotency-Key header (8 to 128 characters: letters, numbers, :, _, or -) so retries never double-charge your wallet.","error":{"code":"idempotency_key_required"}}}}},"402":{"description":"insufficient_balance","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":402,"message":"Your wallet balance is not enough to complete this purchase. Please fund your wallet in the required currency and try again.","error":{"code":"insufficient_balance"}}}}},"403":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"404":{"description":"quote_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain quote was not found. Search for the domain again to generate a fresh quote.","error":{"code":"quote_not_found"}}}}},"409":{"description":"quote_expired / idempotency_conflict / renewal_already_pending","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This domain quote has expired. Search for the domain again to get a live quote before buying.","error":{"code":"quote_expired"}}}}},"413":{"description":"body_too_large","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":413,"message":"The request body exceeds the maximum allowed size.","error":{"code":"body_too_large"}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postOrdersBulk","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/orders/bulk' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Idempotency-Key: order-2026-10-04-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"quoteIds\": [\n    \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n    \"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90\"\n  ],\n  \"registrant\": {\n    \"name\": \"Ada Obi\",\n    \"email\": \"owner@example.ng\",\n    \"phone\": \"+234.8123456789\",\n    \"street\": \"1 Example Road\",\n    \"city\": \"Lagos\",\n    \"state\": \"Lagos\",\n    \"postalCode\": \"100001\",\n    \"countryCode\": \"NG\"\n  },\n  \"dnsMode\": \"platform\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/orders/bulk', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Idempotency-Key': 'order-2026-10-04-0001',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"quoteIds\": [\n      \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n      \"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90\"\n    ],\n    \"registrant\": {\n      \"name\": \"Ada Obi\",\n      \"email\": \"owner@example.ng\",\n      \"phone\": \"+234.8123456789\",\n      \"street\": \"1 Example Road\",\n      \"city\": \"Lagos\",\n      \"state\": \"Lagos\",\n      \"postalCode\": \"100001\",\n      \"countryCode\": \"NG\"\n    },\n    \"dnsMode\": \"platform\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/orders/{id}/reconcile":{"post":{"summary":"Check the registrar outcome for an uncertain order","tags":["Orders"],"description":"Requires domains:buy. Requests a status read for an uncertain order with an unresolved provider error, using its durable worker lease. Attempts the read immediately and returns the current order; a competing worker may still be checking it. Active, already scheduled and terminal orders cannot be rescheduled. Never repeats the purchase or wallet debit. Resolve any required account action before checking again.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Order id"}],"responses":{"202":{"description":"Status check scheduled.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Order"}}},"example":{"success":true,"message":"Request successful","data":{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"No matching domain order was found on your account.","error":{"code":"order_not_found"}}}}},"409":{"description":"order_status_check_unavailable","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This order cannot be manually checked right now because it is either still processing or already completed.","error":{"code":"order_status_check_unavailable"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postOrdersByIdReconcile","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/orders/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90/reconcile' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/orders/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90/reconcile', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/orders/{id}":{"get":{"summary":"Fetch one order","tags":["Orders"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Order id"}],"responses":{"200":{"description":"Order detail.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Order"}}},"example":{"success":true,"message":"Request successful","data":{"id":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","domain":"example.ng","provider":"cloudflare","operation":"register","state":"reserved","currency":"NGN","charged":"24000.00","chargedMinor":"2400000","dnsMode":"platform","renewalInvoicesEnabled":true,"errorCode":null,"errorMessage":null,"documentStatus":null,"documentReview":null,"organizationName":null,"registrationNumber":null,"supportingDocuments":null,"createdAt":"2026-10-04T12:00:00.000Z","updatedAt":"2026-10-04T12:00:00.000Z"}}}}},"404":{"description":"order_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"No matching domain order was found on your account.","error":{"code":"order_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getOrdersById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/orders/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/orders/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/renewal":{"put":{"summary":"Enable or disable renewal invoices for a domain","tags":["Orders"],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},"example":{"enabled":true}}}},"responses":{"200":{"description":"New preference.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"enabled":{"type":"boolean"}}}}},"example":{"success":true,"message":"Request successful","data":{"enabled":true}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"putDomainsByDomainRenewal","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PUT 'https://your-domain.example/api/v1/domains/example.ng/renewal' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"enabled\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/renewal', {\n  method: 'PUT',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"enabled\": true\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/invoices":{"get":{"summary":"List purchase, renewal and monitoring invoices","tags":["Invoices"],"responses":{"200":{"description":"Paginated domain registration, renewal and monitoring invoices, including paid receipts.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["invoices","meta"],"properties":{"invoices":{"type":"array","items":{"$ref":"#/components/schemas/Invoice"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"invoices":[{"kind":"renewal","orderId":null,"sourceReference":null,"id":"e5f6a7b8-c9d0-4e1f-8a2b-3c4d5e6f7a8b","domain":"example.ng","provider":"cloudflare","periodEnd":"2027-10-04T00:00:00.000Z","currency":"NGN","amount":"26400.00","amountMinor":"2640000","status":"open","renewalOrderId":null,"createdAt":"2026-10-04T12:00:00.000Z","paidAt":null}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated list purchase, renewal and monitoring invoices response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `invoices` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getInvoices","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/invoices?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/invoices?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/invoices/{id}/receipt":{"get":{"summary":"Download the invoice or paid receipt PDF","tags":["Invoices"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Invoice identifier"}],"responses":{"200":{"description":"Zonic247 invoice PDF, or the paid receipt once settled.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"},"example":"Zonic247 invoice PDF bytes"}}},"404":{"description":"invoice_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That invoice could not be found on your account.","error":{"code":"invoice_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getInvoicesByIdReceipt","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/invoices/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90/receipt' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/invoices/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90/receipt', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/wallets":{"get":{"summary":"Balances by currency","tags":["Wallets"],"responses":{"200":{"description":"NGN and USD are always present; preferredCurrency follows saved country, then trusted location. Other currencies appear once used.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/WalletsResponse"}}},"example":{"success":true,"message":"Request successful","data":{"preferredCurrency":"NGN","country":"NG","wallets":[{"currency":"NGN","balance":"50000.00","balanceMinor":"5000000"},{"currency":"USD","balance":"120.50","balanceMinor":"12050"}]}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getWallets","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/wallets' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/wallets', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/ledger":{"get":{"summary":"Wallet movement history","tags":["Wallets"],"responses":{"200":{"description":"Most recent 200 entries.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["entries","meta"],"properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/LedgerEntry"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"entries":[{"id":"6d7e8f9a-b0c1-4d3e-9f5a-7b8c9d0e1f2a","currency":"NGN","amount":"50000.00","amountMinor":"5000000","kind":"topup","reference":"paystack:c4e8a9d2","createdAt":"2026-10-04T12:00:00.000Z"}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated wallet movement history response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `entries` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getLedger","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/ledger?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/ledger?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/monitors":{"get":{"summary":"List your domain monitors","tags":["Monitors"],"description":"Only monitors created by your account are returned.","responses":{"200":{"description":"Your monitors, newest first.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"monitors":[{"id":"c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50","domain":"example.ng","kind":"watch","provider":null,"orderId":null,"currency":"NGN","autoBuy":true,"autoRenew":true,"maxPriceMinor":"4000000","maxPrice":"40000.00","priorityBidMinor":"500000","priorityBid":"5000.00","status":"active","notifyEmail":true,"notifyWhatsapp":true,"notes":null,"lastCheckedAt":"2026-10-06T09:00:00.000Z","nextCheckAt":"2026-10-06T15:00:00.000Z","lastStatus":"clientTransferProhibited","seenExpiresAt":"2027-05-02T00:00:00.000Z","resultOrderId":null,"createdAt":"2026-10-06T08:00:00.000Z","updatedAt":"2026-10-06T09:00:00.000Z"}]}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getMonitors","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/monitors' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/monitors', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"post":{"summary":"Create a domain monitor","tags":["Monitors"],"description":"`watch` waits for an external domain to become available and, when `autoBuy` is set, registers it under a required price cap. `renew` tracks a domain you already own (free; it enables wallet-funded auto-renew). Watching is billed yearly: $5 for your first domain and $3 for each additional domain. A watch on an already-watched domain must outbid the current holder; the bid is held in your wallet and applied to the 10% success fee (min $2, max $25) only on a successful catch. Currency defaults to your country (NGN for Nigeria, otherwise USD).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","minLength":1,"maxLength":253},"kind":{"default":"watch","type":"string","enum":["watch","renew"]},"currency":{"type":"string","enum":["NGN","USD","TEST_USD"]},"autoBuy":{"type":"boolean"},"autoRenew":{"type":"boolean"},"maxPrice":{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,2})?$"},"priorityBid":{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,2})?$"},"notifyEmail":{"type":"boolean"},"notifyWhatsapp":{"type":"boolean"},"notes":{"type":"string","maxLength":500}},"required":["domain"],"additionalProperties":false},"example":{"domain":"example.ng","kind":"watch","currency":"NGN","autoBuy":true,"maxPrice":"40000.00","priorityBid":"5000.00","notifyEmail":true}}}},"responses":{"201":{"description":"The created monitor.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"monitor":{"id":"c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50","domain":"example.ng","kind":"watch","currency":"NGN","autoBuy":true,"maxPrice":"40000.00","priorityBid":"5000.00","status":"active","nextCheckAt":"2026-10-06T09:00:00.000Z","createdAt":"2026-10-06T08:00:00.000Z"}}}}}},"402":{"description":"insufficient_balance","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":402,"message":"Your wallet balance is not enough to complete this purchase. Please fund your wallet in the required currency and try again.","error":{"code":"insufficient_balance"}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"409":{"description":"bid_too_low","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Your priority bid must exceed the current highest bid on this domain by at least 10%.","error":{"code":"bid_too_low"}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postMonitors","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/monitors' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"domain\": \"example.ng\",\n  \"kind\": \"watch\",\n  \"currency\": \"NGN\",\n  \"autoBuy\": true,\n  \"maxPrice\": \"40000.00\",\n  \"priorityBid\": \"5000.00\",\n  \"notifyEmail\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/monitors', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"domain\": \"example.ng\",\n    \"kind\": \"watch\",\n    \"currency\": \"NGN\",\n    \"autoBuy\": true,\n    \"maxPrice\": \"40000.00\",\n    \"priorityBid\": \"5000.00\",\n    \"notifyEmail\": true\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/monitors/{id}":{"get":{"summary":"Read a monitor and its event history","tags":["Monitors"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Monitor id"}],"responses":{"200":{"description":"The monitor plus recent events.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"monitor":{"id":"c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50","domain":"example.ng","kind":"watch","status":"active"},"events":[{"id":"events-1","type":"created","message":"Monitoring example.ng","metadata":{"kind":"watch","currency":"NGN"},"createdAt":"2026-10-06T08:00:00.000Z"}]}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"monitor_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain monitor was not found on your account.","error":{"code":"monitor_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getMonitorsById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"patch":{"summary":"Update a monitor","tags":["Monitors"],"description":"Change the price cap, auto-buy / auto-renew, notification channels, notes, or bid. Setting `status` to `cancelled` releases any held bid.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Monitor id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["active","paused","cancelled"]},"autoBuy":{"type":"boolean"},"autoRenew":{"type":"boolean"},"maxPrice":{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,2})?$"},"priorityBid":{"type":"string","pattern":"^\\d{1,12}(?:\\.\\d{1,2})?$"},"notifyEmail":{"type":"boolean"},"notifyWhatsapp":{"type":"boolean"},"notes":{"type":"string","maxLength":500}},"additionalProperties":false},"example":{"maxPrice":"45000.00","autoBuy":true}}}},"responses":{"200":{"description":"The updated monitor.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"monitor":{"id":"c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50","domain":"example.ng","kind":"watch","maxPrice":"45000.00","status":"active"}}}}}},"402":{"description":"insufficient_balance","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":402,"message":"Your wallet balance is not enough to complete this purchase. Please fund your wallet in the required currency and try again.","error":{"code":"insufficient_balance"}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"monitor_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain monitor was not found on your account.","error":{"code":"monitor_not_found"}}}}},"409":{"description":"bid_too_low","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Your priority bid must exceed the current highest bid on this domain by at least 10%.","error":{"code":"bid_too_low"}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"patchMonitorsById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PATCH 'https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"maxPrice\": \"45000.00\",\n  \"autoBuy\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90', {\n  method: 'PATCH',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"maxPrice\": \"45000.00\",\n    \"autoBuy\": true\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"delete":{"summary":"Cancel a monitor","tags":["Monitors"],"description":"Stops the monitor and releases any wallet held for its priority bid.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90"},"example":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","description":"Monitor id"}],"responses":{"200":{"description":"The cancelled monitor.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"monitor":{"id":"c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50","domain":"example.ng","status":"cancelled"}}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"monitor_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That domain monitor was not found on your account.","error":{"code":"monitor_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"deleteMonitorsById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X DELETE 'https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/monitors/8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90', {\n  method: 'DELETE',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/whois/{domain}":{"get":{"summary":"Look up WHOIS for any domain","tags":["Domains"],"security":[],"description":"Fetches the live public RDAP record for any valid domain and supplements it with best-effort registrar WHOIS contact data. This endpoint does not check Zonic247 ownership and does not read or persist lookup results in the application database. Contact data is included only when the registry or registrar publishes it; personal details may be redacted.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253,"example":"example.com"},"example":"example.com","description":"Domain name"}],"responses":{"200":{"description":"Live public domain registration details.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/WhoisRecord"}}},"example":{"success":true,"message":"Request successful","data":{"domain":"example.com","available":false,"registeredAt":"2024-01-01T00:00:00.000Z","expiresAt":"2027-01-01T00:00:00.000Z","changedAt":"2025-06-01T00:00:00.000Z","registrar":"Example Registrar, Inc.","registrarId":"1234","statuses":["client transfer prohibited"],"nameservers":["ns1.example.com","ns2.example.com"],"dnssec":false,"registrant":{"roles":["registrant"],"country":"NG"},"entities":[{"roles":["registrar"],"organization":"Example Registrar, Inc."},{"roles":["abuse"],"email":"abuse@example.com"}],"fetchedAt":"2026-10-08T09:30:00.000Z","cached":false,"redacted":true}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getWhoisByDomain","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/whois/example.com'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/whois/example.com', {\n  method: 'GET',\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains":{"get":{"summary":"List all registered domains owned by this tenant","tags":["Domains"],"responses":{"200":{"description":"Complete registered domain selector inventory.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"domains":[{"domain":"example.ng"}]}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getDomains","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/domains' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/checkout/preview":{"post":{"summary":"Preview the wallet and gateway split for a purchase","tags":["Payments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["order","bulk","monitor"]},"input":{},"gateway":{"type":"string","enum":["bachs","paystack","opay","paypal","stripe","nowpayments"]},"useWallet":{"type":"boolean"}},"required":["kind","input"],"additionalProperties":false},"example":{"kind":"order","useWallet":true,"input":{"quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"},"dnsMode":"platform","nameservers":[]}}}}},"responses":{"200":{"description":"Authoritative price, available balance and remaining gateway amount.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"currency":"USD","amountMinor":"1200","walletBalanceMinor":"450","walletMinor":"450","gatewayMinor":"750"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postCheckoutPreview","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/checkout/preview' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"kind\": \"order\",\n  \"useWallet\": true,\n  \"input\": {\n    \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n    \"registrant\": {\n      \"name\": \"Ada Obi\",\n      \"email\": \"owner@example.ng\",\n      \"phone\": \"+234.8123456789\",\n      \"street\": \"1 Example Road\",\n      \"city\": \"Lagos\",\n      \"state\": \"Lagos\",\n      \"postalCode\": \"100001\",\n      \"countryCode\": \"NG\"\n    },\n    \"dnsMode\": \"platform\",\n    \"nameservers\": []\n  }\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/checkout/preview', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"kind\": \"order\",\n    \"useWallet\": true,\n    \"input\": {\n      \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n      \"registrant\": {\n        \"name\": \"Ada Obi\",\n        \"email\": \"owner@example.ng\",\n        \"phone\": \"+234.8123456789\",\n        \"street\": \"1 Example Road\",\n        \"city\": \"Lagos\",\n        \"state\": \"Lagos\",\n        \"postalCode\": \"100001\",\n        \"countryCode\": \"NG\"\n      },\n      \"dnsMode\": \"platform\",\n      \"nameservers\": []\n    }\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/checkout":{"post":{"summary":"Buy a domain or subscribe using wallet balance and a gateway","tags":["Payments"],"description":"Requires domains:buy and wallet:read. Server derives the total from owned quotes or monitoring settings. Set `useWallet` (default true) to spend the available balance first; set it false to charge the whole amount to the gateway. A funded wallet completes immediately; otherwise open payment.checkoutUrl to pay the shortfall (defaults to Bachs when `gateway` is omitted). API clients can present that checkoutUrl to their own user, or poll the payment until it is paid; verified settlement fulfills the saved request once, including after a browser closes. NGN shortfalls can be charged in USD and are credited in the original currency.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","example":"order-2026-10-04-0001"},"example":"order-2026-10-04-0001","description":"Reuse the same key and body when retrying checkout"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["order","bulk","monitor"]},"input":{},"gateway":{"type":"string","enum":["bachs","paystack","opay","paypal","stripe","nowpayments"]},"useWallet":{"type":"boolean"}},"required":["kind","input"],"additionalProperties":false},"example":{"kind":"order","gateway":"bachs","useWallet":true,"input":{"quoteId":"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45","registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"},"dnsMode":"platform","nameservers":[]}}}}},"responses":{"200":{"description":"Completed purchase or gateway payment to open.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"checkoutId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","payment":{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"750","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"}}}}}},"409":{"description":"quote_expired / idempotency_conflict","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This domain quote has expired. Search for the domain again to get a live quote before buying.","error":{"code":"quote_expired"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postCheckout","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/checkout' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Idempotency-Key: order-2026-10-04-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"kind\": \"order\",\n  \"gateway\": \"bachs\",\n  \"useWallet\": true,\n  \"input\": {\n    \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n    \"registrant\": {\n      \"name\": \"Ada Obi\",\n      \"email\": \"owner@example.ng\",\n      \"phone\": \"+234.8123456789\",\n      \"street\": \"1 Example Road\",\n      \"city\": \"Lagos\",\n      \"state\": \"Lagos\",\n      \"postalCode\": \"100001\",\n      \"countryCode\": \"NG\"\n    },\n    \"dnsMode\": \"platform\",\n    \"nameservers\": []\n  }\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/checkout', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Idempotency-Key': 'order-2026-10-04-0001',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"kind\": \"order\",\n    \"gateway\": \"bachs\",\n    \"useWallet\": true,\n    \"input\": {\n      \"quoteId\": \"3b7a9c1e-5d2f-4e8a-b6c4-0f9e1d2a3b45\",\n      \"registrant\": {\n        \"name\": \"Ada Obi\",\n        \"email\": \"owner@example.ng\",\n        \"phone\": \"+234.8123456789\",\n        \"street\": \"1 Example Road\",\n        \"city\": \"Lagos\",\n        \"state\": \"Lagos\",\n        \"postalCode\": \"100001\",\n        \"countryCode\": \"NG\"\n      },\n      \"dnsMode\": \"platform\",\n      \"nameservers\": []\n    }\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/gateways":{"get":{"summary":"Gateways available to this tenant","tags":["Payments"],"description":"Pass `currency` for the checkout rotation: at most three gateways, Bachs first when enabled, then Paystack for NGN (OPay only when Paystack is missing) and Stripe for USD. Without `currency`, the saved registrant country wins, then the trusted visitor IP country. USD-only gateways still appear for NGN with `chargeCurrency: USD` and auto-convert at checkout.","parameters":[{"name":"currency","in":"query","required":true,"schema":{"type":"string","enum":["NGN","USD"],"example":""},"example":"","description":"Buyer currency: NGN (Nigeria) or USD (everywhere else)"}],"responses":{"200":{"description":"Enabled and configured gateways with their supported currencies.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/GatewaysResponse"}}},"example":{"success":true,"message":"Request successful","data":{"gateways":[{"code":"bachs","currencies":["NGN","USD"],"chargeCurrency":"NGN"},{"code":"paystack","currencies":["NGN","USD"],"chargeCurrency":"NGN"},{"code":"paypal","currencies":["USD"],"chargeCurrency":"USD"}]}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"payment_configuration_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"This payment gateway is missing credentials on the server.","error":{"code":"payment_configuration_required"}}}}}},"operationId":"getGateways","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/gateways' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/gateways', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/payments":{"get":{"summary":"List payment attempts","tags":["Payments"],"responses":{"200":{"description":"Most recent 200 payments.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["payments","meta"],"properties":{"payments":{"type":"array","items":{"$ref":"#/components/schemas/Payment"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"payments":[{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated list payment attempts response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `payments` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getPayments","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/payments?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/payments?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"post":{"summary":"Start a hosted gateway checkout","tags":["Payments"],"description":"Creates the payment row before contacting the gateway, so a transport failure leaves it `uncertain` for reconciliation instead of double-initialising.","parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","example":"order-2026-10-04-0001"},"example":"order-2026-10-04-0001","description":"Unique 8-128 character key. Replaying the same key with the same body returns the original result."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"gateway":{"type":"string","enum":["bachs","paystack","opay","paypal","stripe","nowpayments"]},"currency":{"type":"string","enum":["NGN","USD"]},"amountMinor":{"type":"string","pattern":"^[1-9]\\d{0,11}$"},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"invoiceId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["currency","amountMinor","email"],"additionalProperties":false},"example":{"gateway":"bachs","currency":"NGN","amountMinor":"5000000","email":"owner@example.ng"}}}},"responses":{"200":{"description":"Replay of an existing idempotent request.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Payment"}}},"example":{"success":true,"message":"Request successful","data":{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"}}}}},"201":{"description":"Checkout initialised; open `checkoutUrl`.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Payment"}}},"example":{"success":true,"message":"Request successful","data":{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"pending","checkoutUrl":"https://checkout.bachs.io/c/abc123","createdAt":"2026-10-04T12:00:00.000Z"}}}}},"400":{"description":"idempotency_key_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":400,"message":"Include an Idempotency-Key header (8 to 128 characters: letters, numbers, :, _, or -) so retries never double-charge your wallet.","error":{"code":"idempotency_key_required"}}}}},"409":{"description":"idempotency_conflict / invoice_not_payable / invoice_amount_mismatch","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"This Idempotency-Key was already used with a different request payload. Use a new Idempotency-Key for a new order, or resend the exact same body to retry.","error":{"code":"idempotency_conflict"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"502":{"description":"payment_initialization_uncertain","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":502,"message":"Could not confirm payment initialization with the gateway. Check your payments list before trying again.","error":{"code":"payment_initialization_uncertain"}}}}},"503":{"description":"gateway_unavailable","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"No active payment gateway is available for this currency right now. Try another currency or contact support.","error":{"code":"gateway_unavailable"}}}}}},"operationId":"postPayments","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/payments' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Idempotency-Key: order-2026-10-04-0001' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"gateway\": \"bachs\",\n  \"currency\": \"NGN\",\n  \"amountMinor\": \"5000000\",\n  \"email\": \"owner@example.ng\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/payments', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Idempotency-Key': 'order-2026-10-04-0001',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"gateway\": \"bachs\",\n    \"currency\": \"NGN\",\n    \"amountMinor\": \"5000000\",\n    \"email\": \"owner@example.ng\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/payments/{id}/verify":{"post":{"summary":"Verify a payment against its gateway","tags":["Payments"],"description":"Verifies the payment status directly with the configured gateway and credits the settled amount once.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e"},"example":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","description":"Payment id"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"paymentId":{"type":"string","pattern":"^\\d{1,30}$"}},"additionalProperties":false},"example":{"paymentId":"1234567890"}}}},"responses":{"200":{"description":"Payment state after verification.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/Payment"}}},"example":{"success":true,"message":"Request successful","data":{"id":"c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e","gateway":"bachs","invoiceId":null,"currency":"NGN","amount":"50000.00","amountMinor":"5000000","state":"paid","checkoutUrl":null,"createdAt":"2026-10-04T12:00:00.000Z"}}}}},"404":{"description":"payment_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"payment not found","error":{"code":"payment_not_found"}}}}},"409":{"description":"payment_settlement_mismatch / payment_underpaid","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"payment settlement mismatch","error":{"code":"payment_settlement_mismatch"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"gateway_unavailable","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"No active payment gateway is available for this currency right now. Try another currency or contact support.","error":{"code":"gateway_unavailable"}}}}}},"operationId":"postPaymentsByIdVerify","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/payments/c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e/verify' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"paymentId\": \"1234567890\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/payments/c4e8a9d2-1b7f-4a5c-8e3d-6f0a1b2c3d4e/verify', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"paymentId\": \"1234567890\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/profile":{"get":{"summary":"Registrant profile","tags":["Profile"],"responses":{"200":{"description":"Saved profile or `null`.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/ProfileResponse"}}},"example":{"success":true,"message":"Request successful","data":{"countryId":160,"stateId":30,"cityId":1058,"registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"}}}}}},"401":{"description":"authentication_required","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":401,"message":"authentication required","error":{"code":"authentication_required"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getProfile","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/profile' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/profile', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"put":{"summary":"Save registrant profile","tags":["Profile"],"description":"The registrant city, state and country code must match the selected location ids.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"countryId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"stateId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"cityId":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991},"registrant":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":100},"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","minLength":5,"maxLength":30,"pattern":"^[+()\\d][+()\\d\\s.\\-]*$"},"street":{"type":"string","minLength":2,"maxLength":200},"city":{"type":"string","minLength":1,"maxLength":100},"state":{"type":"string","minLength":1,"maxLength":100},"postalCode":{"type":"string","minLength":1,"maxLength":20},"countryCode":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["name","email","phone","street","city","state","postalCode","countryCode"],"additionalProperties":false}},"required":["countryId","stateId","cityId","registrant"],"additionalProperties":false},"example":{"countryId":160,"stateId":30,"cityId":1058,"registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"}}}}},"responses":{"200":{"description":"Saved profile.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/ProfileResponse"}}},"example":{"success":true,"message":"Request successful","data":{"countryId":160,"stateId":30,"cityId":1058,"registrant":{"name":"Ada Obi","email":"owner@example.ng","phone":"+234.8123456789","street":"1 Example Road","city":"Lagos","state":"Lagos","postalCode":"100001","countryCode":"NG"}}}}}},"422":{"description":"location_relationship_invalid / registrant_location_mismatch","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"The selected country, state, and city do not match. Please select a valid state and city for your country.","error":{"code":"location_relationship_invalid"},"errors":{"request":"The selected country, state, and city do not match. Please select a valid state and city for your country."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"putProfile","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PUT 'https://your-domain.example/api/v1/profile' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"countryId\": 160,\n  \"stateId\": 30,\n  \"cityId\": 1058,\n  \"registrant\": {\n    \"name\": \"Ada Obi\",\n    \"email\": \"owner@example.ng\",\n    \"phone\": \"+234.8123456789\",\n    \"street\": \"1 Example Road\",\n    \"city\": \"Lagos\",\n    \"state\": \"Lagos\",\n    \"postalCode\": \"100001\",\n    \"countryCode\": \"NG\"\n  }\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/profile', {\n  method: 'PUT',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"countryId\": 160,\n    \"stateId\": 30,\n    \"cityId\": 1058,\n    \"registrant\": {\n      \"name\": \"Ada Obi\",\n      \"email\": \"owner@example.ng\",\n      \"phone\": \"+234.8123456789\",\n      \"street\": \"1 Example Road\",\n      \"city\": \"Lagos\",\n      \"state\": \"Lagos\",\n      \"postalCode\": \"100001\",\n      \"countryCode\": \"NG\"\n    }\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/profile/account":{"put":{"summary":"Rename the account holder","tags":["Profile"],"description":"Updates the signed-in account display name.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},"example":{"name":"Ada Obi"}}}},"responses":{"200":{"description":"Saved name.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"name":{"type":"string"}}}}},"example":{"success":true,"message":"Request successful","data":{"name":"Ada Obi"}}}}},"422":{"description":"invalid_request","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"invalid request","error":{"code":"invalid_request"},"errors":{"request":"invalid request"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"putProfileAccount","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PUT 'https://your-domain.example/api/v1/profile/account' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"name\": \"Ada Obi\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/profile/account', {\n  method: 'PUT',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"name\": \"Ada Obi\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/profile/phone":{"post":{"summary":"Send a WhatsApp verification code","tags":["Profile"],"description":"Stores the number normalized to E.164 and sends a 6-digit code through the Meta `otp_verification` AUTHENTICATION template. One code per minute; codes expire after 10 minutes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phone":{"type":"string"}},"required":["phone"]},"example":{"phone":"08031234567"}}}},"responses":{"202":{"description":"Code sent.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"phone":{"type":"string"},"expiresAt":{"type":"string","format":"date-time"}}}}},"example":{"success":true,"message":"Request successful","data":{"phone":"+2348031234567","expiresAt":"2026-10-05T12:10:00.000Z"}}}}},"422":{"description":"invalid_phone_number","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Enter a valid international phone number (for example, +2348031234567).","error":{"code":"invalid_phone_number"},"errors":{"request":"Enter a valid international phone number (for example, +2348031234567)."}}}}},"429":{"description":"verification_code_recently_sent","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"A verification code was sent recently. Wait a minute before requesting another code.","error":{"code":"verification_code_recently_sent"}}}}},"503":{"description":"whatsapp_delivery_failed","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Could not deliver the WhatsApp message right now. Please try again shortly.","error":{"code":"whatsapp_delivery_failed"}}}}}},"operationId":"postProfilePhone","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/profile/phone' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"phone\": \"08031234567\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/profile/phone', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"phone\": \"08031234567\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/profile/phone/verify":{"post":{"summary":"Verify the WhatsApp number","tags":["Profile"],"description":"Confirms the code and marks the number verified so renewal reminders can use it. Five wrong attempts invalidate the code.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"}},"required":["code"]},"example":{"code":"482913"}}}},"responses":{"200":{"description":"Verified.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"phone":{"type":"string"}}}}},"example":{"success":true,"message":"Request successful","data":{"phone":"+2348031234567"}}}}},"422":{"description":"invalid_verification_code","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"The verification code is invalid or expired.","error":{"code":"invalid_verification_code"},"errors":{"request":"The verification code is invalid or expired."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postProfilePhoneVerify","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/profile/phone/verify' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"code\": \"482913\"\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/profile/phone/verify', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"code\": \"482913\"\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/notifications":{"get":{"summary":"Order and monitoring notifications","tags":["Notifications"],"responses":{"200":{"description":"The newest notifications with an unread count and pagination metadata.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["notifications","meta"],"properties":{"notifications":{"type":"array","items":{"$ref":"#/components/schemas/Notification"}},"unreadCount":{"type":"integer","description":"Unread notifications across all pages."},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"notifications":[{"id":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","state":"succeeded","readAt":null,"createdAt":"2026-10-04T12:01:00.000Z","orderId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","domain":"example.ng","currency":"NGN","amount":"24000.00"}],"unreadCount":1,"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated order and monitoring notifications response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `notifications` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.\n\nAlso returns `unreadCount` for all unread notifications.","operationId":"getNotifications","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/notifications?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/notifications?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/notifications/{id}/read":{"post":{"summary":"Mark a notification read","tags":["Notifications"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f"},"example":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","description":"Notification id"}],"responses":{"200":{"description":"Read.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"read":{"type":"boolean"}}}}},"example":{"success":true,"message":"Request successful","data":{"read":true}}}}},"404":{"description":"notification_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That notification was not found on your account.","error":{"code":"notification_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postNotificationsByIdRead","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/notifications/5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f/read' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/notifications/5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f/read', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/notifications/{id}":{"delete":{"summary":"Delete a notification","tags":["Notifications"],"description":"Removes a purchase update or monitoring alert from this account inbox. The linked order or monitor is not affected.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid","example":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f"},"example":"5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f","description":"Notification id"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}},"example":{"success":true,"message":"Request successful","data":{"deleted":true}}}}},"404":{"description":"notification_not_found","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"That notification was not found on your account.","error":{"code":"notification_not_found"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"deleteNotificationsById","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X DELETE 'https://your-domain.example/api/v1/notifications/5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/notifications/5c6d7e8f-9a0b-4c1d-8e2f-3a4b5c6d7e8f', {\n  method: 'DELETE',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/audit":{"get":{"summary":"Tenant audit log","tags":["Audit"],"responses":{"200":{"description":"Most recent 200 entries.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","enum":[true]},"message":{"type":"string"},"data":{"type":"object","required":["logs","meta"],"properties":{"logs":{"type":"array","items":{"$ref":"#/components/schemas/AuditLog"}},"meta":{"type":"object","required":["total","totalPages","limit","currentPage","nextPage","prevPage"],"properties":{"total":{"type":"integer"},"totalPages":{"type":"integer"},"limit":{"type":"integer"},"currentPage":{"type":"integer"},"nextPage":{"type":"integer","nullable":true},"prevPage":{"type":"integer","nullable":true}}}},"additionalProperties":true}}},"example":{"success":true,"message":"Request successful","data":{"logs":[{"action":"order_reserved","resourceId":"8f1d2b6c-4a3e-4c7f-9b2a-1d5e6f7a8b90","metadata":{"domain":"example.ng","currency":"NGN","amount":"24000.00"},"createdAt":"2026-10-04T12:00:00.000Z"}],"meta":{"total":1,"totalPages":1,"limit":25,"currentPage":1,"nextPage":null,"prevPage":null}}},"description":"Paginated tenant audit log response with resource item schemas and page metadata."}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":40000,"default":1,"example":1},"example":1,"description":"Page number"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":25,"example":25},"example":25,"description":"Records per page"},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":200,"example":"example"},"example":"example","description":"Case-insensitive literal text filter"},{"name":"sort","in":"query","required":false,"schema":{"type":"string","enum":["createdAt","id"],"example":"createdAt"},"example":"createdAt","description":"Allowed sort column"},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc","example":"desc"},"example":"desc","description":"Sort direction"}],"description":"Returns a paginated `logs` array. Use `page` (1-based) and `limit` (1–100; default 25). Optional `q` filters literal text; `sort` and `order` control ordering. The `meta` object reports total, totalPages, limit, currentPage, nextPage and prevPage.","operationId":"getAudit","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/audit?page=1&limit=25&q=example&sort=createdAt&order=desc' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/audit?page=1&limit=25&q=example&sort=createdAt&order=desc', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/providers":{"get":{"summary":"Configured registrar providers","tags":["Providers"],"responses":{"200":{"description":"Providers enabled for this deployment.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/ProvidersResponse"}}},"example":{"success":true,"message":"Request successful","data":{"providers":[{"code":"cloudflare","registration":true,"renewal":false,"sandbox":false}]}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getProviders","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/providers' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/providers', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/dns":{"get":{"summary":"Read DNS configuration for an owned domain","tags":["DNS"],"description":"Returns `mode: external` with the configured nameservers when platform DNS is off. Platform mode fetches one Cloudflare DNS record page (10 by default). `pagination` contains page, perPage, total and totalPages. `provider` names the registrar; Cloudflare DNS supports both registrars.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"example":""},"example":"","description":"DNS record page"},{"name":"per_page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":10,"example":""},"example":"","description":"Records per page"}],"responses":{"200":{"description":"Zone status and records.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"$ref":"#/components/schemas/RecordsResponse"}}},"example":{"success":true,"message":"Request successful","data":{"provider":"hostafrica","mode":"platform","nameservers":["alice.ns.cloudflare.com","bob.ns.cloudflare.com"],"status":"active","pagination":{"page":1,"perPage":10,"total":1,"totalPages":1},"records":[{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.10","ttl":300,"proxied":true,"priority":null}]}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_setup_pending","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Your managed DNS zone is still being provisioned. Wait a moment and try again.","error":{"code":"platform_dns_setup_pending"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"getDomainsByDomainDns","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X GET 'https://your-domain.example/api/v1/domains/example.ng/dns' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns', {\n  method: 'GET',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/nameservers":{"post":{"summary":"Switch between platform DNS and external nameservers","tags":["DNS"],"description":"Requires `domains:buy` and an explicit `confirmDelegationChange`. The update is routed to the domain’s registrar (`provider` in the response): Cloudflare registrations stay on platform DNS, HostAfrica registrations accept either mode.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mode":{"type":"string","enum":["platform","external"]},"confirmDelegationChange":{"type":"boolean","enum":[true]},"nameservers":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"string"}}},"required":["mode","confirmDelegationChange"],"additionalProperties":false},"example":{"mode":"external","confirmDelegationChange":true,"nameservers":["ns1.example.com","ns2.example.com"]}}}},"responses":{"200":{"description":"Applied nameservers.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"provider":{"type":"string","enum":["cloudflare","hostafrica"]},"mode":{"type":"string","enum":["platform","external"]},"nameservers":{"type":"array","items":{"type":"string"}},"status":{"type":"string"}}}}},"example":{"success":true,"message":"Request successful","data":{"provider":"hostafrica","mode":"external","nameservers":["ns1.example.com","ns2.example.com"],"status":"external"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"provider_disabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"The registrar for this domain is currently disabled or unavailable. Please contact support.","error":{"code":"provider_disabled"}}}}}},"operationId":"postDomainsByDomainNameservers","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/domains/example.ng/nameservers' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"mode\": \"external\",\n  \"confirmDelegationChange\": true,\n  \"nameservers\": [\n    \"ns1.example.com\",\n    \"ns2.example.com\"\n  ]\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/nameservers', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"mode\": \"external\",\n    \"confirmDelegationChange\": true,\n    \"nameservers\": [\n      \"ns1.example.com\",\n      \"ns2.example.com\"\n    ]\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/dns/records":{"post":{"summary":"Create a DNS record","tags":["DNS"],"description":"Requires `domains:buy`, domain ownership, and managed platform DNS (`mode: platform`). Enables Cloudflare proxy (`proxied: true`) only on `A`, `AAAA`, and `CNAME` records; other types reject `proxied: true` with HTTP `422` (`record_proxy_unsupported`).","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string","minLength":1,"maxLength":253},"content":{"type":"string","minLength":1,"maxLength":4096},"ttl":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxied":{"default":false,"type":"boolean"},"comment":{"type":"string","maxLength":100},"priority":{"type":"integer","minimum":0,"maximum":65535}},"required":["type","name","content"],"additionalProperties":false},"example":{"type":"A","name":"www","content":"203.0.113.10","ttl":300,"proxied":true}}}},"responses":{"200":{"description":"Created record.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/DnsRecord"}}}}},"example":{"success":true,"message":"Request successful","data":{"record":{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.10","ttl":300,"proxied":true,"priority":null}}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"422":{"description":"record_proxy_unsupported","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types.","error":{"code":"record_proxy_unsupported"},"errors":{"request":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postDomainsByDomainDnsRecords","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/domains/example.ng/dns/records' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"A\",\n  \"name\": \"www\",\n  \"content\": \"203.0.113.10\",\n  \"ttl\": 300,\n  \"proxied\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns/records', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"type\": \"A\",\n    \"name\": \"www\",\n    \"content\": \"203.0.113.10\",\n    \"ttl\": 300,\n    \"proxied\": true\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/dns/batch":{"post":{"summary":"Create, update and delete DNS records in a batch","tags":["DNS"],"description":"Requires `domains:buy`, domain ownership and platform DNS. Accepts at most 500 records across posts, patches and deletes combined. Each array defaults to empty. Proxy mode (`proxied: true`) is validated per record and only permitted on `A`, `AAAA`, and `CNAME`.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string","minLength":1,"maxLength":253},"content":{"type":"string","minLength":1,"maxLength":4096},"ttl":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxied":{"default":false,"type":"boolean"},"comment":{"type":"string","maxLength":100},"priority":{"type":"integer","minimum":0,"maximum":65535}},"required":["type","name","content"],"additionalProperties":false}},"patches":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string","minLength":1,"maxLength":253},"content":{"type":"string","minLength":1,"maxLength":4096},"ttl":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxied":{"default":false,"type":"boolean"},"comment":{"type":"string","maxLength":100},"priority":{"type":"integer","minimum":0,"maximum":65535},"id":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["type","name","content","id"],"additionalProperties":false}},"deletes":{"default":[],"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["id"],"additionalProperties":false}}},"additionalProperties":false},"example":{"posts":[{"type":"A","name":"www","content":"203.0.113.10","ttl":300,"proxied":true}],"patches":[],"deletes":[]}}}},"responses":{"200":{"description":"Applied DNS record batch.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"posts":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"patches":{"type":"array","items":{"$ref":"#/components/schemas/DnsRecord"}},"deletes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"}}}}}}}},"example":{"success":true,"message":"Request successful","data":{"posts":[{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.10","ttl":300,"proxied":true}],"patches":[],"deletes":[]}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"422":{"description":"record_proxy_unsupported","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types.","error":{"code":"record_proxy_unsupported"},"errors":{"request":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"postDomainsByDomainDnsBatch","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X POST 'https://your-domain.example/api/v1/domains/example.ng/dns/batch' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"posts\": [\n    {\n      \"type\": \"A\",\n      \"name\": \"www\",\n      \"content\": \"203.0.113.10\",\n      \"ttl\": 300,\n      \"proxied\": true\n    }\n  ],\n  \"patches\": [],\n  \"deletes\": []\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns/batch', {\n  method: 'POST',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"posts\": [\n      {\n        \"type\": \"A\",\n        \"name\": \"www\",\n        \"content\": \"203.0.113.10\",\n        \"ttl\": 300,\n        \"proxied\": true\n      }\n    ],\n    \"patches\": [],\n    \"deletes\": []\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}},"/api/v1/domains/{domain}/dns/records/{record}":{"put":{"summary":"Replace a DNS record","tags":["DNS"],"description":"Requires `domains:buy`, domain ownership, and managed platform DNS. Replaces the full record definition (`type`, `name`, `content`, optional `ttl`, `proxied`, `priority`, `comment`). `proxied: true` is allowed only on `A`, `AAAA`, and `CNAME` (`record_proxy_unsupported` 422 otherwise). For partial updates such as toggling `proxied` alone, use `PATCH`.","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"},{"name":"record","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$","example":"0123456789abcdef0123456789abcdef"},"example":"0123456789abcdef0123456789abcdef","description":"Cloudflare record id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string","minLength":1,"maxLength":253},"content":{"type":"string","minLength":1,"maxLength":4096},"ttl":{"default":1,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxied":{"default":false,"type":"boolean"},"comment":{"type":"string","maxLength":100},"priority":{"type":"integer","minimum":0,"maximum":65535}},"required":["type","name","content"],"additionalProperties":false},"example":{"type":"A","name":"www","content":"203.0.113.11","ttl":300,"proxied":true}}}},"responses":{"200":{"description":"Updated record.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/DnsRecord"}}}}},"example":{"success":true,"message":"Request successful","data":{"record":{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.11","ttl":300,"proxied":true,"priority":null}}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"422":{"description":"record_proxy_unsupported","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types.","error":{"code":"record_proxy_unsupported"},"errors":{"request":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"putDomainsByDomainDnsRecordsByRecord","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PUT 'https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"A\",\n  \"name\": \"www\",\n  \"content\": \"203.0.113.11\",\n  \"ttl\": 300,\n  \"proxied\": true\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef', {\n  method: 'PUT',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"type\": \"A\",\n    \"name\": \"www\",\n    \"content\": \"203.0.113.11\",\n    \"ttl\": 300,\n    \"proxied\": true\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"patch":{"summary":"Partially update a DNS record or toggle proxy mode","tags":["DNS"],"description":"Requires `domains:buy`, domain ownership, and managed platform DNS. Merges partial fields (`proxied`, `content`, `ttl`, `name`, `type`, `priority`, `comment`) against the live DNS record and validates all rules before saving. Setting `proxied: true` is only allowed on `A`, `AAAA`, and `CNAME` records; attempting to proxy `MX`, `TXT`, `NS`, `SRV`, `CAA`, or other non-proxifiable types returns HTTP `422` (`record_proxy_unsupported`).","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"},{"name":"record","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$","example":"0123456789abcdef0123456789abcdef"},"example":"0123456789abcdef0123456789abcdef","description":"Cloudflare record id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["A","AAAA","CNAME","MX","TXT","NS","SRV","CAA","PTR","TLSA","HTTPS","SVCB","SSHFP","URI","LOC","DS"]},"name":{"type":"string","minLength":1,"maxLength":253},"content":{"type":"string","minLength":1,"maxLength":4096},"ttl":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"proxied":{"type":"boolean"},"comment":{"nullable":true,"type":"string","maxLength":100},"priority":{"nullable":true,"type":"integer","minimum":0,"maximum":65535}},"additionalProperties":false},"example":{"proxied":false,"ttl":300}}}},"responses":{"200":{"description":"Patched record.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"record":{"$ref":"#/components/schemas/DnsRecord"}}}}},"example":{"success":true,"message":"Request successful","data":{"record":{"id":"0123456789abcdef0123456789abcdef","type":"A","name":"www.example.ng","content":"203.0.113.11","ttl":300,"proxied":false,"priority":null}}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"422":{"description":"record_proxy_unsupported","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types.","error":{"code":"record_proxy_unsupported"},"errors":{"request":"Cloudflare proxy (orange cloud) is only supported on A, AAAA, and CNAME records. Set proxied to false for other record types."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"patchDomainsByDomainDnsRecordsByRecord","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X PATCH 'https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"proxied\": false,\n  \"ttl\": 300\n}'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef', {\n  method: 'PATCH',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4',\n    'Content-Type': 'application/json'\n  },\n  body: JSON.stringify({\n    \"proxied\": false,\n    \"ttl\": 300\n  })\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]},"delete":{"summary":"Delete a DNS record","tags":["DNS"],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","example":"example.ng"},"example":"example.ng","description":"Registered domain name"},{"name":"record","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{32}$","example":"0123456789abcdef0123456789abcdef"},"example":"0123456789abcdef0123456789abcdef","description":"Cloudflare record id"}],"responses":{"200":{"description":"Deleted.","content":{"application/json":{"schema":{"type":"object","required":["success","message","data"],"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","description":"Human-readable outcome."},"data":{"type":"object","properties":{"deleted":{"type":"boolean"}}}}},"example":{"success":true,"message":"Request successful","data":{"deleted":true}}}}},"403":{"description":"insufficient_scope","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":403,"message":"Your API key or account does not have permission for this action. Verify the key scopes and try again.","error":{"code":"insufficient_scope"}}}}},"404":{"description":"domain_not_owned","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":404,"message":"This domain is not registered to your account, or its registration has not completed yet.","error":{"code":"domain_not_owned"}}}}},"409":{"description":"platform_dns_not_enabled","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":409,"message":"Managed platform DNS is not enabled for this domain because it uses custom external nameservers.","error":{"code":"platform_dns_not_enabled"}}}}},"422":{"description":"invalid_record_id","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}},"errors":{"type":"object","additionalProperties":{"type":"string"}}}},"example":{"success":false,"statusCode":422,"message":"The DNS record ID format is invalid.","error":{"code":"invalid_record_id"},"errors":{"request":"The DNS record ID format is invalid."}}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":429,"message":"Too many requests in a short period. Wait until the Retry-After window passes and try again.","error":{"code":"rate_limited"}}}}},"503":{"description":"internal_error","content":{"application/json":{"schema":{"type":"object","required":["success","statusCode","message"],"properties":{"success":{"type":"boolean","enum":[false]},"statusCode":{"type":"integer"},"message":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"}}}}},"example":{"success":false,"statusCode":503,"message":"Something went wrong on our side while processing your request. Please try again shortly.","error":{"code":"internal_error"}}}}}},"operationId":"deleteDomainsByDomainDnsRecordsByRecord","x-codeSamples":[{"lang":"shell","label":"cURL","source":"curl -X DELETE 'https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef' \\\n  -H 'Authorization: Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'"},{"lang":"javascript","label":"JavaScript (fetch)","source":"const response = await fetch('https://your-domain.example/api/v1/domains/example.ng/dns/records/0123456789abcdef0123456789abcdef', {\n  method: 'DELETE',\n  headers: {\n    'Authorization': 'Bearer wd_a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4a1b2c3d4'\n  },\n})\nconst { success, message, data } = await response.json()\n// every response shares the envelope: {success, message, data};\n// failures use {success:false, statusCode, message, error:{code}}.\nif (!success) throw new Error(message)"}]}}}}