REST API for Developers and Resellers | MozOut - United Kingdom

API for Developers

Manage domains, hosting, servers, SMS and invoices from your own code, with one API.

One API for your whole account

What you do in My MozOut you can also do from your code: register domains, change DNS, create mailboxes, send SMS or pay invoices with your account credit.

  • 147 operations

    Domains, DNS, hosting, e-mail, VPS, SMS and invoices, all at one address.

  • Sandbox and Production

    In Sandbox, reads are real and writes are simulated, at no cost to you.

  • Keys with permissions

    Each key only does what you allow, per area, with read and write kept separate.

  • English or Portuguese

    Always JSON responses, with messages in the language you ask for.

Documentation with a Playground

Every operation has examples and explained fields, and the Playground lets you make test requests in your browser.

What you can do with the API

Operations are grouped by area. Each key gets only the areas it needs, to read, to change or both.

  • Domains

    Register, transfer and renew.

  • DNS

    Zone records and backups.

  • Hosting

    Databases, FTP, cron and SSL.

  • E-mail

    Mailboxes and authentication.

  • VPS servers

    Start, restart and reinstall.

  • SMS

    Send and check the history.

  • Invoices

    View, download and pay.

  • Account

    Account details and users.

  • Catalogue

    Products, extensions and currencies.

  • Support

    Tickets, articles and announcements.

  • Extras

    View and buy extra products.

  • Reseller

    Reseller programmes and accounts.

Who our API is for

Resellers, agencies and developers use the API to automate, from their own code, what they would otherwise do by hand in My MozOut.

  • Businesswoman working on a laptop outdoors

    Resellers and agencies

    Register domains, change DNS and create mailboxes for your customers without opening My MozOut. See also our reseller hosting.

    • POST/v1/domains/register
    • POST/v1/domains/{domain}/dns
  • Developer writing code on a laptop in an office

    Management systems

    Connect your billing system or website: check and pay invoices with your credit balance and send SMS to your customers.

    • POST/v1/invoices/{id}/pay
    • POST/v1/sms/messages
  • Technician in a hard hat analysing data on a tablet in a factory

    Automation and servers

    Use scripts to start, restart or reinstall a VPS server and keep nameservers and DNS always up to date.

    • POST/v1/servers/{id}/restart
    • PUT/v1/domains/{domain}/nameservers

Secure keys, made to measure

Authentication uses only an API key, sent in the Authorization header. Each key has its own rules and can be revoked at any time.

Two developers working on laptops
  • Permissions per area, with read and write kept separate. The riskiest ones are off by default.
  • Expiry after 30, 90 or 365 days, or no expiry.
  • Spending limit per key, so that no key spends more than the amount you choose.
  • Optional IP list: the key only works from the addresses you list.
  • Up to 20 keys per account, each with its own name.
  • Double confirmation: to create a key we ask for your password and a 6-digit code sent by e-mail. The key is shown only once.

A REST API that is simple and predictable

Every operation follows the same rules: JSON, HTTPS, a key in the header and error codes that never change.

  • 147operations
  • 12account areas
  • 300requests per minute, per account
  • 20keys per account
  • JSON everywhere, with field names in English.
  • Clear HTTP status codes (401, 403, 404, 422, 429) and an error code that never changes.
  • X-Correlation-ID in every response, so our support team can find the request.
  • Pagination with page and per_page, up to 100 per page.
  • Visible limits in the X-RateLimit-Limit and X-RateLimit-Remaining headers.
  • Portuguese or English messages, through the Accept-Language header.
# List of domains
GET /v1/domains?page=1&per_page=10
200 OK
{
  "data": [ ... ],
  "meta": { "page": 1, "per_page": 10, "total": 3, "total_pages": 1 }
}

# Key without the required permission
403 Forbidden
{
  "error": {
    "code": "insufficient_scope",
    "message": "...",
    "correlation_id": "..."
  }
}

Your first request in three steps

Start in Sandbox, with no risk of changing your account or being charged, and move to Production when your program is ready.

  1. Create a Sandbox key

    On the API page in My MozOut, choose a name, Sandbox mode and permissions.

  2. Try your requests

    Use the Playground or the example on this page. Writes are simulated and free.

  3. Move to Production

    Create a prod_ key with minimal permissions. Only the key changes.

curl https://api.mozout.com/v1/sms/messages \
  -H "Authorization: Bearer sandbox_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 0f8fad5b-d9cb-469f-a165-70867728950e" \
  -d '{"number": "+258841234567",
       "text": "Your order is ready."}'

Sending an SMS with a Sandbox key: it is validated and answered in JSON, but nothing is sent or charged.

  • 300 requests per minute, per account
  • Safe retries with Idempotency-Key
  • HTTPS only

Sandbox or Production: what changes

Both keys use the same address and the same operations. The difference is what happens when a request changes something.

Sandboxsandbox_Productionprod_
Reads real account dataYesYes
ChangesSimulated, with the X-API-Simulated: true headerReal
ChargesNeverPaid from your credit balance
SMSValidated but not sentSent and deducted from your SMS balance
Addressapi.mozout.com/v1The same
X-API-Mode headersandboxproduction
Best forBuilding and testing safelyYour finished program

F.A.Q API

MozOut

The most frequently asked questions about API keys, modes and limits

Only with an API key, sent with every request in the Authorization: Bearer header. The API does not accept the key in the URL and only answers over HTTPS.

The owner of an account with an active service or domain, on the API page in My MozOut. Each account can have up to 20 keys.

A key is shown only once, when it is created, and we cannot recover it. Revoke it on the API page in My MozOut and create a new one.

Yes, with a Production key that has the domain and purchase permissions; the payment comes from your account's credit balance. Some cases stay in My MozOut, such as .mz and .ao domains of up to 3 characters, .ac.mz, .gov.mz and .mil.mz, and transfers of .mz and .ao domains. See our domain prices.

Yes. When you create the key, enter the list of IPs. Requests from any other address are refused with the ip_not_allowed error.

A sandbox_ key reads the real data of your account, but writes are simulated and never charged. A prod_ key reads and changes your account. The address is the same: the key decides.

Yes. An account can make up to 300 requests per minute, across all its keys. Some operations, such as domain registrations or payments, have their own limits, explained in the documentation.

In a POST request, send a unique code in the Idempotency-Key header. If the connection drops and you repeat the request with the same code within 24 hours, you get the same response and nothing is done twice.

Yes. Give the key the SMS permissions and you can send messages and check the balance, the history and the templates. See the prices on the SMS page.

No. A key never creates other keys, never changes the account password or e-mail and never sees card details. The most sensitive permissions, such as paying or reinstalling a VPS, are turned off by default.

Lightning OFFER

Web Hosting + FREE Domain **

:
:
:
Stay Online!
keyboard_arrow_up Drag Up
Logo MozOut

Premium OFFER

Web Hosting + FREE Domain **

Offer ends in:
:
:
:
Stay Online!
Close