1. GWS
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
      • Check domain availability
      • Register a domain
      • Checkout domain cart (bulk)
      • Toggle WHOIS privacy
      • Update domain contacts
      • Get domain
      • Toggle transfer lock
      • Toggle auto-renew
      • Preview renewal price
      • Renew domain now
      • Register a domain with Google Workspace
      • List bundle offers for a name
      • Register a bundle
    • 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
        POST
      • Create Workspace
        POST
      • List Workspaces
        GET
      • Delete Workspace
        DELETE
      • Check DNS Propagation
        POST
      • Renew Workspace
        POST
      • Change Primary Domain (Beta)
        POST
    • Licenses & Mailboxes
      • Create Mailbox
      • List Mailboxes
      • Delete Mailboxes
      • Decrease Seats
  • Health check
    GET
  • Get current partner
    GET
  1. GWS

Google Workspace ~ Sandbox Environment

Overview#

The sandbox lets you exercise the full GWS provisioning lifecycle without touching real Google APIs, making real DNS changes, or charging a wallet. Same endpoints, same webhooks, same payload shapes as production. The only difference is that the side effects are faked.
Use a sandbox API key (rs_test_*) against the sandbox base URL. Keys are issued per partner, and you pass yours in the rs-x-api-key header exactly like a live key.

Supported endpoints#

Every GWS and mailbox endpoint works in the sandbox:
MethodPathNotes
POST/gwsCreate workspace. The domain prefix controls the behaviour.
GET/gwsList workspaces (sandbox rows only)
DELETE/gwsDelete workspace
POST/gws/renewRenew workspace
POST/gws/primary-domainBeta. Swap the workspace's primary domain. Emits the swap webhooks; advance external-DNS with dns-propagation-checks.
POST/create-mailboxAdd mailboxes to an active workspace
GET/mailboxesList mailboxes
DELETE/mailboxesDelete mailboxes
POST/mailboxes/reset-passwordReturns a fabricated password synchronously
POST/decrease-seatDecrease seats
POST/dns-propagation-checksAdvance propagation on external-DNS workspaces

Domain trigger prefixes#

As covered in the provisioning docs, how a GWS workspace provisions depends on who manages the domain's DNS records: either Reseller Stack (if the domain was registered through the platform) or the domain owner (if they brought their own domain). You can test both cases in the sandbox. The domain you pass to POST /gws decides which case the sandbox simulates.
The sandbox reads the prefix of the second-level label, which is the part before the first dot. For example, rs-dns-example.com triggers the RS DNS flow.
PrefixSimulatesWhat you need to do after POST /gws
rs-dns-Domain registered through Reseller Stack (POST /domain/register), so we manage DNSNothing. We write the verification and DKIM records and the workspace provisions end to end.
external-dns- or any unrecognized prefixCustomer brought their own domain from a third-party registrar, so they manage DNSCall POST /dns-propagation-checks twice: once after the verification TXT record is generated, and once after the DKIM record is generated.
RS DNS (rs-dns-)
The sandbox treats the domain as if it was registered through Reseller Stack. We own its DNS and write every record needed for domain verification and DKIM. After your initial POST /gws, you only receive webhooks; there's nothing to call.
External DNS (external-dns-)
The sandbox treats the domain as if the customer owns its DNS. Each time a record is generated, the sandbox pauses until you call POST /dns-propagation-checks to confirm the record is live, then continues. This happens once for the verification TXT record and once for the DKIM record.
Any prefix the sandbox doesn't recognize falls back to the External DNS flow. To be sure you test the RS DNS path, use the rs-dns- prefix exactly.
PrefixBehaviour
rs-dns-RS DNS path. Every stage auto-advances, no dns-propagation-checks calls needed.
external-dns-External DNS path. Pauses after txt_ready and after dkim_ready; resume each with POST /dns-propagation-checks.
gws-fail-Terminal failure. The workspace is accepted (202) then driven straight to status: failed, emitting workspace.failed.
(anything else)Treated as external DNS, same as external-dns-.
Examples
rs-dns-example.com        -> auto-completes in ~50s, no DNS calls
external-dns-example.com  -> pauses twice; you drive each gate
example.com               -> same as external-dns-example.com
gws-fail-example.com      -> fails immediately

Provisioning flow and timing#

Each stage fires on a fixed 10-second delay after the previous one finishes. That mirrors real async webhook delivery, so you can test your webhook handlers and your polling together instead of one at a time.

RS DNS path (rs-dns-*)#

Nothing to do on your end. It runs itself and the workspace is live in about 50 seconds.
Sandbox provisioning, RS DNS path
Webhook order: workspace.provisioned, workspace.txt.propagated, workspace.dkim.propagated, then mailbox.ready per mailbox once the mailboxes activate. The *.ready events never fire here - nothing for the partner to act on.

External DNS path (external-dns-* or any other prefix)#

Same stages, but it parks at two gates so you can play the customer adding records.
Sandbox provisioning, external DNS path
It pauses after txt_ready and after dkim_ready. Resume each one with POST /dns-propagation-checks: purpose: domain_verification for the first gate, purpose: dkim for the second. Everything else auto-advances on the usual 10-second hops.
Webhook order: workspace.provisioned, workspace.txt.ready, (gate), workspace.txt.propagated, workspace.dkim.ready, (gate), workspace.dkim.propagated, mailbox.ready per mailbox.

Failure path (gws-fail-*)#

The request is accepted (202), then the workspace goes straight to status: failed in under a second. You get one webhook: workspace.failed.

Stage timing reference#

StageDelay
provisioned0s (immediate)
txt_ready+10s
txt_propagated+10s
dkim_ready+10s
dkim_propagated+10s
activate_mailboxes+10s
delete_mailboxes+10s
delete_workspace+10s
increase (add mailboxes)0s (immediate)

Scenarios#

Workspace creation#

1. RS DNS: auto-completes. Domain starts with rs-dns-. The workspace activates in ~50s with no DNS-check calls.
Webhooks, in order: workspace.provisioned > workspace.txt.propagated > workspace.dkim.propagated > mailbox.ready (x N)
2. External DNS: gated on your DNS-check calls. Domain starts with external-dns- or any other prefix. The simulator pauses at two points:
1.
Call POST /dns-propagation-checks with purpose: domain_verification to advance to in_progress.
2.
Call POST /dns-propagation-checks with purpose: dkim to advance to active.
Webhooks: workspace.provisioned > workspace.txt.ready > (pause) > workspace.txt.propagated > workspace.dkim.ready > (pause) > workspace.dkim.propagated > mailbox.ready (x N)
workspace.provisioned fires once, at the start. There is no second event at mailbox activation; mailbox.ready (one per mailbox) is the signal that provisioning is done.
3. Provision failure. Domain starts with gws-fail-. The request is accepted (202), then the workspace is immediately driven to status: failed.
Webhooks: workspace.failed
4. Duplicate create returns 409.
5. Bad password (under 12 characters) returns 422.

Mailbox management#

6. Add mailboxes. POST /create-mailbox on an active workspace. New mailboxes activate immediately (0s delay).
Webhooks: workspace.licenses.increased, mailbox.ready (x N new mailboxes)
7. Add mailboxes on a non-active workspace returns 409.
8. Delete mailbox. DELETE /mailboxes. The mailbox moves to deleting, and the row is deleted ~10s later.
Webhooks: mailbox.deleted (x N)
9. Delete the admin mailbox returns 409.
10. Delete an unknown mailbox returns 404.
11. Reset password. POST /mailboxes/reset-password returns a fabricated password synchronously. No webhook.

Seat management#

12. Decrease seats. POST /decrease-seat decrements totalMailboxQuantity. No Google entitlement call is made.

DNS propagation checks#

13. Domain verification check. POST /dns-propagation-checks with purpose: domain_verification advances from txt_verification_pending and enqueues txt_propagated (fires ~10s later).
Response: { "status": "verification_queued", "allPropagated": false }
14. DKIM check. POST /dns-propagation-checks with purpose: dkim advances from in_progress and enqueues dkim_propagated (fires ~10s later).
Response: { "status": "verification_queued", "allPropagated": false }

Workspace lifecycle#

15. Renew. POST /gws/renew resets the subscription to active and extends currentPeriodEnd.
Webhooks: workspace.renewed
16. Delete workspace. DELETE /gws queues deletion. Mailboxes are deleted ~10s later, then the workspace is soft-deleted ~10s after that (~20s total).
Webhooks: mailbox.deleted (x N), workspace.deleted

Primary domain swap#

Beta. POST /gws/primary-domain is in beta and available in the sandbox only; its behaviour may change.
17. Swap primary domain. Promotes new_domain to the workspace's primary domain and migrates the old domain's mailboxes across. Billing doesn't move.
POST /gws/primary-domain
{
  "userId": "b3d6f2a1-4c8e-4f9d-a2b1-7e3d5c9f0a12",
  "current_domain": "example.com",
  "new_domain": "example.org"
}
You get 202 with { "swapId": "d81c7a2e-9b3f-4a6c-8e21-5f0b2c7d1a93", "status": "QUEUED" }, then the swap runs in the background.
Rules
new_domain has to already be a sandbox Google domain owned by the same userId, and it has to differ from current_domain.
Billing is unchanged. The subscription is remapped onto new_domain, not re-charged.
The old mailboxes stick around, flagged swapped. New mailbox rows are created on new_domain as IN_PROGRESS and flip to ACTIVE once DKIM propagates.
Every webhook below carries for_primary_domain_swap: true, so you can route swap events separately.
Which path runs depends on the new_domain prefix, same rule as POST /gws:
PrefixDNSBehaviour
rs-dns-…Platform-managedFully automatic. Each stage fires ~10s after the previous, and there are no *.ready webhooks because there's nothing for you to add.
external-dns-…You managePauses twice. Add each record, then resume with POST /dns-propagation-checks.
RS DNS path (rs-dns-*)
Primary domain swap, RS DNS path
External DNS path (external-dns-*)
Primary domain swap, external DNS path

RS DNS timeline (new_domain is rs-dns-…)#

Fully automatic; each step fires ~10s after the previous.
TimeWhat happensWebhooks fired
T+0s202 returned; verification TXT written(none)
~T+10sTXT propagated; subscription and workspace remapped to new_domainworkspace.txt.propagated, workspace.domain.swapped
~T+20sDKIM record written(none)
~T+30sDKIM propagated; new mailboxes activatedworkspace.dkim.propagated, mailbox.ready (x N)

External DNS timeline (new_domain is external-dns-…)#

Pauses twice so you can add the record, then resume with POST /dns-propagation-checks.
StepTriggerWebhooks fired
1202 returned; verification TXT generatedworkspace.txt.ready (carries the TXT record)
2You add the TXT, then POST /dns-propagation-checks { purpose: "domain_verification" }(queued)
3~10s later: TXT propagated; subscription and workspace remappedworkspace.txt.propagated, workspace.domain.swapped
4~10s later, automatic: DKIM record generatedworkspace.dkim.ready (carries the DKIM record)
5You add the DKIM, then POST /dns-propagation-checks { purpose: "dkim" }(queued)
6~10s later: DKIM propagated; new mailboxes activatedworkspace.dkim.propagated, mailbox.ready (x N)
workspace.domain.swapped is the moment the primary domain actually changes in the DB. From there the subscription, workspace, and new mailbox rows all point at new_domain. The new mailboxes stay IN_PROGRESS until workspace.dkim.propagated, when they flip to ACTIVE and each fires mailbox.ready.
Modified at 2026-10-22 09:07:31
Previous
Google Workspace ~ Creation Flow
Next
Check Workspace Exists
Built with