1. Domains
ResellerStack Developer API
  • Introduction
  • Quick start
  • API Reference
    • Customers
      • List customers
      • Create customer
      • Get customer
      • Update customer notes
      • Update customer status
      • Update billing details
    • Geo
      • List countries
      • List states
    • Pricing
      • List TLD pricing
      • Update TLD pricing
      • Set TLD featured
      • Apply bulk margin
      • Reorder TLD pricing
    • Domains
      • List domains
        GET
      • Check domain availability
        POST
      • Register a domain
        POST
      • Checkout domain cart (bulk)
        POST
      • Toggle WHOIS privacy
        PATCH
      • Update domain contacts
        PATCH
      • Get domain
        GET
      • Toggle transfer lock
        PATCH
      • Toggle auto-renew
        PATCH
      • Preview renewal price
        GET
      • Renew domain now
        POST
      • Register a domain with Google Workspace
        POST
      • List bundle offers for a name
        GET
      • Register a bundle
        POST
    • Contacts
      • List contacts
      • Create contact
      • Get contact
    • Orders
      • List orders
      • Get order
    • DNS
      • List DNS records
      • Add DNS records
      • Update DNS record
      • Delete DNS record
      • Update nameservers
      • Reset nameservers
      • List DNSSEC records
      • Add DNSSEC record
      • Delete DNSSEC record
    • Wallet
      • Get wallet balance
    • Webhooks
      • workspace.pastdue
      • workspace.expired
      • workspace.txt.failed
      • workspace.renewed
      • workspace.provisioned
      • workspace.txt.ready
      • workspace.txt.propagated
      • workspace.licenses.increased
      • workspace.deleted
      • workspace.failed
      • mailbox.ready
      • mailbox.deleted
      • workspace.dkim.ready
      • workspace.dkim.propagated
      • workspace.domain.swapped
      • Delivered when domain.order.success fires
      • Delivered when domain.order.failed fires
      • Delivered when domain.renewal.success fires
      • Delivered when domain.renewal.failed fires
    • GWS
      • Google Workspace ~ Creation Flow
      • Google Workspace ~ Sandbox Environment
      • Check Workspace Exists
      • Create Workspace
      • List Workspaces
      • Delete Workspace
      • Check DNS Propagation
      • Renew Workspace
      • Change Primary Domain (Beta)
    • Licenses & Mailboxes
      • Create Mailbox
      • List Mailboxes
      • Delete Mailboxes
      • Decrease Seats
  • Health check
    GET
  • Get current partner
    GET
  1. Domains

Register a domain with Google Workspace

Production
https://api.resellerstack.ai/api/v1
Production
https://api.resellerstack.ai/api/v1
POST
/domain/register-with-gws
Register a domain and put Google Workspace on it in one order. The body is the POST /domain/register body plus a required gws (plan, mailboxes). collectionMethod PAYMENT_LINK is not supported on this endpoint yet. For the full end-to-end flow, see the Google Workspace creation flow guide.
Domains that already have Google Workspace are refused. Before anything is created we check whether the domain already belongs to a Google Workspace account (anyone's, the same check as POST /has-workspace). If it does, the whole order is rejected with a 409 - the domain is not registered and nothing is charged.
How it runs. Your wallet is charged for the domain and the first period of seats together. Registration resolves synchronously, exactly like POST /domain/register. As soon as the domain registers, the workspace is created on it. Google setup then takes a few minutes, so a 201 comes back with gws.status: "provisioning".
DNS - two modes, chosen by domain.nameservers (returned as gws.dns):
automatic (no nameservers, the default): the domain is on our nameservers and the Workspace records (verification TXT, MX, DKIM) are written for you. Nothing to do.
manual (you pass your own nameservers): you run DNS. Create the zone at your DNS host, then: (1) on workspace.txt.ready, add the verification TXT, MX and SPF records from its dnsRecords (also in GET /gws) and call POST /dns-propagation-checks with purpose: "domain_verification"; (2) on workspace.dkim.ready, add the DKIM record and call POST /dns-propagation-checks with purpose: "dkim". Setup waits on you - nothing times out - and the seats are already charged, so add the records promptly.
Webhooks to subscribe to. Google setup finishes after this call returns, so subscribe your webhook destination (partner dashboard, Webhooks) to the events below. Workspace events carry the registered domain in data.domain; mailbox.ready carries the mailbox. See the Webhooks section for the envelope, signature check and retries.
EventWhen it firesWhat to do
domain.order.success / domain.order.failedThe registration outcome - the same result this call returns, useful if your request timed out. On domain.order.failed the seats are refunded along with the domain, and no workspace events follow.-
workspace.provisionedThe Google Workspace subscription is active at Google. Mailboxes are not usable yet.-
workspace.txt.readyManual DNS only. The verification record is issued; data.dnsRecords holds the verification TXT, MX and SPF records.Add them at your DNS host, then call POST /dns-propagation-checks with purpose: "domain_verification".
workspace.txt.propagatedThe verification record is live and Google domain verification is running. Both DNS modes.-
workspace.dkim.readyManual DNS only. The DKIM record is issued, in data.dnsRecords.Add it, then call POST /dns-propagation-checks with purpose: "dkim".
workspace.dkim.propagatedThe DKIM record is live. Both DNS modes.-
mailbox.readyOnce per mailbox - the admin first, then each of the others - when it is active, carrying its credentials (the same fields as GET /mailboxes).The workspace is ready to use once every mailbox you ordered has fired this.
workspace.txt.failedA DNS record was not seen live within 4 days of the check starting. The workspace keeps billing.Fix the record, then call POST /dns-propagation-checks again.
workspace.failedGoogle setup failed. The seats are refunded to your wallet and the workspace is cancelled; the domain stays registered.-
If this call already returned gws.status "refunded" or "failed", no workspace events follow: the seats were already refunded, or never charged. To poll instead of (or as well as) listening, use GET /gws?userId=&domain=: the workspace is listed under orderedWithDomain until it exists, then under workspaces with its status and dnsRecords, and GET /mailboxes for each mailbox.
If the domain fails you get a 200 with orderStatus "FAILED" and gws.status: "refunded" - both the domain and the seats go back to your wallet. If the domain registers but the workspace cannot be created, the seats are refunded and the domain is kept.
The API key needs both domains:write and gws:write, and Google Workspace must be enabled on your account. Strongly recommended: send an Idempotency-Key header - see POST /domain/register for why.

Request

Authorization
API Key
Add parameter in header
rs-x-api-key
Example:
rs-x-api-key: ********************
or
Header Params

Body Params application/json

Examples

Responses

🟢200Registration failed
application/json
Request was valid and fully processed, but registration failed - orderStatus is "FAILED" and the workspace was refunded
Bodyapplication/json

🟢201Created
🟠400Bad Request
🟠401Unauthorized
🟠402Payment Required
🟠403Forbidden
🟠404Not Found
🟠409Conflict
🟠422Validation Error
🟠425Too Early
🟠429Too Many Requests
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://api.resellerstack.ai/api/v1/domain/register-with-gws' \
--header 'idempotency-key;' \
--header 'rs-x-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": {
        "domainName": "acme-mail.com",
        "years": 1,
        "premiumPrice": 14.99,
        "autoRenew": true,
        "privacyEnabled": true
    },
    "userId": "b2a1c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "newCustomer": {
        "email": "jane.doe@acme.com",
        "firstName": "Jane",
        "lastName": "Doe",
        "company": "Acme Corp",
        "addressLineOne": "123 Market St",
        "addressLineTwo": "Suite 400",
        "addressLineThree": "Attn: Accounts Payable",
        "city": "San Francisco",
        "state": "CA",
        "country": "US",
        "postalCode": "94103",
        "phoneCc": "+1",
        "phone": "5551234567"
    },
    "collectionMethod": "MANUAL",
    "gws": {
        "planType": "MONTHLY",
        "autoRenew": true,
        "orgName": "Acme Inc",
        "mailboxes": [
            {
                "username": "jane",
                "firstName": "Jane",
                "lastName": "Doe",
                "password": "Correct-Horse-9"
            }
        ]
    }
}'
Response Response Example
200 - Domain failed, workspace refunded
{
    "status": 200,
    "message": "Domain registration failed",
    "data": {
        "cartOrderId": "9c8b7a6d-5e4f-4a3b-9c8d-1e2f3a4b5c6d",
        "orderId": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
        "domainName": "acme-mail.com",
        "orderStatus": "FAILED",
        "error": "Domain name already registered",
        "registeredOn": null,
        "expireOn": null,
        "gws": {
            "requestId": "5d4c3b2a-1f0e-4d9c-8b7a-6f5e4d3c2b1a",
            "status": "refunded",
            "seats": 2,
            "planType": "MONTHLY",
            "dns": "automatic",
            "error": "Domain name already registered"
        }
    }
}
Modified at 2026-11-18 17:27:35
Previous
Renew domain now
Next
List bundle offers for a name
Built with