v1 is deprecated. Please move to API v2 (recommended). v1 keeps working until March 31, 2027, then it stops. See Moving from v1.

Domains

Buy domains

Buy 1 to 30 domains in one payment, charged to the workspace's saved card. No subscription is created: the domains are added to your purchased domains, ready to use in a new order.

POSThttps://server.scaledmail.com/api/v1/buy-domains
Token access
Read and write
Rate limit
15 buy calls per minute per token

This call charges your saved card right away. Always send an Idempotency-Key: if your call times out and you retry without one, you pay twice.

Bought domains show in GET /purchased-domains. Use them in POST /create-order with provider=scaledmail.

Headers

  • Authorizationstringrequired

    Bearer <your API token>. The token needs Read and write access.

  • Idempotency-Keystringoptionalat most 255 characters

    Any unique text per purchase (a UUID works), at most 255 characters. Send the same key again with the same token and you get the first result back, with no second charge.

Query parameters

  • organization_idstringrequired

    Your workspace id (org_...). Must be a workspace this token was made for.

Body

  • domainsstring[]required1 to 30 items

    Domain names to buy, like demo-domain-1.com. Spaces at the ends are removed and case is ignored; no duplicates. A name is one word plus its ending (demo-domain-1.com, demo-domain-1.co.uk), no subdomains. .ai, .ca, .eu and .info can't be bought. Every name must be available, or nothing is bought.

Response (200)

  • successtruerequired
  • messagestringrequired

    Order created successfully.

  • amount_chargednumberrequired

    Total charged to your saved card, in US dollars.

  • total_domainsintegerrequired

    How many domains were bought.

  • domainsobject[]required

    Each domain bought and its price, in the order bought.

    Show child fields
    • domainstringrequired

      The domain name, lower case.

    • pricenumberrequired

      Price of this domain, in US dollars.

Responses

  • 200OK. The card was charged and the domains are yours.
  • 400Not available. One or more names are taken, premium, have an ending we don't sell, or are not a valid name. Nothing is charged.
  • 400Duplicates. The same name is in domains twice (case is ignored).
  • 400Too many or none. domains is missing, empty or has more than 30 names (the same text for all three). If it is not a list: Invalid input: domains must be an array.
  • 400Key too long. The Idempotency-Key header is longer than 255 characters.
  • 400No card. The workspace has no saved card. Add one in the app under Billing.
  • 401No token. The Authorization header is missing or not Bearer <token>.
  • 402Card declined. The bank refused the payment (card_declined), or the card needs a check by its owner that an API call can't do (card_requires_action). The message is the bank's reason. Nothing is charged. Retry with a new Idempotency-Key.
  • 402Earlier call failed. You sent the Idempotency-Key of an earlier call whose payment did not go through.
  • 403Read-only token. The token has Read access only.
  • 403Not allowed. The person who made the token is not an owner or admin of the workspace.
  • 403Not for your account. Your workspace's billing set-up doesn't allow this call. Contact support.
  • 409In progress. A call with the same Idempotency-Key is still running. Wait a moment and send it again.
  • 429Busy. Too many orders are being placed at once. Wait for the Retry-After seconds and send the same call again.
  • 429Rate limited. More than 15 buy calls in a minute. Wait for the Retry-After seconds.
  • 429Too many orders. The person who made the token started more than 30 purchases in the last hour (portal purchases count too). This answer has no details and no Retry-After: try again later. Nothing is charged.
  • 500Server error. Something failed before the card was charged (for example the domain check could not run). Send the same call again with the same Idempotency-Key.
  • 500Needs our team. Something failed after the card may have been charged. Our team was told and will finish or refund the purchase. Don't retry with a new Idempotency-Key.
  • 501Not available. Buying domains or paying by saved card is switched off right now, or the payment could not be started. Nothing is charged.
  • 503Server busy. The database is busy. Wait for the Retry-After seconds (5) and send the same call again with the same Idempotency-Key.