Skip to main content
POST
Swap a domain
Need the difference between standard and premium? How swaps work. Want new inbox names on the same domain? Use POST /swaps/user_names.

Authorizations

Authorization
string
header
default:Bearer pk_test_<your-test-key>
required

Partner API key (pk_live_… or pk_test_…).

Headers

Idempotency-Key
string

Required for Google premium swaps; recommended for other swaps. Reuse the same key and request body after a timeout or server error. The original creation result is replayed, even after the swap has progressed. Keys are unique across the Partner account. Different parameters return 409 idempotency_conflict; an active request returns 409 idempotency_in_progress. Without a key, retries cannot recover the original creation response; check GET /swaps before resubmitting.

Required string length: 1 - 256

Body

application/json
type
enum<string>
required
Available options:
standard,
premium
domain_id
string
required

Domain to replace (dom_…).

replacement_domain
string
required

Replacement domain name.

mailboxes
object[]

Google premium only. Supply one unique username and name per existing inbox; omit to keep the original identities.

Required array length: 1 - 100 elements
forwarding_url
string<uri>

Google premium only. Omit to reuse the original order's forwarding. Must be an http(s) URL whose host has a dot, like https://acme.com. A host with no dot, such as https://localhost, returns 400 invalid_request.

Response

A swap.

data
object
required