# Zonic247 API v1 — Complete Reference for AI Agents & Integrators > Base URL: `https://zonic247.bonifadetechnologies.com/api/v1` > OpenAPI JSON: `https://zonic247.bonifadetechnologies.com/api/v1/docs/openapi.json` | Scalar Docs: `https://zonic247.bonifadetechnologies.com/api/v1/docs` | Swagger UI: `https://zonic247.bonifadetechnologies.com/api/v1/swagger` ## 1. Authentication & Scopes - Primary header for automation and server integrations: `Authorization: Bearer wd_` (generated in the Zonic247 dashboard). - Available API key scopes: - `domains:read`: live domain search quotes (`POST /search`), domain listings, DNS record reads, quote inspection, order polling, notifications, audit logs, registration documents read. - `domains:buy`: create/renew domain orders, upload documents, manage DNS records (`POST`/`PUT`/`PATCH`/`DELETE`), batch DNS updates, change nameservers, manage monitors. - `wallet:read`: inspect wallet balances, ledger entries, invoices, PDF receipts, gateways, hosted payment checkout creation, and payment verification. - `profile:write`: update registrant contact details, account display name, WhatsApp phone verification, and resolved billing country/currency (`PUT /profile`). ## 2. Capabilities, Constraints & Unsupported Operations - **Idempotency**: Every domain purchase or gateway checkout (`POST /orders`, `/orders/bulk`, `/checkout`, `/payments`) requires an `Idempotency-Key` header (8–128 characters `[a-zA-Z0-9:_-]`). Never reuse a key across distinct payloads (`409 idempotency_conflict`). - **Cloudflare Proxy (`proxied`)**: Only `A, AAAA, CNAME` support `proxied: true`. Passing `proxied: true` on `MX`, `TXT`, `NS`, `SRV`, `CAA`, `PTR`, `TLSA`, `HTTPS`, `SVCB`, `SSHFP`, `URI`, `LOC`, or `DS` fails with HTTP `422` and `error.code = "record_proxy_unsupported"`. - **DNS Updates**: - `PUT /api/v1/domains/{domain}/dns/records/{record}` replaces the full record (`type`, `name`, `content`, `ttl`, `proxied`, optional `priority`, `comment`). - `PATCH /api/v1/domains/{domain}/dns/records/{record}` merges partial fields (such as `{ "proxied": true }`, `{ "content": "203.0.113.20" }`, or `{ "ttl": 300 }`) against the existing DNS record and enforces proxy & type validation. - `POST /api/v1/domains/{domain}/dns/batch` executes up to 500 `posts`, `patches`, and `deletes` atomically. - **Nameserver Delegation**: Cloudflare-registered domains must stay on managed platform DNS (`mode: "platform"`); requesting `mode: "external"` returns `cloudflare_requires_cloudflare_dns`. HostAfrica-registered domains allow switching between `"platform"` and `"external"` (2–5 nameservers + `confirmDelegationChange: true`). - **Country & Currency**: Nigeria (`NG`) uses `NGN` and selects the cheapest registrar in Naira; all other countries use `USD`. - **Scope Boundary**: Generated API keys cannot create/revoke/reset API keys, credit wallets directly, invoke administrative actions, or run browser/session auth flows. ## 3. Endpoints by Tag ## Tag: Health — Liveness probes ### `GET /api/v1/health` — Liveness probe - **Auth**: Public (no authentication required) - **Operation ID**: `getHealth` **Responses**: - `200`: Service is accepting traffic. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "status": "ok" } } ``` ## Tag: Documentation — This reference ### `GET /api/v1/docs` — Scalar API reference (this page) - **Auth**: Public (no authentication required) - **Operation ID**: `getDocs` **Responses**: - `200`: HTML document. - `429`: rate_limited - `503`: internal_error ### `GET /api/v1/docs/openapi.json` — OpenAPI document for this deployment - **Auth**: Public (no authentication required) - **Operation ID**: `getDocsOpenapiJson` **Responses**: - `200`: The OpenAPI 3.0 document rendered above. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "openapi": "3.0.3", "info": { "title": "Zonic247 API", "version": "1.0.0" } } } ``` ### `GET /api/v1/swagger` — Swagger UI API reference - **Auth**: Public (no authentication required) - **Operation ID**: `getSwagger` Interactive Swagger UI documentation backed by `/api/v1/docs/openapi.json` with Bearer API key authentication support. **Responses**: - `200`: Swagger UI HTML document. - `429`: rate_limited - `503`: internal_error ## Tag: Locations — Country, state and city catalog ### `GET /api/v1/locations/countries` — All countries - **Auth**: Public (no authentication required) - **Operation ID**: `getLocationsCountries` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Country catalog. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `GET /api/v1/locations/states` — States in a country - **Auth**: Public (no authentication required) - **Operation ID**: `getLocationsStates` 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. **Parameters**: - `countryId` (query, integer, required): Numeric country id - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: State catalog. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `GET /api/v1/locations/cities` — Cities in a state - **Auth**: Public (no authentication required) - **Operation ID**: `getLocationsCities` 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. **Parameters**: - `countryId` (query, integer, required): Numeric country id - `stateId` (query, integer, required): Numeric state id - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Up to 1000 cities. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ## Tag: Search — Availability and pricing quotes ### `POST /api/v1/search` — Search that persists purchasable quotes - **Auth**: Anonymous (optional API Key) OR API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postSearch` 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. **Example Request Body (`application/json`)**: ```json { "domains": [ "example.ng", "example.com" ], "operation": "register", "suggestions": true } ``` **Responses**: - `200`: 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`). - `403`: domain_not_owned when operation=renew - `422`: invalid_request - `429`: rate_limited - `503`: internal_error ### `GET /api/v1/quotes/{id}` — Fetch a stored quote - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getQuotesById` **Parameters**: - `id` (path, string, required): Quote id **Responses**: - `200`: Quote detail. - `404`: quote_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } ``` ## Tag: DNS — Zone, nameserver and record management ### `POST /api/v1/quotes/{id}/nameservers` — Prepare assigned checkout nameservers - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postQuotesByIdNameservers` 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**: - `id` (path, string, required): Quote id **Responses**: - `200`: Assigned nameservers for checkout. - `403`: insufficient_scope - `404`: quote_not_found - `409`: quote_expired - `429`: rate_limited - `502`: zone_identity_mismatch - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "domain": "example.ng", "registrar": "cloudflare", "dnsProvider": "cloudflare", "nameservers": [ "alice.ns.cloudflare.com", "bob.ns.cloudflare.com" ], "canUseExternal": false } } ``` ### `GET /api/v1/domains/{domain}/dns` — Read DNS configuration for an owned domain - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getDomainsByDomainDns` 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**: - `domain` (path, string, required): Registered domain name - `page` (query, integer, optional): DNS record page - `per_page` (query, integer, optional): Records per page **Responses**: - `200`: Zone status and records. - `404`: domain_not_owned - `409`: platform_dns_setup_pending - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } ] } } ``` ### `POST /api/v1/domains/{domain}/nameservers` — Switch between platform DNS and external nameservers - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postDomainsByDomainNameservers` 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**: - `domain` (path, string, required): Registered domain name **Example Request Body (`application/json`)**: ```json { "mode": "external", "confirmDelegationChange": true, "nameservers": [ "ns1.example.com", "ns2.example.com" ] } ``` **Responses**: - `200`: Applied nameservers. - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `429`: rate_limited - `503`: provider_disabled **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "provider": "hostafrica", "mode": "external", "nameservers": [ "ns1.example.com", "ns2.example.com" ], "status": "external" } } ``` ### `POST /api/v1/domains/{domain}/dns/records` — Create a DNS record - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postDomainsByDomainDnsRecords` 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**: - `domain` (path, string, required): Registered domain name **Example Request Body (`application/json`)**: ```json { "type": "A", "name": "www", "content": "203.0.113.10", "ttl": 300, "proxied": true } ``` **Responses**: - `200`: Created record. - `403`: insufficient_scope - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `422`: record_proxy_unsupported - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `POST /api/v1/domains/{domain}/dns/batch` — Create, update and delete DNS records in a batch - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postDomainsByDomainDnsBatch` 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**: - `domain` (path, string, required): Registered domain name **Example Request Body (`application/json`)**: ```json { "posts": [ { "type": "A", "name": "www", "content": "203.0.113.10", "ttl": 300, "proxied": true } ], "patches": [], "deletes": [] } ``` **Responses**: - `200`: Applied DNS record batch. - `403`: insufficient_scope - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `422`: record_proxy_unsupported - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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": [] } } ``` ### `PUT /api/v1/domains/{domain}/dns/records/{record}` — Replace a DNS record - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `putDomainsByDomainDnsRecordsByRecord` 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**: - `domain` (path, string, required): Registered domain name - `record` (path, string, required): Cloudflare record id **Example Request Body (`application/json`)**: ```json { "type": "A", "name": "www", "content": "203.0.113.11", "ttl": 300, "proxied": true } ``` **Responses**: - `200`: Updated record. - `403`: insufficient_scope - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `422`: record_proxy_unsupported - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `PATCH /api/v1/domains/{domain}/dns/records/{record}` — Partially update a DNS record or toggle proxy mode - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `patchDomainsByDomainDnsRecordsByRecord` 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**: - `domain` (path, string, required): Registered domain name - `record` (path, string, required): Cloudflare record id **Example Request Body (`application/json`)**: ```json { "proxied": false, "ttl": 300 } ``` **Responses**: - `200`: Patched record. - `403`: insufficient_scope - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `422`: record_proxy_unsupported - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `DELETE /api/v1/domains/{domain}/dns/records/{record}` — Delete a DNS record - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `deleteDomainsByDomainDnsRecordsByRecord` **Parameters**: - `domain` (path, string, required): Registered domain name - `record` (path, string, required): Cloudflare record id **Responses**: - `200`: Deleted. - `403`: insufficient_scope - `404`: domain_not_owned - `409`: platform_dns_not_enabled - `422`: invalid_record_id - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "deleted": true } } ``` ## Tag: Documents — Private registration documents ### `POST /api/v1/documents` — Upload a registration document - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postDocuments` 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. **Multipart Fields (`multipart/form-data`)**: ```json { "file": "@bvn-slip.pdf", "type": "identity" } ``` **Responses**: - `201`: Uploaded. - `409`: document_limit_reached - `413`: body_too_large - `422`: document_type_not_supported - `429`: rate_limited - `502`: document_upload_failed - `503`: r2_configuration_required ### `GET /api/v1/documents` — List uploaded documents - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getDocuments` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Most recent 100 documents. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `DELETE /api/v1/documents/{id}` — Delete an unattached document - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `deleteDocumentsById` **Parameters**: - `id` (path, string, required): Document id **Responses**: - `200`: Deleted. - `404`: document_not_found - `409`: document_attached_to_order - `429`: rate_limited - `502`: document_delete_failed - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "deleted": true } } ``` ### `GET /api/v1/documents/{id}/download` — Presigned download URL - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getDocumentsByIdDownload` **Parameters**: - `id` (path, string, required): Document id **Responses**: - `200`: Short-lived private URL. - `404`: document_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "url": "https://pub-xxx.r2.dev/registration-documents/tenant/doc.pdf?X-Amz-Signature=...", "expiresIn": 300 } } ``` ## Tag: Orders — Registration, renewal and checkout ### `GET /api/v1/orders` — List orders - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getOrders` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Most recent 200 orders. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `POST /api/v1/orders` — Reserve a quote and open an order - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postOrders` Requires `domains:buy`. Debits the wallet immediately and hands the order to the durable worker. Fails on an expired quote. **Parameters**: - `Idempotency-Key` (header, string, required): Unique 8-128 character key. Replaying the same key with the same body returns the original result. **Example Request Body (`application/json`)**: ```json { "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`: Order accepted for processing. - `400`: idempotency_key_required - `402`: insufficient_balance - `403`: domain_not_owned - `404`: quote_not_found - `409`: quote_expired / idempotency_conflict / renewal_already_pending - `413`: body_too_large - `429`: rate_limited - `503`: internal_error ### `POST /api/v1/orders/bulk` — Reserve several quotes and open one order each - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postOrdersBulk` 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**: - `Idempotency-Key` (header, string, required): Unique 8-128 character key. Replaying the same key with the same body returns the original result. **Example Request Body (`application/json`)**: ```json { "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`: Orders accepted for processing, in request order. - `400`: idempotency_key_required - `402`: insufficient_balance - `403`: domain_not_owned - `404`: quote_not_found - `409`: quote_expired / idempotency_conflict / renewal_already_pending - `413`: body_too_large - `422`: invalid_request - `429`: rate_limited - `503`: internal_error ### `POST /api/v1/orders/{id}/reconcile` — Check the registrar outcome for an uncertain order - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postOrdersByIdReconcile` 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**: - `id` (path, string, required): Order id **Responses**: - `202`: Status check scheduled. - `404`: order_not_found - `409`: order_status_check_unavailable - `429`: rate_limited - `503`: internal_error ### `GET /api/v1/orders/{id}` — Fetch one order - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getOrdersById` **Parameters**: - `id` (path, string, required): Order id **Responses**: - `200`: Order detail. - `404`: order_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } } ``` ### `PUT /api/v1/domains/{domain}/renewal` — Enable or disable renewal invoices for a domain - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `putDomainsByDomainRenewal` **Parameters**: - `domain` (path, string, required): Registered domain name **Example Request Body (`application/json`)**: ```json { "enabled": true } ``` **Responses**: - `200`: New preference. - `404`: domain_not_owned - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "enabled": true } } ``` ## Tag: Invoices — Domain purchase, renewal and monitoring invoices and receipts ### `GET /api/v1/invoices` — List purchase, renewal and monitoring invoices - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getInvoices` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Paginated domain registration, renewal and monitoring invoices, including paid receipts. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `GET /api/v1/invoices/{id}/receipt` — Download the invoice or paid receipt PDF - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getInvoicesByIdReceipt` **Parameters**: - `id` (path, string, required): Invoice identifier **Responses**: - `200`: Zonic247 invoice PDF, or the paid receipt once settled. - `404`: invoice_not_found - `429`: rate_limited - `503`: internal_error ## Tag: Wallets — Balances and ledger history ### `GET /api/v1/wallets` — Balances by currency - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getWallets` **Responses**: - `200`: NGN and USD are always present; preferredCurrency follows saved country, then trusted location. Other currencies appear once used. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } ] } } ``` ### `GET /api/v1/ledger` — Wallet movement history - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getLedger` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Most recent 200 entries. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ## Tag: Monitors — Drop-catch and renewal monitoring with auto-buy ### `GET /api/v1/monitors` — List your domain monitors - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getMonitors` Only monitors created by your account are returned. **Responses**: - `200`: Your monitors, newest first. - `403`: insufficient_scope - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } ] } } ``` ### `POST /api/v1/monitors` — Create a domain monitor - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postMonitors` `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). **Example Request Body (`application/json`)**: ```json { "domain": "example.ng", "kind": "watch", "currency": "NGN", "autoBuy": true, "maxPrice": "40000.00", "priorityBid": "5000.00", "notifyEmail": true } ``` **Responses**: - `201`: The created monitor. - `402`: insufficient_balance - `403`: insufficient_scope - `409`: bid_too_low - `422`: invalid_request - `429`: rate_limited - `503`: internal_error ### `GET /api/v1/monitors/{id}` — Read a monitor and its event history - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getMonitorsById` **Parameters**: - `id` (path, string, required): Monitor id **Responses**: - `200`: The monitor plus recent events. - `403`: insufficient_scope - `404`: monitor_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } ] } } ``` ### `PATCH /api/v1/monitors/{id}` — Update a monitor - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `patchMonitorsById` Change the price cap, auto-buy / auto-renew, notification channels, notes, or bid. Setting `status` to `cancelled` releases any held bid. **Parameters**: - `id` (path, string, required): Monitor id **Example Request Body (`application/json`)**: ```json { "maxPrice": "45000.00", "autoBuy": true } ``` **Responses**: - `200`: The updated monitor. - `402`: insufficient_balance - `403`: insufficient_scope - `404`: monitor_not_found - `409`: bid_too_low - `422`: invalid_request - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "monitor": { "id": "c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50", "domain": "example.ng", "kind": "watch", "maxPrice": "45000.00", "status": "active" } } } ``` ### `DELETE /api/v1/monitors/{id}` — Cancel a monitor - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `deleteMonitorsById` Stops the monitor and releases any wallet held for its priority bid. **Parameters**: - `id` (path, string, required): Monitor id **Responses**: - `200`: The cancelled monitor. - `403`: insufficient_scope - `404`: monitor_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "monitor": { "id": "c3f1a2b4-5d6e-4f70-8a91-0b1c2d3e4f50", "domain": "example.ng", "status": "cancelled" } } } ``` ## Tag: Domains — Owned domains and registry WHOIS ### `GET /api/v1/whois/{domain}` — Look up WHOIS for any domain - **Auth**: Public (no authentication required) - **Operation ID**: `getWhoisByDomain` 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**: - `domain` (path, string, required): Domain name **Responses**: - `200`: Live public domain registration details. - `422`: invalid_request - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } ``` ### `GET /api/v1/domains` — List all registered domains owned by this tenant - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getDomains` **Responses**: - `200`: Complete registered domain selector inventory. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "domains": [ { "domain": "example.ng" } ] } } ``` ## Tag: Payments — Hosted gateway checkout and verification ### `POST /api/v1/checkout/preview` — Preview the wallet and gateway split for a purchase - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postCheckoutPreview` **Example Request Body (`application/json`)**: ```json { "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`: Authoritative price, available balance and remaining gateway amount. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "currency": "USD", "amountMinor": "1200", "walletBalanceMinor": "450", "walletMinor": "450", "gatewayMinor": "750" } } ``` ### `POST /api/v1/checkout` — Buy a domain or subscribe using wallet balance and a gateway - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postCheckout` 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**: - `Idempotency-Key` (header, string, required): Reuse the same key and body when retrying checkout **Example Request Body (`application/json`)**: ```json { "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`: Completed purchase or gateway payment to open. - `409`: quote_expired / idempotency_conflict - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } } } ``` ### `GET /api/v1/gateways` — Gateways available to this tenant - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getGateways` 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**: - `currency` (query, string, required): Buyer currency: NGN (Nigeria) or USD (everywhere else) **Responses**: - `200`: Enabled and configured gateways with their supported currencies. - `429`: rate_limited - `503`: payment_configuration_required **Example 200 Response**: ```json { "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" } ] } } ``` ### `GET /api/v1/payments` — List payment attempts - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getPayments` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Most recent 200 payments. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `POST /api/v1/payments` — Start a hosted gateway checkout - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postPayments` Creates the payment row before contacting the gateway, so a transport failure leaves it `uncertain` for reconciliation instead of double-initialising. **Parameters**: - `Idempotency-Key` (header, string, required): Unique 8-128 character key. Replaying the same key with the same body returns the original result. **Example Request Body (`application/json`)**: ```json { "gateway": "bachs", "currency": "NGN", "amountMinor": "5000000", "email": "owner@example.ng" } ``` **Responses**: - `200`: Replay of an existing idempotent request. - `201`: Checkout initialised; open `checkoutUrl`. - `400`: idempotency_key_required - `409`: idempotency_conflict / invoice_not_payable / invoice_amount_mismatch - `429`: rate_limited - `502`: payment_initialization_uncertain - `503`: gateway_unavailable **Example 200 Response**: ```json { "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" } } ``` ### `POST /api/v1/payments/{id}/verify` — Verify a payment against its gateway - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postPaymentsByIdVerify` Verifies the payment status directly with the configured gateway and credits the settled amount once. **Parameters**: - `id` (path, string, required): Payment id **Example Request Body (`application/json`)**: ```json { "paymentId": "1234567890" } ``` **Responses**: - `200`: Payment state after verification. - `404`: payment_not_found - `409`: payment_settlement_mismatch / payment_underpaid - `429`: rate_limited - `503`: gateway_unavailable **Example 200 Response**: ```json { "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" } } ``` ## Tag: Profile — Registrant contact details ### `GET /api/v1/profile` — Registrant profile - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getProfile` **Responses**: - `200`: Saved profile or `null`. - `401`: authentication_required - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } } } ``` ### `PUT /api/v1/profile` — Save registrant profile - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `putProfile` The registrant city, state and country code must match the selected location ids. **Example Request Body (`application/json`)**: ```json { "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`: Saved profile. - `422`: location_relationship_invalid / registrant_location_mismatch - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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" } } } ``` ### `PUT /api/v1/profile/account` — Rename the account holder - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `putProfileAccount` Updates the signed-in account display name. **Example Request Body (`application/json`)**: ```json { "name": "Ada Obi" } ``` **Responses**: - `200`: Saved name. - `422`: invalid_request - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "name": "Ada Obi" } } ``` ### `POST /api/v1/profile/phone` — Send a WhatsApp verification code - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postProfilePhone` 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. **Example Request Body (`application/json`)**: ```json { "phone": "08031234567" } ``` **Responses**: - `202`: Code sent. - `422`: invalid_phone_number - `429`: verification_code_recently_sent - `503`: whatsapp_delivery_failed ### `POST /api/v1/profile/phone/verify` — Verify the WhatsApp number - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postProfilePhoneVerify` Confirms the code and marks the number verified so renewal reminders can use it. Five wrong attempts invalidate the code. **Example Request Body (`application/json`)**: ```json { "code": "482913" } ``` **Responses**: - `200`: Verified. - `422`: invalid_verification_code - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "phone": "+2348031234567" } } ``` ## Tag: Notifications — Order state notifications ### `GET /api/v1/notifications` — Order and monitoring notifications - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getNotifications` 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. Also returns `unreadCount` for all unread notifications. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: The newest notifications with an unread count and pagination metadata. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ### `POST /api/v1/notifications/{id}/read` — Mark a notification read - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `postNotificationsByIdRead` **Parameters**: - `id` (path, string, required): Notification id **Responses**: - `200`: Read. - `404`: notification_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "read": true } } ``` ### `DELETE /api/v1/notifications/{id}` — Delete a notification - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `deleteNotificationsById` Removes a purchase update or monitoring alert from this account inbox. The linked order or monitor is not affected. **Parameters**: - `id` (path, string, required): Notification id **Responses**: - `200`: Deleted. - `404`: notification_not_found - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "deleted": true } } ``` ## Tag: Audit — Tenant audit log ### `GET /api/v1/audit` — Tenant audit log - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getAudit` 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. **Parameters**: - `page` (query, integer, optional): Page number - `limit` (query, integer, optional): Records per page - `q` (query, string, optional): Case-insensitive literal text filter - `sort` (query, string, optional): Allowed sort column - `order` (query, string, optional): Sort direction **Responses**: - `200`: Most recent 200 entries. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "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 } } } ``` ## Tag: Providers — Registrar provider inventory ### `GET /api/v1/providers` — Configured registrar providers - **Auth**: API Key (`Authorization: Bearer wd_`) - **Operation ID**: `getProviders` **Responses**: - `200`: Providers enabled for this deployment. - `429`: rate_limited - `503`: internal_error **Example 200 Response**: ```json { "success": true, "message": "Request successful", "data": { "providers": [ { "code": "cloudflare", "registration": true, "renewal": false, "sandbox": false } ] } } ```