v1.32.6
OpenAPI 3.0.0

Hostinger API

Overview

The Hostinger API provides a comprehensive set of endpoints that allow developers to interact with Hostinger's services programmatically. This API enables you to manage various aspects of your Hostinger account.

The Hostinger API is a (mostly) RESTful API that uses standard HTTP methods and status codes.

Authentication

The Hostinger API uses tokens for authentication. To authenticate your requests, you need to include a valid bearer token in the Authorization header of your HTTP requests:

Authorization: Bearer YOUR_API_TOKEN

API tokens for individual users can be created and managed from the Account page of the Hostinger Panel. Tokens will have same permissions as the owning user. Optionally, tokens can be set to expire after a certain period of time.

Rate Limiting

To ensure fair usage and prevent abuse, the API enforces rate limits on the number of requests that can be made within a certain time period. If you exceed the rate limit, you will receive a 429 Too Many Requests response. Rate limit headers are included in the response to help you manage your requests. Your IP address might get temporarily blocked if you exceed the rate limit multiple times.

Parameters

All requests sent to API must have the content type application/json. POST, PUT, PATCH methods may include a JSON object in the request body. Documentation provides required structure and examples of the object. Some endpoints require path parameters. These parameters are included in the URL path and are marked with curly braces.

Pagination

Some endpoints return a large number of items. To make these responses more manageable, the API uses pagination. By default, the API returns50 items per page.

The page number can be specified using the page query parameter, for example: /api/vps/v1/public-keys?page=2

Errors

The Hostinger API uses standard HTTP status codes to indicate the success or failure of a request. In case of an error, the API will return a JSON response with an error field, containing a human-readable error message. Error responses also contain a correlation_id field which can be used to identify the request in case you need to contact support.

SDKs & Tools

To help you get started with the Hostinger API,we provide SDKs and tools in various programming languages. The usage & documentation for each SDK can be found in the respective repositories:

Change log

For information on the latest changes to the API, please refer to the change log.

Support

If you have any questions, feedback or feature requests, please create an issue or discussion on the repository.

For any support take a look at our Github Repository, dedicated to the Hostinger API.

Client Libraries

Install official CLI tool. Examples and usage instructions can be found in our Github repository.

hostinger vps vm list

Catalog

Access a comprehensive catalog of service plans and subscription options, complete with detailed pricing and features.

Catalog Operations

Get catalog item list

Retrieve catalog items available for order.

Prices in catalog items is displayed as cents (without floating point), e.g: float 17.99 is displayed as integer 1799.

Use this endpoint to view available services and pricing before placing orders.

Query Parameters
  • category
    Type: string enum

    Filter catalog items by category

    values
    • DOMAIN
    • VPS
    • EMAIL
  • name
    Type: string

    Filter catalog items by name. Use * for wildcard search, e.g. .COM* to find .com domain

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/billing/v1/catalog
curl /api/billing/v1/catalog \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": "hostingercom-vps-kvm2",
    "name": "KVM 2",
    "category": "VPS",
    "metadata": {
      "field": "value"
    },
    "prices": [
      {
        "id": "hostingercom-vps-kvm2-usd-1m",
        "name": "KVM 2 (billed every month)",
        "currency": "USD",
        "price": 1799,
        "first_period_price": 899,
        "period": 1,
        "period_unit": "day"
      }
    ]
  }
]

Orders

Initiate and track new service orders seamlessly. This category streamlines the process of purchasing Hostinger services, enabling efficient management of order details.

Create purchase order

Create a purchase order for any Hostinger product.

This unified endpoint places an order for one or more catalog items and works across all Hostinger products, leveraging the existing billing infrastructure. Use the catalog endpoint to look up the item_id values available for purchase.

If no payment method is provided, your default payment method will be used automatically.

This endpoint only places the order. Product-specific provisioning (e.g. VPS setup or domain registration) is not performed here — once the order completes, use the relevant product endpoints or hPanel to finalize setup.

Use this endpoint to purchase any product available in the catalog.

Body·
required
application/json
  • items
    Type: array object[]
    required

    Catalog price items to purchase

  • coupons
    Type: array

    Discount coupon codes

  • payment_method_id
    Type: integer

    Payment method ID, default will be used if not provided

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/billing/v1/orders
curl /api/billing/v1/orders \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "payment_method_id": 1327362,
  "items": [
    {
      "item_id": "hostingercom-vps-kvm2-usd-1m",
      "quantity": 1
    }
  ],
  "coupons": []
}'
{
  "id": 2957086,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "status": "completed",
  "currency": "USD",
  "subtotal": 899,
  "total": 1088,
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "company": null,
    "address_1": null,
    "address_2": null,
    "city": null,
    "state": null,
    "zip": null,
    "country": "NL",
    "phone": null,
    "email": "john@doe.tld"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Payment methods

Review and manage the payment methods linked to your Hostinger account. Enjoy a secure and convenient overview for handling billing and transactions.

Set default payment method

Set the default payment method for your account.

Use this endpoint to configure the primary payment method for future orders.

Path Parameters
  • paymentMethodId
    Type: integer
    required

    Payment method ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/billing/v1/payment-methods/{paymentMethodId}
curl /api/billing/v1/payment-methods/9693613 \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Delete payment method

Delete a payment method from your account.

Use this endpoint to remove unused payment methods from user accounts.

Path Parameters
  • paymentMethodId
    Type: integer
    required

    Payment method ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/billing/v1/payment-methods/{paymentMethodId}
curl /api/billing/v1/payment-methods/9693613 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get payment method list

Retrieve available payment methods that can be used for placing new orders.

If you want to add new payment method, please use hPanel.

Use this endpoint to view available payment options before creating orders.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/billing/v1/payment-methods
curl /api/billing/v1/payment-methods \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 6523,
    "name": "Credit Card",
    "identifier": "1234*****6464",
    "payment_method": "card",
    "is_default": true,
    "is_expired": false,
    "is_suspended": false,
    "created_at": "2025-02-27T11:54:22Z",
    "expires_at": "2025-03-27T11:54:22Z"
  }
]

Subscriptions

Manage your account's subscriptions by retrieving lists of active and expired plans along with details such as activation and expiration dates.

Get subscription list

Retrieve a list of all subscriptions associated with your account.

Use this endpoint to monitor active services and billing status.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/billing/v1/subscriptions
curl /api/billing/v1/subscriptions \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": "Azz36nUfKX1S1MSF",
    "name": "KVM 1",
    "status": "active",
    "billing_period": 1,
    "billing_period_unit": "day",
    "currency_code": "USD",
    "total_price": 1799,
    "renewal_price": 1799,
    "is_auto_renewed": true,
    "created_at": "2025-02-27T11:54:22Z",
    "expires_at": "2025-03-27T11:54:22Z",
    "next_billing_at": "2025-02-28T11:54:22Z"
  }
]

Disable auto-renewal

Disable auto-renewal for a subscription.

Use this endpoint when disable auto-renewal for a subscription.

Path Parameters
  • subscriptionId
    Type: string
    required

    Subscription ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable
curl /api/billing/v1/subscriptions/Cxy353Uhl1xC54pG6/auto-renewal/disable \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "Azz36nUfKX1S1MSF",
  "name": "KVM 1",
  "status": "active",
  "billing_period": 1,
  "billing_period_unit": "day",
  "currency_code": "USD",
  "total_price": 1799,
  "renewal_price": 1799,
  "is_auto_renewed": true,
  "created_at": "2025-02-27T11:54:22Z",
  "expires_at": "2025-03-27T11:54:22Z",
  "next_billing_at": "2025-02-28T11:54:22Z"
}

Enable auto-renewal

Enable auto-renewal for a subscription.

Use this endpoint when enable auto-renewal for a subscription.

Path Parameters
  • subscriptionId
    Type: string
    required

    Subscription ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for patch/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable
curl /api/billing/v1/subscriptions/Cxy353Uhl1xC54pG6/auto-renewal/enable \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "Azz36nUfKX1S1MSF",
  "name": "KVM 1",
  "status": "active",
  "billing_period": 1,
  "billing_period_unit": "day",
  "currency_code": "USD",
  "total_price": 1799,
  "renewal_price": 1799,
  "is_auto_renewed": true,
  "created_at": "2025-02-27T11:54:22Z",
  "expires_at": "2025-03-27T11:54:22Z",
  "next_billing_at": "2025-02-28T11:54:22Z"
}

Renew subscription

Create a renewal order for an existing Hostinger subscription.

This endpoint places a renewal order for a single subscription, leveraging the existing billing infrastructure. Use the subscriptions endpoint to look up the subscriptionId values available for renewal.

If no payment method is provided, your default payment method will be used automatically.

Use this endpoint to renew any subscription available in your account.

Path Parameters
  • subscriptionId
    Type: string
    required

    Subscription ID

Body·
application/json
  • coupons
    Type: array

    Discount coupon codes

  • payment_method_id
    Type: integer

    Payment method ID, default will be used if not provided

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/billing/v1/subscriptions/{subscriptionId}/renew
curl /api/billing/v1/subscriptions/Cxy353Uhl1xC54pG6/renew \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "payment_method_id": 1327362,
  "coupons": []
}'
{
  "id": 2957086,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "status": "completed",
  "currency": "USD",
  "subtotal": 899,
  "total": 1088,
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "company": null,
    "address_1": null,
    "address_2": null,
    "city": null,
    "state": null,
    "zip": null,
    "country": "NL",
    "phone": null,
    "email": "john@doe.tld"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Availability

Check the availability of domain names across multiple TLDs. This category allows you to verify if a specific domain name is available for registration, and to get AI generated name suggestions when the name you wanted is already taken.

Suggest domain names from a description

Suggest available domain names based on a free-text description of your project.

Suggestions are generated by an AI model, so they differ between calls.

Endpoint has rate limit of 90 requests per minute.

Use this endpoint to find a domain name when you only know what the website is about.

Body·
required
application/json
  • description
    Type: string
    min length:  
    2
    max length:  
    1000
    required

    Free-text description of the project the domain is needed for

  • limit
    Type: integer
    required

    Amount of domain names to suggest

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/availability/alternatives-from-description
curl /api/domains/v1/availability/alternatives-from-description \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "description": "A bakery in Vilnius selling sourdough bread and pastries",
  "limit": 10
}'
[
  "mydomain.tld"
]

Suggest domain names from a domain

Suggest available domain names based on a domain name you already have in mind.

Suggestions are generated by an AI model, so they differ between calls.

Endpoint has rate limit of 90 requests per minute.

Use this endpoint when the domain you wanted is taken and you need close alternatives.

Body·
required
application/json
  • domain
    Type: string
    min length:  
    1
    max length:  
    255
    required

    Domain name to base the suggestions on

  • limit
    Type: integer
    required

    Amount of domain names to suggest

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/availability/alternatives-from-domain
curl /api/domains/v1/availability/alternatives-from-domain \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "mydomain",
  "limit": 10
}'
[
  "mydomain.tld"
]

Check domain availability

Check availability of domain names across multiple TLDs.

Multiple TLDs can be checked at once. If you want alternative domains with response, provide only one TLD and set with_alternatives to true. TLDs should be provided without leading dot (e.g. com, net, org).

Endpoint has rate limit of 90 requests per minute.

Use this endpoint to verify domain availability before purchase.

Body·
required
application/json
  • domain
    Type: string
    required

    Domain name (without TLD)

  • tlds
    Type: array string[]
    required

    TLDs list

  • with_alternatives
    Type: boolean

    Should response include alternatives

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/availability
curl /api/domains/v1/availability \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "mydomain",
  "tlds": [
    "com",
    "net",
    "org"
  ],
  "with_alternatives": true
}'
[
  {
    "domain": "mydomain.tld",
    "is_available": true,
    "is_alternative": false,
    "restriction": null
  }
]

Forwarding

Domain forwarding or redirect is an easy way to direct your website visitors to another site or page, making it simple to maintain your brand and keep your visitors engaged.

Get domain forwarding

Retrieve domain forwarding data.

Use this endpoint to view current redirect configuration for domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/forwarding/{domain}
curl /api/domains/v1/forwarding/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Update domain forwarding

Update domain forwarding configuration.

Use this endpoint to modify existing redirect configuration for domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • redirect_type
    Type: string enum
    required

    Redirect type

    values
    • 301

      Permanent

    • 302

      Temporary

  • redirect_url
    Type: string
    required

    URL to forward domain to

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/forwarding/{domain}
curl /api/domains/v1/forwarding/mydomain.tld \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url"
}'
{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Delete domain forwarding

Delete domain forwarding data.

Use this endpoint to remove redirect configuration from domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/forwarding/{domain}
curl /api/domains/v1/forwarding/mydomain.tld \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Create domain forwarding

Create domain forwarding configuration.

Use this endpoint to set up domain redirects to other URLs.

Body·
required
application/json
  • domain
    Type: string
    required

    Domain name

  • redirect_type
    Type: string enum
    required

    Redirect type

    values
    • 301

      Permanent

    • 302

      Temporary

  • redirect_url
    Type: string
    required

    URL to forward domain to

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/forwarding
curl /api/domains/v1/forwarding \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url"
}'
{
  "domain": "mydomain.tld",
  "redirect_type": "301",
  "redirect_url": "https://forward.to.my.url",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Move

Move domains between Hostinger accounts. This category includes endpoints for initiating and cancelling moves of your own domains to another account, and for accepting or rejecting moves initiated towards your account. A move changes which Hostinger account owns the domain and does not involve a registrar transfer.

Get incoming domain move

Retrieve the incoming move for a specified domain.

Returns 404 when no account is moving this domain to you.

Use this endpoint to check whether a domain addressed to you is still waiting to be accepted.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Query Parameters
  • force_sync
    Type: boolean

    Re-check the move against the registry before responding. Only has an effect while the move is in the activating status.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/move/incoming/{domain}
curl /api/domains/v1/move/incoming/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "initiated",
  "created_at": "2026-08-04T10:00:00Z",
  "updated_at": "2026-08-04T10:00:00Z"
}

Accept incoming domain move

Accept an incoming move for a specified domain.

The provided WHOIS profiles become the contacts of the domain, so they must belong to your account and satisfy the requirements of the TLD. Only the contact types the domain actually uses are applied, but all four profile IDs have to be provided.

The move has to still be waiting for your decision, already accepted moves cannot be accepted again.

Accepting does not complete the move. A confirmation email is sent to the email address of the new owner contact, and the domain changes hands only after the change is confirmed from it. Until then the move stays in the activating status, which can be followed with the incoming move endpoint.

Use this endpoint to take ownership of a domain offered to you.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • domain_contacts
    Type: object
    required

    WHOIS profiles of the accepting account. Only the contact types required by the TLD are applied, but all four IDs must be provided.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/move/incoming/{domain}
curl /api/domains/v1/move/incoming/mydomain.tld \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain_contacts": {
    "owner_id": 614698,
    "admin_id": 114698,
    "billing_id": 154698,
    "tech_id": 524248
  }
}'
{
  "message": "Request accepted"
}

Reject incoming domain move

Reject an incoming move for a specified domain.

The domain stays in the account which initiated the move. Moves you have already accepted cannot be rejected anymore.

Use this endpoint to decline a domain you do not want to take over.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/move/incoming/{domain}
curl /api/domains/v1/move/incoming/mydomain.tld \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get incoming domain move list

Retrieve all domains other Hostinger accounts are moving to your account.

Moves of every status are returned, including the ones which already completed.

Use this endpoint to find domains waiting for you to accept them.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/move/incoming
curl /api/domains/v1/move/incoming \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "domain": "mydomain.tld",
    "status": "initiated",
    "created_at": "2026-08-04T10:00:00Z",
    "updated_at": "2026-08-04T10:00:00Z"
  }
]

Get outgoing domain move

Retrieve the outgoing move for a specified domain.

Returns 404 when the domain has no move in progress.

Use this endpoint to track the status of a move you have initiated for a single domain.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/move/outgoing/{domain}
curl /api/domains/v1/move/outgoing/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "initiated",
  "created_at": "2026-08-04T10:00:00Z",
  "updated_at": "2026-08-04T10:00:00Z"
}

Start outgoing domain move

Initiate a move of a specified domain to another Hostinger account.

The receiving account has to already exist and accept the move before the domain changes hands.

The domain must be active. The subscription it belongs to is resolved automatically, and the request is rejected with a 404 status code when the domain has no domain subscription of its own.

Domains protected by premium protection require an additional verification step, such requests are rejected with a 428 status code.

Use this endpoint to hand a domain over to another Hostinger user.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • new_customer_email
    Type: string
    required

    Email address of the Hostinger account receiving the domain

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/move/outgoing/{domain}
curl /api/domains/v1/move/outgoing/mydomain.tld \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "new_customer_email": "new-owner@example.com"
}'
{
  "message": "Request accepted"
}

Cancel outgoing domain move

Cancel an outgoing move for a specified domain.

The move can only be cancelled while the receiving account has not accepted it yet. The domain stays in your account.

Use this endpoint to withdraw a move you no longer want to complete.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/move/outgoing/{domain}
curl /api/domains/v1/move/outgoing/mydomain.tld \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get outgoing domain move list

Retrieve all domains you are moving to other Hostinger accounts.

Only moves which have not completed yet are returned.

Use this endpoint to track moves you have initiated and the accounts they are addressed to.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/move/outgoing
curl /api/domains/v1/move/outgoing \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "domain": "mydomain.tld",
    "status": "initiated",
    "created_at": "2026-08-04T10:00:00Z",
    "updated_at": "2026-08-04T10:00:00Z"
  }
]

Portfolio

Get domain authorization code

Retrieve the authorization (EPP) code for a specified domain so it can be transferred away from Hostinger to another registrar.

Requesting a new code invalidates any code retrieved previously.

Use this endpoint to obtain the code required to transfer a domain to another registrar.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/portfolio/{domain}/auth-code
curl /api/domains/v1/portfolio/mydomain.tld/auth-code \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "auth_code": "RN0000"
}

Claim free domain

Claim a free domain available on your account and register it.

Unlike purchasing a domain, this consumes a free domain you already have, so no payment method is required.

A successful response means the domain is registered. If registration fails, login to hPanel and check domain registration status.

If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account.

Some TLDs require additional_details to be provided and these will be validated before claiming.

Requests which cannot be fulfilled are rejected with an error code in the response body, for example 2037 when no free domain is available.

Use this endpoint to register a domain using a free domain from your account.

Body·
required
application/json
  • domain
    Type: string
    required

    Domain name

  • additional_details
    Type: object

    Additional registration data, possible values depends on TLD

  • domain_contacts
    Type: object

    Domain contact information

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/portfolio/claim
curl /api/domains/v1/portfolio/claim \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "my-new-domain.tld",
  "domain_contacts": {
    "owner_id": 741288,
    "admin_id": 546123,
    "billing_id": 741288,
    "tech_id": 741288
  },
  "additional_details": {}
}'
{
  "domain": "mydomain.tld",
  "status": "active",
  "created_at": "2026-08-05T10:14:22Z"
}

Enable domain lock

Enable domain lock for the domain.

When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.

Use this endpoint to secure domains against unauthorized transfers.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/portfolio/{domain}/domain-lock
curl /api/domains/v1/portfolio/mydomain.tld/domain-lock \
  --request PUT \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Disable domain lock

Disable domain lock for the domain.

Domain lock needs to be disabled before transferring the domain to another registrar.

Use this endpoint to prepare domains for transfer to other registrars.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/portfolio/{domain}/domain-lock
curl /api/domains/v1/portfolio/mydomain.tld/domain-lock \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get domain details

Retrieve detailed information for specified domain.

Use this endpoint to view comprehensive domain configuration and status.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/portfolio/{domain}
curl /api/domains/v1/portfolio/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "active",
  "message": null,
  "is_privacy_protection_allowed": true,
  "is_privacy_protected": false,
  "is_lockable": true,
  "is_locked": true,
  "name_servers": {
    "ns1": "ns1.example.tld",
    "ns2": "ns2.example.tld"
  },
  "child_name_servers": {
    "ns1.example.tld": [
      "258.231.55.321",
      "258.231.55.322"
    ]
  },
  "domain_contacts": {
    "admin_id": 114698,
    "owner_id": 614698,
    "billing_id": 154698,
    "tech_id": 524248
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z",
  "60_days_lock_expires_at": "2025-04-27T11:54:22Z",
  "registered_at": "2025-02-27T12:54:22Z",
  "expires_at": "2025-03-27T11:54:22Z"
}

Get domain list

Retrieve all domains associated with your account.

Use this endpoint to view user's domain portfolio.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/portfolio
curl /api/domains/v1/portfolio \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 13632,
    "domain": "mydomain.tld",
    "type": "domain",
    "status": "active",
    "created_at": "2025-02-27T11:54:22Z",
    "expires_at": "2025-03-27T11:54:22Z"
  }
]

Purchase new domain

Purchase and register a new domain name.

If registration fails, login to hPanel and check domain registration status.

If no payment method is provided, your default payment method will be used automatically.

If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account.

Some TLDs require additional_details to be provided and these will be validated before completing purchase.

Use this endpoint to register new domains for users.

Body·
required
application/json
  • domain
    Type: string
    required

    Domain name

  • item_id
    Type: string
    required

    Catalog price item ID

  • additional_details
    Type: object

    Additional registration data, possible values depends on TLD

  • coupons
    Type: array

    Discount coupon codes

  • domain_contacts
    Type: object

    Domain contact information

  • payment_method_id
    Type: integer

    Payment method ID, default will be used if not provided

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/portfolio
curl /api/domains/v1/portfolio \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "my-new-domain.tld",
  "item_id": "hostingercom-domain-com-usd-1y",
  "payment_method_id": 1327362,
  "domain_contacts": {
    "owner_id": 741288,
    "admin_id": 546123,
    "billing_id": 741288,
    "tech_id": 741288
  },
  "additional_details": {},
  "coupons": []
}'
{
  "id": 2957086,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "status": "completed",
  "currency": "USD",
  "subtotal": 899,
  "total": 1088,
  "billing_address": {
    "first_name": "John",
    "last_name": "Doe",
    "company": null,
    "address_1": null,
    "address_2": null,
    "city": null,
    "state": null,
    "zip": null,
    "country": "NL",
    "phone": null,
    "email": "john@doe.tld"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-27T11:54:22Z"
}

Enable privacy protection

Enable privacy protection for the domain.

When privacy protection is enabled, domain owner's personal information is hidden from public WHOIS database.

Use this endpoint to protect domain owner's personal information from public view.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/portfolio/{domain}/privacy-protection
curl /api/domains/v1/portfolio/mydomain.tld/privacy-protection \
  --request PUT \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Disable privacy protection

Disable privacy protection for the domain.

When privacy protection is disabled, domain owner's personal information is visible in public WHOIS database.

Use this endpoint to make domain owner's information publicly visible.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/portfolio/{domain}/privacy-protection
curl /api/domains/v1/portfolio/mydomain.tld/privacy-protection \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get domain renewal information

Retrieve renewal information for a specified domain, including its status and current expiration date.

Use this endpoint to build renewal automation and expiry monitoring for a single domain.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/portfolio/{domain}/renewal
curl /api/domains/v1/portfolio/mydomain.tld/renewal \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "Active",
  "expires_at": "2027-05-25 13:53:04"
}

Update domain nameservers

Set nameservers for a specified domain.

Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.

Use this endpoint to configure custom DNS hosting for domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • ns1
    Type: string
    required

    First name server

  • ns2
    Type: string
    required

    Second name server

  • ns3
    Type: string

    Third name server

  • ns4
    Type: string

    Fourth name server

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/portfolio/{domain}/nameservers
curl /api/domains/v1/portfolio/mydomain.tld/nameservers \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "ns1": "ns1.some-nameserver.tld",
  "ns2": "ns2.some-nameserver.tld",
  "ns3": "ns3.some-nameserver.tld",
  "ns4": "ns4.some-nameserver.tld"
}'
{
  "message": "Request accepted"
}

Transfer

Claim free domain transfer

Claim a free domain transfer available on your account and start the transfer.

Unlike purchasing a transfer, this consumes a free domain transfer you already have, so no payment method is required.

Before making request, unlock the domain at the current registrar and get its authorization code. The transfer is validated first, so domains which cannot be transferred are rejected before the free domain transfer is consumed.

A successful response means the transfer has been started. Completion depends on the current registrar and can be followed with the transfer list endpoint.

If no WHOIS information is provided, default contact information for that TLD will be used. Before making request, ensure WHOIS information for desired TLD exists in your account.

Requests which cannot be fulfilled are rejected with an error code in the response body.

Use this endpoint to transfer a domain using a free domain transfer from your account.

Body·
required
application/json
  • auth_code
    Type: string
    required

    Authorization code from the current registrar

  • domain
    Type: string
    required

    Domain name

  • domain_contacts
    Type: object

    Domain contact information

  • should_keep_ns
    Type: boolean

    Keep the existing nameservers of the domain

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/transfers/claim
curl /api/domains/v1/transfers/claim \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "my-new-domain.tld",
  "auth_code": "Auth123Code456",
  "domain_contacts": {
    "owner_id": 741288,
    "admin_id": 546123,
    "billing_id": 741288,
    "tech_id": 741288
  },
  "should_keep_ns": true
}'
{
  "domain": "mydomain.tld",
  "status": "Completed",
  "initiated_at": "2026-03-19T08:07:49Z",
  "completed_at": "2026-03-24T08:15:01Z"
}

Get transfer

Retrieve the transfer for a specified domain.

Use this endpoint to track an incoming or outgoing registrar transfer and its status.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/transfers/{domain}
curl /api/domains/v1/transfers/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "Completed",
  "initiated_at": "2026-03-19T08:07:49Z",
  "completed_at": "2026-03-24T08:15:01Z"
}

Get transfer list

Retrieve all domain transfers in your portfolio.

Use this endpoint to monitor incoming and outgoing registrar transfers across your domains.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/transfers
curl /api/domains/v1/transfers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "domain": "mydomain.tld",
    "status": "Completed",
    "initiated_at": "2026-03-19T08:07:49Z",
    "completed_at": "2026-03-24T08:15:01Z"
  }
]

WHOIS

Manage WHOIS contact profiles for your domains. This category includes endpoints for creating, updating, deleting, and retrieving WHOIS profiles. WHOIS profile stores registration data for domain names and is required for domain registration.

Get pending IRTP verification

Retrieve a pending IRTP verification for a domain.

Both the old and new registrant must confirm it before the WHOIS change takes effect.

Use this endpoint to check the status of a WHOIS change awaiting registrant confirmation.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/irtp/{domain}
curl /api/domains/v1/irtp/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "mydomain.tld",
  "status": "pending",
  "old_confirmed_at": "2026-03-19T08:07:49Z",
  "new_confirmed_at": "2026-03-19T08:07:49Z",
  "old_whois_profile_email": "old-registrant@example.com",
  "new_whois_profile_email": "new-registrant@example.com",
  "expires_at": "2026-03-24T08:07:49Z"
}

Cancel pending IRTP verification

Cancel a pending IRTP verification.

Use this endpoint to back out of a WHOIS change that is stuck waiting on registrant confirmation, for example when the confirmation email cannot be received, without waiting out the 5-day expiry.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/irtp/{domain}
curl /api/domains/v1/irtp/mydomain.tld \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Change WHOIS profile for domain

Change WHOIS contact profile for a domain.

Repoints the given contact roles to a new WHOIS profile and submits the change to the registry. The profile currently assigned to those roles is resolved automatically; the request fails if the given roles are not all on the same profile today.

Changing transfer sensitive fields on the owner contact starts an IRTP verification.

The change is processed asynchronously.

Use this endpoint to move a registered domain onto different contact information.

Body·
required
application/json
  • change_for
    Type: array string[] …4enum
    required

    Contact roles to repoint to the new WHOIS profile

    values
    • owner
    • admin
    • billing
    • tech
  • domain
    Type: string
    required

    Domain name

  • new_whois_id
    Type: integer
    required

    WHOIS profile ID to assign to the domain

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/whois/change
curl /api/domains/v1/whois/change \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "new_whois_id": 131502,
  "domain": "mydomain.tld",
  "change_for": [
    "owner",
    "admin"
  ]
}'
{
  "message": "Request accepted"
}

Set WHOIS profile as default

Set WHOIS contact profile as default.

The default profile is pre-selected for the TLD it belongs to when registering new domains.

Use this endpoint to avoid picking contact information for every registration.

Path Parameters
  • whoisId
    Type: integer
    required

    WHOIS ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for put/api/domains/v1/whois/default/{whoisId}
curl /api/domains/v1/whois/default/564651 \
  --request PUT \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Unset default WHOIS profile

Unset WHOIS contact profile as default.

The profile itself is kept, it is only no longer pre-selected for its TLD.

Use this endpoint to stop reusing contact information for new registrations.

Path Parameters
  • whoisId
    Type: integer
    required

    WHOIS ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/whois/default/{whoisId}
curl /api/domains/v1/whois/default/564651 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get WHOIS profile

Retrieve a WHOIS contact profile.

Use this endpoint to view domain registration contact information.

Path Parameters
  • whoisId
    Type: integer
    required

    WHOIS ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/whois/{whoisId}
curl /api/domains/v1/whois/564651 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 746263,
  "tld": "com",
  "country": "NL",
  "entity_type": "individual",
  "whois_details": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@doe.tld"
  },
  "tld_details": {},
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Delete WHOIS profile

Delete WHOIS contact profile.

Use this endpoint to remove unused contact profiles from account.

Path Parameters
  • whoisId
    Type: integer
    required

    WHOIS ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/domains/v1/whois/{whoisId}
curl /api/domains/v1/whois/564651 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get WHOIS profile list

Retrieve WHOIS contact profiles.

Use this endpoint to view available contact profiles for domain registration.

Query Parameters
  • tld
    Type: string

    Filter by TLD (without leading dot)

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/whois
curl /api/domains/v1/whois \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 746263,
    "tld": "com",
    "country": "NL",
    "entity_type": "individual",
    "whois_details": {
      "first_name": "John",
      "last_name": "Doe",
      "email": "john@doe.tld"
    },
    "tld_details": {},
    "created_at": "2025-02-27T11:54:22Z",
    "updated_at": "2025-03-19T11:54:22Z"
  }
]

Create WHOIS profile

Create WHOIS contact profile.

Use this endpoint to add new contact information for domain registration.

Body·
required
application/json
  • country
    Type: string
    required

    ISO 3166 2-letter country code

  • entity_type
    Type: string enum
    required

    Legal entity type

    values
    • individual
    • organization
  • tld
    Type: string
    required

    TLD of the domain (without leading dot)

  • whois_details
    Type: object
    required

    WHOIS details

  • tld_details
    Type: object

    TLD details

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/domains/v1/whois
curl /api/domains/v1/whois \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "tld": "com",
  "country": "NL",
  "entity_type": "individual",
  "tld_details": {},
  "whois_details": {}
}'
{
  "id": 746263,
  "tld": "com",
  "country": "NL",
  "entity_type": "individual",
  "whois_details": {
    "first_name": "John",
    "last_name": "Doe",
    "email": "john@doe.tld"
  },
  "tld_details": {},
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Get WHOIS profile usage

Retrieve domain list where provided WHOIS contact profile is used.

Use this endpoint to view which domains use specific contact profiles.

Path Parameters
  • whoisId
    Type: integer
    required

    WHOIS ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/domains/v1/whois/{whoisId}/usage
curl /api/domains/v1/whois/564651/usage \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  "mydomain1.tld",
  "mydomain2.tld"
]

Snapshot

Manage DNS snapshots for your domains. This category includes endpoints for viewing and restoring snapshots of your domain DNS zone. Snapshot is a point-in-time copy of your DNS zone, allowing you to restore your domain's DNS settings to a previous state.

Get DNS snapshot

Retrieve particular DNS snapshot with contents of DNS zone records.

Use this endpoint to view historical DNS configurations for domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

  • snapshotId
    Type: integer
    required

    Snapshot ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/dns/v1/snapshots/{domain}/{snapshotId}
curl /api/dns/v1/snapshots/mydomain.tld/53513053 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 5341,
  "reason": "Zone records update request",
  "snapshot": [
    {
      "name": "www",
      "records": [
        {
          "content": "mydomain.tld.",
          "is_disabled": false
        }
      ],
      "ttl": 14400,
      "type": "A"
    }
  ],
  "created_at": "2025-02-27T11:54:22Z"
}

Get DNS snapshot list

Retrieve DNS snapshots for a domain.

Use this endpoint to view available DNS backup points for restoration.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/dns/v1/snapshots/{domain}
curl /api/dns/v1/snapshots/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 5341,
    "reason": "Zone records update request",
    "created_at": "2025-02-27T11:54:22Z"
  }
]

Restore DNS snapshot

Restore DNS zone to the selected snapshot.

Use this endpoint to revert domain DNS to a previous configuration.

Path Parameters
  • domain
    Type: string
    required

    Domain name

  • snapshotId
    Type: integer
    required

    Snapshot ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/dns/v1/snapshots/{domain}/{snapshotId}/restore
curl /api/dns/v1/snapshots/mydomain.tld/53513053/restore \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Zone

Manage DNS zones and records for your domains. This category includes endpoints for retrieving, updating, deleting DNS zone and it's associated records. The DNS zone will be created once you purchase new domain at Hostinger.

Get DNS records

Retrieve DNS zone records for a specific domain.

Use this endpoint to view current DNS configuration for domain management.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/dns/v1/zones/{domain}
curl /api/dns/v1/zones/mydomain.tld \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "name": "www",
    "records": [
      {
        "content": "mydomain.tld.",
        "is_disabled": false
      }
    ],
    "ttl": 14400,
    "type": "A"
  }
]

Update DNS records

Update DNS records for the selected domain.

Using overwrite = true will replace existing records with the provided ones. Otherwise existing records will be updated and new records will be added.

Use this endpoint to modify domain DNS configuration.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • zone
    Type: array object[]
    required
  • overwrite
    Type: boolean

    If true, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/dns/v1/zones/{domain}
curl /api/dns/v1/zones/mydomain.tld \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "overwrite": true,
  "zone": [
    {
      "name": "www",
      "records": [
        {
          "content": "mydomain.tld."
        }
      ],
      "ttl": 14400,
      "type": "A"
    }
  ]
}'
{
  "message": "Request accepted"
}

Delete DNS records

Delete DNS records for the selected domain.

To filter which records to delete, add the name of the record and type to the filter. Multiple filters can be provided with single request.

If you have multiple records with the same name and type, and you want to delete only part of them, refer to the Update zone records endpoint.

Use this endpoint to remove specific DNS records from domains.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • filters
    Type: array object[]
    required

    Filter records for deletion

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/dns/v1/zones/{domain}
curl /api/dns/v1/zones/mydomain.tld \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "filters": [
    {
      "name": "@",
      "type": "A"
    }
  ]
}'
{
  "message": "Request accepted"
}

Reset DNS records

Reset DNS zone to the default records.

Use this endpoint to restore domain DNS to original configuration.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • reset_email_records
    Type: boolean

    Determines if email records should be reset

  • sync
    Type: boolean

    Determines if operation should be run synchronously

  • whitelisted_record_types
    Type: array string[]

    Specifies which record types to not reset

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/dns/v1/zones/{domain}/reset
curl /api/dns/v1/zones/mydomain.tld/reset \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "sync": true,
  "reset_email_records": true,
  "whitelisted_record_types": [
    "MX",
    "TXT"
  ]
}'
{
  "message": "Request accepted"
}

Validate DNS records

Validate DNS records prior to update for the selected domain.

If the validation is successful, the response will contain 200 Success code. If there is validation error, the response will fail with 422 Validation error code.

Use this endpoint to verify DNS record validity before applying changes.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • zone
    Type: array object[]
    required
  • overwrite
    Type: boolean

    If true, resource records (RRs) matching name and type will be deleted and new RRs will be created, otherwise resource records' ttl's are updated and new records are appended. If no matching RRs are found, they are created.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/dns/v1/zones/{domain}/validate
curl /api/dns/v1/zones/mydomain.tld/validate \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "overwrite": true,
  "zone": [
    {
      "name": "www",
      "records": [
        {
          "content": "mydomain.tld."
        }
      ],
      "ttl": 14400,
      "type": "A"
    }
  ]
}'
{
  "message": "Request accepted"
}

Verifications

Manage domain verifications. This category includes endpoints for retrieving active domain verifications, including verification status, records, and attempt dates. Domain verification allows you to prove ownership of domains through nameserver or TXT record verification methods.

Get domain verifications

Retrieve a list of pending and completed domain verifications.

Body·
required
application/json
  • domains
    Type: array string[]
    required

    The list of domains for which to get verification details for.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/v2/direct/verifications/active
curl /api/v2/direct/verifications/active \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domains": [
    "example.com"
  ]
}'
{
  "data": {
    "PENDING": {
      "pixel.tld": {
        "NAMESERVERS": {
          "records": [
            "ns1.nameserver.com",
            "ns2.nameserver.com"
          ],
          "last_verification_attempt": "2025-08-05 13:15:00",
          "next_verification_attempt": "2025-08-05 14:30:00",
          "verification_expiration": "2025-08-12 13:15:00"
        },
        "TXT": {
          "records": [
            "txt-verification-hash"
          ],
          "last_verification_attempt": "2025-08-05 14:45:00",
          "next_verification_attempt": "2025-08-05 15:00:00",
          "verification_expiration": "2025-08-12 14:45:00"
        }
      }
    },
    "VERIFIED": {
      "byte.tld": {
        "TXT": {
          "records": [
            "other-txt-verification-hash"
          ]
        }
      }
    }
  }
}

Orders

Manage your mail service orders. This category includes endpoints for listing mail orders associated with your account, along with their status, plan, domain, and expiration details.

List orders

Retrieve a paginated list of mail orders associated with your account.

Use this endpoint to monitor your mail services, including their status, plan, attached domain, and expiration details.

Query Parameters
  • domain
    Type: string | null

    Filter orders by domain name (exact match)

  • status
    Type: string | null enum

    Filter orders by status

    values
    • pending_setup
    • active
    • suspended
  • is_trial
    Type: boolean | null

    Filter orders by trial state

  • sort
    Type: string | null enum

    Sort orders by field. Prefix with - for descending order.

    values
    • created_at
    • -created_at
    • expires_at
    • -expires_at
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders
curl /api/mail/v1/orders \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "OR1a2b3c4d5e6f7g",
      "status": "active",
      "is_trial": false,
      "seats": 5,
      "domain": {
        "id": "DO1a2b3c4d5e6f7g",
        "name": "example.com"
      },
      "plan": {
        "name": "hostinger_free",
        "title": "Free Email"
      },
      "has_pending_upgrade": false,
      "created_at": "2025-02-27T11:54:22Z",
      "expires_at": "2026-02-27T11:54:22Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Get order plan

Retrieve the plan the given mail order was purchased with, including domain-level and mailbox-level quotas, limits, and protocol availability.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/plan
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/plan \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "name": "hostinger_free",
  "title": "Free Email",
  "domain": {
    "mailbox_quota": 1,
    "forwarder_quota": 10,
    "alias_quota": 5,
    "is_catchall_enabled": true,
    "is_imap_enabled": true,
    "is_pop3_enabled": true
  },
  "mailbox": {
    "storage_quota": 10240,
    "messages_quota": 10000,
    "forwarder_quota": 10,
    "alias_quota": 5,
    "max_outbound_message_size": 25000000,
    "max_outbound_attachment_size": 20000000,
    "max_outbound_recipient_limit": 50,
    "rate_limit_inbound": "100/86400",
    "rate_limit_outbound": "100/86400"
  }
}

Mailboxes

Manage mailboxes of your mail orders. This category includes endpoints for listing mailboxes with their status, enabled protocols, attached resource counts, and usage numbers.

List mailboxes

Retrieve a paginated list of mailboxes belonging to a mail order.

Use this endpoint to monitor mailboxes of your mail service, including their status, enabled protocols, attached resource counts, and periodically synced usage numbers (usage may lag behind live values).

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • search
    Type: string | null
    max length:  
    255

    Filter mailboxes whose email address contains the given string

  • sort
    Type: string | null enum

    Sort mailboxes by field. Prefix with - for descending order.

    values
    • address
    • -address
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/mailboxes
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/mailboxes \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "AC1a2b3c4d5e6f7g",
      "address": "info@example.com",
      "status": "active",
      "status_reason": "abuse",
      "protocols": {
        "is_imap_enabled": true,
        "is_pop3_enabled": true,
        "is_smtp_in_enabled": true,
        "is_smtp_out_enabled": true
      },
      "counts": {
        "forwarders": 2,
        "aliases": 1,
        "autoreplies": 0
      },
      "is_catchall": false,
      "usage": {
        "storage_used": 512000,
        "storage_quota": 10485760,
        "messages_used": 1240,
        "messages_quota": 50000,
        "synced_at": "2026-07-22T08:12:00Z"
      },
      "created_at": "2025-03-01T10:00:00Z",
      "updated_at": "2026-07-20T14:30:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create mailbox

Create a mailbox under the given mail order. The full email address is composed from the given local part and the domain of the order.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Body·
required
application/json
  • local_part
    Type: string
    max length:  
    50
    Pattern: ^(?=[a-z0-9])(?=.*[a-z0-9]$)[a-z0-9_-]+(?:\.[a-z0-9_-]+)*$
    required

    Local part of the mailbox address (the part before the @). The domain is taken from the order. Must start and end with a letter or digit; single dots, underscores and hyphens are allowed in between.

  • password
    Type: string
    min length:  
    8
    max length:  
    50
    Format: password
    required

    Mailbox password. Minimum 8 characters with uppercase, lowercase, number and special character.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/orders/{orderId}/mailboxes
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/mailboxes \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "local_part": "john.doe",
  "password": "SecurePassword123!"
}'
{
  "id": "AC1a2b3c4d5e6f7g",
  "address": "info@example.com",
  "status": "active",
  "status_reason": "abuse",
  "protocols": {
    "is_imap_enabled": true,
    "is_pop3_enabled": true,
    "is_smtp_in_enabled": true,
    "is_smtp_out_enabled": true
  },
  "counts": {
    "forwarders": 2,
    "aliases": 1,
    "autoreplies": 0
  },
  "is_catchall": false,
  "usage": {
    "storage_used": 512000,
    "storage_quota": 10485760,
    "messages_used": 1240,
    "messages_quota": 50000,
    "synced_at": "2026-07-22T08:12:00Z"
  },
  "created_at": "2025-03-01T10:00:00Z",
  "updated_at": "2026-07-20T14:30:00Z"
}

Delete mailbox

Delete a mailbox. The mailbox is soft-deleted and stays restorable for a limited period before it is permanently removed.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/mailboxes/{mailboxId}
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Change mailbox password

Change the password of a mailbox.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Body·
required
application/json
  • password
    Type: string
    min length:  
    8
    max length:  
    50
    Format: password
    required

    New mailbox password. Minimum 8 characters with uppercase, lowercase, number and special character; must not be a commonly used password.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/mail/v1/mailboxes/{mailboxId}/password
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/password \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "password": "SecurePassword123!"
}'
{
  "message": "Request accepted"
}

Aliases

Manage aliases of your mailboxes. An alias is an additional email address that delivers incoming messages to an existing mailbox. This category includes endpoints for creating, listing, and deleting aliases.

Create alias

Create an alias for the given mailbox. The alias address is formed from the given local part and the domain of the mailbox. Messages sent to the alias are delivered to the mailbox.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Body·
required
application/json
  • local_part
    Type: string
    max length:  
    50
    required

    Local part of the alias address (the part before the @). The domain is taken from the mailbox. Case-insensitive and stored lowercase; must start and end with a letter or digit; single dots, underscores and hyphens are allowed in between.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/mailboxes/{mailboxId}/aliases
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/aliases \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "local_part": "info"
}'
{
  "id": "AA1a2b3c4d5e6f7g",
  "address": "info@example.com",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "john@example.com"
  },
  "is_active": true,
  "created_at": "2026-07-27T12:00:00Z",
  "updated_at": "2026-07-27T12:00:00Z"
}

Delete alias

Delete an alias. Messages sent to the alias address are no longer delivered to the mailbox.

Path Parameters
  • aliasId
    Type: string
    required

    Alias resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/aliases/{aliasId}
curl /api/mail/v1/aliases/AA1a2b3c4d5e6f7g \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List aliases

Retrieve a paginated list of aliases across all mailboxes of a mail order.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/aliases
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/aliases \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "AA1a2b3c4d5e6f7g",
      "address": "info@example.com",
      "mailbox": {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "john@example.com"
      },
      "is_active": true,
      "created_at": "2026-07-27T12:00:00Z",
      "updated_at": "2026-07-27T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Autoreplies

Manage automatic replies of your mailboxes. This category includes endpoints for creating, updating, listing, and deleting autoreplies such as out-of-office messages. A mailbox can have one autoreply.

Create autoreply

Create an automatic reply for the given mailbox. A mailbox can have only one autoreply. Omit starts_at to activate the autoreply immediately and omit ends_at to keep it active indefinitely.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Body·
required
application/json
  • body
    Type: string
    required

    Body of the automatic reply

  • subject
    Type: string
    required

    Subject of the automatic reply

  • display_name
    Type: string | null
    max length:  
    255

    Sender display name used for the reply

  • ends_at
    Type: string | null Format: date-time

    When the autoreply stops. Omit for an indefinite autoreply.

  • starts_at
    Type: string | null Format: date-time

    When the autoreply becomes active. Defaults to now.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/mailboxes/{mailboxId}/autoreplies
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/autoreplies \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "subject": "Out of office",
  "body": "I am on vacation until August 1st.",
  "display_name": "John Doe",
  "starts_at": "2026-08-01T00:00:00Z",
  "ends_at": "2026-09-01T00:00:00Z"
}'
{
  "id": "AR1a2b3c4d5e6f7g",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "subject": "Out of office",
  "body": "I am on vacation until August 1st.",
  "display_name": "John Doe",
  "starts_at": "2026-08-01T00:00:00Z",
  "ends_at": "2026-09-01T00:00:00Z",
  "created_at": "2026-07-24T12:00:00Z",
  "updated_at": "2026-07-24T12:00:00Z"
}

Update autoreply

Replace the autoreply with the given content and schedule. Omitted optional fields are cleared: omit starts_at to activate the autoreply immediately and omit ends_at to keep it active indefinitely.

Path Parameters
  • autoreplyId
    Type: string
    required

    Autoreply resource ID

Body·
required
application/json
  • body
    Type: string
    required

    Body of the automatic reply

  • subject
    Type: string
    required

    Subject of the automatic reply

  • display_name
    Type: string | null
    max length:  
    255

    Sender display name used for the reply

  • ends_at
    Type: string | null Format: date-time

    When the autoreply stops. Omit for an indefinite autoreply.

  • starts_at
    Type: string | null Format: date-time

    When the autoreply becomes active. Defaults to now.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/mail/v1/autoreplies/{autoreplyId}
curl /api/mail/v1/autoreplies/AR1a2b3c4d5e6f7g \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "subject": "Out of office",
  "body": "I am on vacation until August 1st.",
  "display_name": "John Doe",
  "starts_at": "2026-08-01T00:00:00Z",
  "ends_at": "2026-09-01T00:00:00Z"
}'
{
  "id": "AR1a2b3c4d5e6f7g",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "subject": "Out of office",
  "body": "I am on vacation until August 1st.",
  "display_name": "John Doe",
  "starts_at": "2026-08-01T00:00:00Z",
  "ends_at": "2026-09-01T00:00:00Z",
  "created_at": "2026-07-24T12:00:00Z",
  "updated_at": "2026-07-24T12:00:00Z"
}

Delete autoreply

Delete the autoreply of a mailbox. The mailbox stops sending automatic replies immediately.

Path Parameters
  • autoreplyId
    Type: string
    required

    Autoreply resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/autoreplies/{autoreplyId}
curl /api/mail/v1/autoreplies/AR1a2b3c4d5e6f7g \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List autoreplies

Retrieve a paginated list of autoreplies across all mailboxes of a mail order.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/autoreplies
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/autoreplies \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "AR1a2b3c4d5e6f7g",
      "mailbox": {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "user@example.com"
      },
      "subject": "Out of office",
      "body": "I am on vacation until August 1st.",
      "display_name": "John Doe",
      "starts_at": "2026-08-01T00:00:00Z",
      "ends_at": "2026-09-01T00:00:00Z",
      "created_at": "2026-07-24T12:00:00Z",
      "updated_at": "2026-07-24T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Forwarders

Manage forwarders of your mailboxes. This category includes endpoints for creating, listing, and deleting forwarders that redirect incoming messages to another email address. The destination address must confirm the forwarding before it becomes active.

Create forwarder

Create a forwarder from the given mailbox to the destination address. The destination receives a confirmation email and forwarding becomes active only after it is confirmed.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Body·
required
application/json
  • destination
    Type: string
    required

    Email address the messages will be forwarded to

  • is_keep_copy_enabled
    Type: boolean

    Whether to keep a copy of forwarded messages in the mailbox. Defaults to false.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/mailboxes/{mailboxId}/forwarders
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/forwarders \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "destination": "jane@example.org",
  "is_keep_copy_enabled": false
}'
{
  "id": "FW1a2b3c4d5e6f7g",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "destination": "jane@example.org",
  "is_keep_copy_enabled": true,
  "is_active": true,
  "is_confirmed": true,
  "created_at": "2026-07-24T12:00:00Z",
  "updated_at": "2026-07-24T12:00:00Z"
}

Delete forwarder

Delete a forwarder. The mailbox stops forwarding messages to the destination address immediately.

Path Parameters
  • forwarderId
    Type: string
    required

    Forwarder resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/forwarders/{forwarderId}
curl /api/mail/v1/forwarders/FW1a2b3c4d5e6f7g \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List forwarders

Retrieve a paginated list of forwarders across all mailboxes of a mail order.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/forwarders
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/forwarders \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "FW1a2b3c4d5e6f7g",
      "mailbox": {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "user@example.com"
      },
      "destination": "jane@example.org",
      "is_keep_copy_enabled": true,
      "is_active": true,
      "is_confirmed": true,
      "created_at": "2026-07-24T12:00:00Z",
      "updated_at": "2026-07-24T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Resend forwarder confirmation

Resend the confirmation email to the destination address of an unconfirmed forwarder.

Path Parameters
  • forwarderId
    Type: string
    required

    Forwarder resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/forwarders/{forwarderId}/confirmation/resend
curl /api/mail/v1/forwarders/FW1a2b3c4d5e6f7g/confirmation/resend \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Update forwarder keep-copy setting

Enable or disable keeping a copy of forwarded messages in the mailbox.

Path Parameters
  • forwarderId
    Type: string
    required

    Forwarder resource ID

Body·
required
application/json
  • is_keep_copy_enabled
    Type: boolean
    required

    Whether to keep a copy of forwarded messages in the mailbox

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/mail/v1/forwarders/{forwarderId}/keep-copy
curl /api/mail/v1/forwarders/FW1a2b3c4d5e6f7g/keep-copy \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "is_keep_copy_enabled": true
}'
{
  "message": "Request accepted"
}

Catchalls

Manage catch-alls of your domains. A catch-all routes all messages sent to unknown addresses of a domain to a designated mailbox. The mailbox address must confirm the catch-all before it becomes active.

Create catch-all

Create a catch-all that routes all messages sent to unknown addresses of the domain to the given mailbox. The mailbox address receives a confirmation email and the catch-all becomes active only after it is confirmed. A domain can have only one catch-all.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/mailboxes/{mailboxId}/catchalls
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/catchalls \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "CA1a2b3c4d5e6f7g",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "domain": "example.com",
  "is_active": true,
  "is_confirmed": true,
  "created_at": "2026-07-27T12:00:00Z",
  "updated_at": "2026-07-27T12:00:00Z"
}

Delete catch-all

Delete a catch-all. Messages sent to unknown addresses of the domain are no longer routed to the mailbox.

Path Parameters
  • catchallId
    Type: string
    required

    Catch-all resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/catchalls/{catchallId}
curl /api/mail/v1/catchalls/CA1a2b3c4d5e6f7g \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List catch-alls

Retrieve a paginated list of catch-alls across all mailboxes of a mail order.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/catchalls
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/catchalls \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "CA1a2b3c4d5e6f7g",
      "mailbox": {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "user@example.com"
      },
      "domain": "example.com",
      "is_active": true,
      "is_confirmed": true,
      "created_at": "2026-07-27T12:00:00Z",
      "updated_at": "2026-07-27T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Resend catch-all confirmation

Resend the confirmation email to the mailbox address of an unconfirmed catch-all.

Path Parameters
  • catchallId
    Type: string
    required

    Catch-all resource ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/catchalls/{catchallId}/confirmation/resend
curl /api/mail/v1/catchalls/CA1a2b3c4d5e6f7g/confirmation/resend \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Webhooks

Create webhook

Create a webhook for the given mailbox. The generated secret is returned only in this response and is sent as a bearer token with every delivery.

Path Parameters
  • mailboxId
    Type: string
    required

    Mailbox resource ID

Body·
required
application/json
  • events
    Type: array string[] enum
    const:  
    message.received
    required

    Events that trigger this webhook

    values
    • message.received
  • name
    Type: string
    max length:  
    255
    required

    Human-readable name for this webhook

  • url
    Type: string
    max length:  
    2048
    required

    Publicly reachable URL that receives the webhook POST requests

  • description
    Type: string | null

    Optional description of the webhook's purpose

  • status
    Type: string enum

    Initial status of the webhook

    values
    • active
    • disabled
    • paused
Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/mailboxes/{mailboxId}/webhooks
curl /api/mail/v1/mailboxes/AC1a2b3c4d5e6f7g/webhooks \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "New message notifier",
  "description": "Notifies our CRM when a new email arrives",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming"
}'
{
  "id": "019683f8-1234-7abc-8def-0123456789ab",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "name": "New message notifier",
  "description": "Notifies our CRM when a new email arrives",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming",
  "secret": "4a6f8b2d1e9c3f7a0b5d8e2c4f1a7b3d9e6c2f8a1b4d7e0c3f6a9b2d5e8c1f4",
  "created_at": "2026-07-23T12:00:00Z",
  "updated_at": "2026-07-23T12:00:00Z"
}

List webhook delivery logs

Retrieve a paginated list of webhook delivery logs for the given mail order, including delivery outcome, duration, and retry counts. Supports filtering by mailbox.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • mailbox_id
    Type: string | null

    Filter by the mailbox resource ID the webhooks are attached to

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/webhooks/delivery-logs
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/webhooks/delivery-logs \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "created_at": "2026-07-23T12:00:00Z",
      "mailbox_address": "user@example.com",
      "webhook_url": "https://example.com/webhooks/incoming",
      "is_successful": true,
      "duration": 42,
      "retry_count": 1,
      "max_retry_count": 5
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Get webhook

Retrieve the details of a single webhook. The webhook secret is never included; it is returned only when a webhook is created or its secret is regenerated.

Path Parameters
  • webhookId
    Type: string
    required

    Webhook ID (returned when the webhook was created)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/webhooks/{webhookId}
curl /api/mail/v1/webhooks/019683f8-1234-7abc-8def-0123456789ab \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "019683f8-1234-7abc-8def-0123456789ab",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "name": "New message notifier",
  "description": "Notifies our CRM when a new email arrives",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming",
  "created_at": "2026-07-23T12:00:00Z",
  "updated_at": "2026-07-23T12:00:00Z"
}

Delete webhook

Permanently delete a webhook. This action cannot be undone. After deletion the URL no longer receives event notifications.

Path Parameters
  • webhookId
    Type: string
    required

    Webhook ID (returned when the webhook was created)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/webhooks/{webhookId}
curl /api/mail/v1/webhooks/019683f8-1234-7abc-8def-0123456789ab \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Update webhook

Partially update a webhook. Only the fields included in the request body are changed; omitted fields retain their current values. Pass "description": null to clear the description.

Path Parameters
  • webhookId
    Type: string
    required

    Webhook ID (returned when the webhook was created)

Body·
required
application/json

Fields to update. All fields are optional; only provided fields are changed. Pass "description": null to clear the description.

  • description
    Type: string | null

    New description, or null to clear it

  • events
    Type: array string[] enum
    const:  
    message.received

    Replaces the full list of subscribed events

    values
    • message.received
  • name
    Type: string
    max length:  
    255

    New human-readable name for the webhook

  • status
    Type: string enum

    New status for the webhook

    values
    • active
    • disabled
    • paused
  • url
    Type: string
    max length:  
    2048

    New URL to deliver events to

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/mail/v1/webhooks/{webhookId}
curl /api/mail/v1/webhooks/019683f8-1234-7abc-8def-0123456789ab \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Updated notifier",
  "description": "Now also handles newsletters",
  "events": [
    "message.received"
  ],
  "status": "paused",
  "url": "https://example.com/webhooks/incoming"
}'
{
  "id": "019683f8-1234-7abc-8def-0123456789ab",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "name": "New message notifier",
  "description": "Notifies our CRM when a new email arrives",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming",
  "created_at": "2026-07-23T12:00:00Z",
  "updated_at": "2026-07-23T12:00:00Z"
}

List webhooks

Retrieve a paginated list of webhooks belonging to the given mail order. Supports filtering by mailbox and status. The webhook secret is never included; it is returned only when a webhook is created or its secret is regenerated.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • mailbox_id
    Type: string | null

    Filter by the mailbox resource ID the webhooks are attached to

  • status
    Type: string | null enum

    Filter webhooks by status

    values
    • active
    • disabled
    • paused
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/webhooks
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/webhooks \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "019683f8-1234-7abc-8def-0123456789ab",
      "mailbox": {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "user@example.com"
      },
      "name": "New message notifier",
      "description": "Notifies our CRM when a new email arrives",
      "events": [
        "message.received"
      ],
      "status": "active",
      "url": "https://example.com/webhooks/incoming",
      "created_at": "2026-07-23T12:00:00Z",
      "updated_at": "2026-07-23T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Regenerate webhook secret

Regenerate the secret of a webhook. The previous secret is immediately invalidated. The new secret is returned only in this response and is sent as a bearer token with every delivery.

Path Parameters
  • webhookId
    Type: string
    required

    Webhook ID (returned when the webhook was created)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/webhooks/{webhookId}/regenerate-secret
curl /api/mail/v1/webhooks/019683f8-1234-7abc-8def-0123456789ab/regenerate-secret \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "019683f8-1234-7abc-8def-0123456789ab",
  "mailbox": {
    "id": "AC1a2b3c4d5e6f7g",
    "address": "user@example.com"
  },
  "name": "New message notifier",
  "description": "Notifies our CRM when a new email arrives",
  "events": [
    "message.received"
  ],
  "status": "active",
  "url": "https://example.com/webhooks/incoming",
  "secret": "4a6f8b2d1e9c3f7a0b5d8e2c4f1a7b3d9e6c2f8a1b4d7e0c3f6a9b2d5e8c1f4",
  "created_at": "2026-07-23T12:00:00Z",
  "updated_at": "2026-07-23T12:00:00Z"
}

Test webhook

Send a test delivery to the webhook URL and return the result. Test requests are rate limited upstream.

Path Parameters
  • webhookId
    Type: string
    required

    Webhook ID (returned when the webhook was created)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/webhooks/{webhookId}/test
curl /api/mail/v1/webhooks/019683f8-1234-7abc-8def-0123456789ab/test \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "http_status": 200,
  "is_successful": true,
  "error": "Something bad happened"
}

API Tokens

Manage API tokens for the Hostinger Email API. Tokens are scoped to mailboxes of a mail order and grant access to mailbox provisioning and management through the Email API.

Create API token

Create an API token for the given mail order. The token grants access to the Hostinger Email API, where you can provision and manage the mailboxes it is scoped to.

The plaintext token is returned only in this response, never again. A maximum of 10 tokens can exist per order. Use scope.has_all_mailboxes to cover all current and future mailboxes, or list specific mailboxes in scope.mailbox_ids.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Body·
required
application/json
  • name
    Type: string
    max length:  
    255
    required

    Human-readable label for this token

  • scope
    Type: object
    required

    Mailbox scope this token can access

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/mail/v1/orders/{orderId}/api-tokens
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/api-tokens \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "CRM integration",
  "scope": {
    "has_all_mailboxes": false,
    "mailbox_ids": [
      "AC1a2b3c4d5e6f7g"
    ]
  }
}'
{
  "id": "019683f8-1234-7abc-8def-0123456789ab",
  "token": "4a6f8b2d1e9c3f7a0b5d8e2c4f1a7b3d9e6c2f8a1b4d7e0c3f6a9b2d5e8c1f4a",
  "name": "CRM integration",
  "scope": {
    "has_all_mailboxes": false,
    "mailboxes": [
      {
        "id": "AC1a2b3c4d5e6f7g",
        "address": "user@example.com"
      }
    ]
  },
  "created_at": "2026-05-05T12:00:00Z",
  "type": "api_token"
}

Revoke API token

Revoke an API token. The token immediately loses access to the Hostinger Email API. This action cannot be undone.

Path Parameters
  • tokenId
    Type: string
    required

    API token ID (returned when the token was created)

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/mail/v1/api-tokens/{tokenId}
curl /api/mail/v1/api-tokens/019683f8-1234-7abc-8def-0123456789ab \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List API tokens

Retrieve a paginated list of Hostinger Email API tokens across all your mail orders, optionally filtered by order. Plaintext tokens are never included; they are returned only when a token is created.

Query Parameters
  • order_id
    Type: string | null

    Filter tokens by order resource ID. Single value or comma-separated list.

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/api-tokens
curl /api/mail/v1/api-tokens \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "019683f8-1234-7abc-8def-0123456789ab",
      "order_id": "OR1a2b3c4d5e6f7g",
      "name": "CRM integration",
      "scope": {
        "has_all_mailboxes": false,
        "mailboxes": [
          {
            "id": "AC1a2b3c4d5e6f7g",
            "address": "user@example.com"
          }
        ]
      },
      "created_at": "2026-05-05T12:00:00Z",
      "last_used_at": "2026-05-15T08:30:00Z",
      "type": "api_token"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Logs

Inspect activity logs of your mail orders. This category includes endpoints for access logs, inbound and outbound delivery logs, mailbox action logs, and account action logs.

List access logs

Retrieve paginated access logs for the domain attached to the given mail order. Supports filtering by account, date range, protocol, status, and deletion flag. Results are sorted by timestamp descending.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • account
    Type: string | null Format: email

    Filter log entries by a specific email account

  • date
    Type: string | null Format: date

    Exact date filter (YYYY-MM-DD). Takes precedence over from_date/to_date when both are given.

  • from_date
    Type: string | null Format: date-time

    Date range start (RFC 3339)

  • to_date
    Type: string | null Format: date-time

    Date range end (RFC 3339)

  • status
    Type: string | null enum

    Filter log entries by status

    values
    • Successful
    • Failed
  • protocol
    Type: string | null enum

    Filter access log entries by protocol

    values
    • imap
    • pop3
    • smtp
  • has_deletions
    Type: boolean | null

    Filter access log entries by whether the session had deletions

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/logs/access
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/logs/access \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "account": "user@example.com",
      "domain": "example.com",
      "session": "nVpwr1XahpcqAkeAAAQAAJjSnW8aYxyM",
      "protocol": "imap",
      "remote_ip": "192.168.0.1",
      "login_time": "2026-03-16T13:13:54Z",
      "in": 421,
      "out": 9381,
      "deleted": 0,
      "expunged": 0,
      "trashed": 0,
      "logout_time": "2026-03-16T13:13:55Z",
      "timestamp": "2026-03-16T13:13:55Z",
      "app_name": "com.google.android.gm",
      "has_deletions": false,
      "result": "ok",
      "status": "Access",
      "is_important": false
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

List action logs

Retrieve paginated account action logs (administrative and user actions) for the given mail order. Supports filtering by account, date range, and status. Results are sorted by timestamp descending.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • account
    Type: string | null Format: email

    Filter log entries by a specific email account

  • date
    Type: string | null Format: date

    Exact date filter (YYYY-MM-DD). Takes precedence over from_date/to_date when both are given.

  • from_date
    Type: string | null Format: date-time

    Date range start (RFC 3339)

  • to_date
    Type: string | null Format: date-time

    Date range end (RFC 3339)

  • status
    Type: string | null enum

    Filter log entries by status

    values
    • Successful
    • Failed
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/logs/action
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/logs/action \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "action": "Account created",
      "extra": null,
      "created_at": "2026-03-16T12:11:34Z",
      "ip_address": "127.0.0.1",
      "role": "user",
      "action_context": "example.com",
      "response_status": "OK"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

List inbound logs

Retrieve paginated inbound (received mail) delivery logs for the domain attached to the given mail order. Supports filtering by account, date range, status, sender, and recipient. Results are sorted by timestamp descending.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • account
    Type: string | null Format: email

    Filter log entries by a specific email account

  • date
    Type: string | null Format: date

    Exact date filter (YYYY-MM-DD). Takes precedence over from_date/to_date when both are given.

  • from_date
    Type: string | null Format: date-time

    Date range start (RFC 3339)

  • to_date
    Type: string | null Format: date-time

    Date range end (RFC 3339)

  • status
    Type: string | null enum

    Filter log entries by status

    values
    • Successful
    • Failed
  • sender
    Type: string | null

    Filter log entries by sender. Accepts a full email address or a domain.

  • recipient
    Type: string | null

    Filter log entries by recipient. Accepts a full email address or a domain.

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/logs/inbound
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/logs/inbound \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "account": "user@example.com",
      "rcpt": "recipient@example.com",
      "rcpts": "recipient@example.com",
      "client_ip": "192.168.0.1",
      "from": "user@example.com",
      "nrcpt": "1",
      "timestamp": "2026-03-16T13:13:55Z",
      "relay_events": [
        {
          "address_to": "user@example.com",
          "relay": "server.example.com[192.168.0.1]:587",
          "delay": "3.1",
          "dsn": "2.0.0",
          "status": "Sent",
          "response": "250 2.0.0 Ok: queued as 6153112091D",
          "time": "2026-03-16T13:13:55Z"
        }
      ],
      "status": "Delivered",
      "is_spam": false
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

List mailbox action logs

Retrieve paginated mailbox action logs (message and mailbox events) for a mailbox in the given mail order. The mailbox email must belong to the order's domain. Supports date range and event type filters. Results are sorted by timestamp descending.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • email
    Type: string Format: email
    required

    Mailbox email address. Must belong to the order's domain.

  • date
    Type: string | null Format: date

    Exact date filter (YYYY-MM-DD). Takes precedence over from_date/to_date when both are given.

  • from_date
    Type: string | null Format: date-time

    Date range start (RFC 3339)

  • to_date
    Type: string | null Format: date-time

    Date range end (RFC 3339)

  • event
    Type: string | null enum

    Filter mailbox action log entries by event type

    values
    • MessageNew
    • MessageRead
    • MessageAppend
    • MessageExpunge
    • MailboxCreate
    • MailboxDelete
    • MailboxRename
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/logs/mailbox-actions
curl '/api/mail/v1/orders/OR1a2b3c4d5e6f7g/logs/mailbox-actions?email=user%40example.com' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "folder": "INBOX.Sent",
      "time": 1773906125,
      "event": "MessageNew",
      "mailbox": "user@example.com",
      "hostname": "de-fra-mailstorage71.hostinger.io",
      "timestamp": "2026-03-16T13:13:55Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

List outbound logs

Retrieve paginated outbound (sent mail) delivery logs for the domain attached to the given mail order. Supports filtering by account, date range, status, sender, and recipient. Results are sorted by timestamp descending.

Path Parameters
  • orderId
    Type: string
    required

    Order resource ID

Query Parameters
  • account
    Type: string | null Format: email

    Filter log entries by a specific email account

  • date
    Type: string | null Format: date

    Exact date filter (YYYY-MM-DD). Takes precedence over from_date/to_date when both are given.

  • from_date
    Type: string | null Format: date-time

    Date range start (RFC 3339)

  • to_date
    Type: string | null Format: date-time

    Date range end (RFC 3339)

  • status
    Type: string | null enum

    Filter log entries by status

    values
    • Successful
    • Failed
  • sender
    Type: string | null

    Filter log entries by sender. Accepts a full email address or a domain.

  • recipient
    Type: string | null

    Filter log entries by recipient. Accepts a full email address or a domain.

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/mail/v1/orders/{orderId}/logs/outbound
curl /api/mail/v1/orders/OR1a2b3c4d5e6f7g/logs/outbound \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "account": "user@example.com",
      "rcpt": "recipient@example.com",
      "rcpts": "recipient@example.com",
      "client_ip": "192.168.0.1",
      "from": "user@example.com",
      "nrcpt": "1",
      "timestamp": "2026-03-16T13:13:55Z",
      "relay_events": [
        {
          "address_to": "user@example.com",
          "relay": "server.example.com[192.168.0.1]:587",
          "delay": "3.1",
          "dsn": "2.0.0",
          "status": "Sent",
          "response": "250 2.0.0 Ok: queued as 6153112091D",
          "time": "2026-03-16T13:13:55Z"
        }
      ],
      "status": "Delivered",
      "is_spam": false
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Cache

Clear website cache

Permanently clears all server-side cache for the website at once. Use it when content was updated and needs to be visible immediately, or after making major changes.

Also purges the Hostinger CDN cache when CDN is enabled on the website. For a WordPress installation living in a subdirectory, pass the directory query parameter to clear its cache.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Query Parameters
  • directory
    Type: string

    Directory of the website installation to clear, relative to the website root. Defaults to the website root.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/websites/{domain}/cache/clear
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/cache/clear \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Toggle cacheless mode

Turns development (cacheless) mode on or off, based on the enabled flag. When enabled, nothing is cached, effectively turning off all caching for the website; use it while actively developing, testing changes, debugging issues, or when real-time updates must be visible. Disable it after finishing development work to restore the performance benefits of caching.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • enabled
    Type: boolean
    required

    Turn development (cacheless) mode on (true) or off (false) for the website.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/websites/{domain}/cacheless-mode/toggle
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/cacheless-mode/toggle \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "enabled": true
}'
{
  "message": "Request accepted"
}

Toggle website cache

Turns server-side caching for the website on or off, based on the enabled flag. Enable it for faster page loads, reduced server load, and improved user experience; recommended for production websites. Disabling may impact performance; to temporarily bypass caching while developing or debugging, prefer toggling cacheless mode instead.

Does nothing if caching is already in the requested state.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • enabled
    Type: boolean
    required

    Turn server-side caching on (true) or off (false) for the website.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/websites/{domain}/cache/toggle
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/cache/toggle \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "enabled": true
}'
{
  "message": "Request accepted"
}

Cron Jobs

List account cron jobs

Returns the list of cron jobs configured for the specified account, including their schedule and command.

Path Parameters
  • username
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/cron-jobs
curl /api/hosting/v1/accounts/u123456789/cron-jobs \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "uid": "cron_abc123",
    "username": "u123456789",
    "time": "0 2 * * *",
    "command": "php /home/u123456789/cleanup.php"
  }
]

Create account cron job

Creates a cron job for the specified account from a schedule expression and a command.

Returns the created cron job, including its uid, which is required to delete the cron job or fetch its output.

Path Parameters
  • username
    Type: string
    required
Body·
required
application/json
  • command
    Type: string
    required

    Command to execute on the schedule.

  • time
    Type: string
    required

    Cron schedule expression (for example "0 2 * * *" runs daily at 02:00).

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/cron-jobs
curl /api/hosting/v1/accounts/u123456789/cron-jobs \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "time": "0 2 * * *",
  "command": "php /home/u123456789/cleanup.php"
}'
{
  "uid": "cron_abc123",
  "username": "u123456789",
  "time": "0 2 * * *",
  "command": "php /home/u123456789/cleanup.php"
}

Delete account cron job

Permanently deletes the cron job identified by its uid.

The uid is returned by the list cron jobs endpoint.

Path Parameters
  • username
    Type: string
    required
  • uid
    Type: string
    required

    Unique identifier of the cron job as returned by the list cron jobs endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/cron-jobs/{uid}
curl /api/hosting/v1/accounts/u123456789/cron-jobs/cron_abc123 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get cron job output

Returns the output captured from the last execution of the cron job identified by its uid.

The uid is returned by the list cron jobs endpoint.

Path Parameters
  • username
    Type: string
    required
  • uid
    Type: string
    required

    Unique identifier of the cron job as returned by the list cron jobs endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/cron-jobs/{uid}/output
curl /api/hosting/v1/accounts/u123456789/cron-jobs/cron_abc123/output \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "output": ""
}

Datacenters

Access information about available datacenters for hosting services. This category provides details about data center locations and capabilities to help you choose the optimal region for your hosting needs.

Datacenters Operations

List available datacenters

Retrieve a list of datacenters available for setting up hosting plans based on available datacenter capacity and hosting plan of your order. The first item in the list is the best match for your specific order requirements.

Query Parameters
  • order_id
    Type: integer
    required

    Order ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/datacenters
curl '/api/hosting/v1/datacenters?order_id=123' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "title": "Europe (UK)",
    "code": "uk-fast",
    "coordinates": {
      "latitude": 51.5074,
      "longitude": 0.1278
    }
  }
]

Databases

Change database password

Changes the password for the specified database user.

The database name must be the full name returned by the list databases endpoint. The password must also be updated in any website configuration that uses this database.

Path Parameters
  • username
    Type: string
    required
  • name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Body·
required
application/json
  • password
    Type: string Format: password
    required

    New database user password.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/databases/{name}/change-password
curl /api/hosting/v1/accounts/u123456789/databases/u123456789_test_db/change-password \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "password": "Secu4ePa$$wor!D"
}'
{
  "message": "Request accepted"
}

List account databases

Returns a paginated list of databases for the specified account.

Use the domain and is_assigned filters to find databases assigned to a specific domain.

Path Parameters
  • username
    Type: string
    required
Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

  • domain
    Type: string | null

    Filter by domain name (exact match)

  • is_assigned
    Type: boolean | null

    When used with domain, return only databases assigned to that domain.

  • search
    Type: string | null
    max length:  
    512

    Search databases by name, user, or creation date.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/databases
curl /api/hosting/v1/accounts/u123456789/databases \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "name": "u123456789_test_db",
      "user": "u123456789_admin",
      "domain": "example.com",
      "permissions": {
        "Alter": 1,
        "Drop": 0
      },
      "created_at": "2024-05-29T05:49:49+00:00",
      "updated_at": "2024-05-29T05:49:49+00:00",
      "disk_usage_mb": 32,
      "max_size_mb": 3072
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create account database

Creates a database with a database user and password for the specified account.

The database name and user are automatically prefixed with the account username when needed.

Path Parameters
  • username
    Type: string
    required
Body·
required
application/json
  • name
    Type: string
    required

    Database name. If the account username prefix is omitted, it is added automatically.

  • password
    Type: string Format: password
    required

    Database user password.

  • user
    Type: string
    required

    Database user. If the account username prefix is omitted, it is added automatically.

  • website_domain
    Type: string
    required

    Website domain assigned to the database.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/databases
curl /api/hosting/v1/accounts/u123456789/databases \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "u123456789_test_db",
  "user": "u123456789_admin",
  "password": "Str0ngP@ssword!",
  "website_domain": "example.com"
}'
{
  "message": "Request accepted"
}

Delete account database

Permanently deletes a database and its remote connections.

The database name must be the full name returned by the list databases endpoint.

Path Parameters
  • username
    Type: string
    required
  • name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/databases/{name}
curl /api/hosting/v1/accounts/u123456789/databases/u123456789_test_db \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Create database remote connection

Allows a remote host to connect to the specified database.

Provide an IPv4/IPv6 address, or "%" to allow any host. The database name must be the full name returned by the list databases endpoint.

Path Parameters
  • username
    Type: string
    required
  • name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Body·
required
application/json
  • ip
    Type: string
    required

    Remote host to allow: an IPv4/IPv6 address, or "%" for any host.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/databases/{name}/remote-connections
curl /api/hosting/v1/accounts/u123456789/databases/u123456789_test_db/remote-connections \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "ip": "192.0.2.10"
}'
{
  "message": "Request accepted"
}

Delete database remote connection

Permanently removes a remote-access rule, revoking the given host's remote access to the database.

Identify the rule with the required ip query parameter (the IPv4/IPv6 address, or "%", exactly as returned by the list remote connections endpoint). The database name must be the full name returned by the list databases endpoint.

Path Parameters
  • username
    Type: string
    required
  • name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Query Parameters
  • ip
    Type: string
    required

    Remote host to revoke: the IPv4/IPv6 address, or "%", exactly as returned by the list remote connections endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/databases/{name}/remote-connections
curl '/api/hosting/v1/accounts/u123456789/databases/u123456789_test_db/remote-connections?ip=192.0.2.10' \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List database remote connections

Returns the remote-access rules for the specified account: the remote hosts (IPv4/IPv6 addresses, or "%" for any host) allowed to connect to the account databases.

Use the domain filter to only return rules for databases assigned to a specific domain.

Path Parameters
  • username
    Type: string
    required
Query Parameters
  • domain
    Type: string | null

    Filter remote connections by the domain the database is assigned to. Rules for databases not assigned to any domain are always included.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/databases/remote-connections
curl /api/hosting/v1/accounts/u123456789/databases/remote-connections \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "database_name": "u123456789_shop",
    "database_user": "u123456789_admin",
    "ip": "192.0.2.10"
  }
]

Repair database

Repairs corrupted database tables asynchronously.

Use when database errors, crashes, or corruption are reported. The database name must be the full name returned by the list databases endpoint.

Path Parameters
  • username
    Type: string
    required
  • name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/databases/{name}/repair
curl /api/hosting/v1/accounts/u123456789/databases/u123456789_test_db/repair \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Domains

Generate a free subdomain

Generate a unique free subdomain that can be used for hosting services without purchasing custom domains. Free subdomains allow you to start using hosting services immediately and you can always connect a custom domain to your site later.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/domains/free-subdomains
curl /api/hosting/v1/domains/free-subdomains \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "palegreen-fox-548498.hostingersite.com"
}

List website parked domains

Retrieve all parked or alias domains created under the selected website.

Use this endpoint to inspect parked domain configuration for a specific website, including the parent domain and root directory assigned to each parked domain.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/websites/{domain}/parked-domains
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/parked-domains \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "username": "u123456789",
    "domain": "parked-domain.com",
    "parent_domain": "example.com",
    "root_directory": "/home/u123456789/domains/example.com/public_html",
    "type": "domain"
  }
]

Create website parked domain

Create a parked or alias domain for the selected website.

Provide a domain name or IP address to park on the website so it serves the same content as the parent domain.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • parked_domain
    Type: string
    required

    Domain name or IP address to park on the selected website

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/websites/{domain}/parked-domains
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/parked-domains \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "parked_domain": "parked-domain.com"
}'
{
  "message": "Request accepted"
}

Delete website parked domain

Delete an existing parked or alias domain from the selected website.

Use this endpoint to remove parked domains that are no longer needed.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

  • parkedDomain
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/websites/{domain}/parked-domains/{parkedDomain}
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/parked-domains/parked-domain.com \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List website subdomains

Retrieve all subdomains created under the selected website.

Use this endpoint to inspect subdomain configuration for a specific website, including the parent domain and root directory assigned to each subdomain.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/subdomains \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "username": "u123456789",
    "domain": "blog.example.com",
    "parent_domain": "example.com",
    "root_directory": "/home/u123456789/domains/blog.example.com/public_html",
    "subdomain": "blog"
  }
]

Create website subdomain

Create a new subdomain for the selected website.

Provide a subdomain prefix and, optionally, a custom directory or the website public directory to use as the subdomain root.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • subdomain
    Type: string
    required

    Subdomain prefix to create under the selected website

  • directory
    Type: string | null

    Directory name for the subdomain relative to the website root

  • is_using_public_directory
    Type: boolean

    Use the website public directory as the subdomain root directory

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/subdomains \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "subdomain": "blog",
  "directory": "blog",
  "is_using_public_directory": true
}'
{
  "message": "Request accepted"
}

Delete website subdomain

Delete an existing subdomain from the selected website.

Use this endpoint to remove subdomains that are no longer needed.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

  • subdomain
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/websites/{domain}/subdomains/{subdomain}
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/subdomains/blog \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Verify domain ownership

Verify ownership of a single domain and return the verification status.

Use this endpoint to check if a domain is accessible for you before using it for new websites. If the domain is accessible, the response will have is_accessible: true. If not, add the given TXT record to your domain's DNS records and try verifying again. Keep in mind that it may take up to 10 minutes for new TXT DNS records to propagate.

Skip this verification when using Hostinger's free subdomains (*.hostingersite.com).

Body·
required
application/json
  • domain
    Type: string
    required

    Domain to verify ownership for

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/domains/verify-ownership
curl /api/hosting/v1/domains/verify-ownership \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "example.com"
}'
{
  "domain": "example.com",
  "is_accessible": false,
  "txt_to_verify": "example.com=example-verification-code"
}

Files

List website files and directories

List files and directories under a website's document root.

Use directory to browse a subdirectory relative to the document root. Symlinked entries are listed but never traversed into or resolved.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Query Parameters
  • directory
    Type: string

    Directory path to check

  • max_depth
    Type: integer | null
    min:  
    1
    max:  
    10

    How many directory levels deep to recurse.

  • max_items
    Type: integer | null
    min:  
    1
    max:  
    2000

    Max number of entries to return in this page.

  • offset
    Type: integer | null
    min:  
    0

    Number of entries to skip. Page with offset + item count until reaching total_items.

  • file_types
    Type: array string[] enum

    Filter by entry type, e.g. file,directory. Omit for all types.

    values
    • file
    • directory
    • symlink
    • other
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/domains/{domain}/files
curl /api/hosting/v1/accounts/u123456789/domains/mydomain.tld/files \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "path": "wp-content",
  "items": [
    {
      "name": "index.php",
      "path": "wp-content/index.php",
      "type": "file",
      "size_bytes": 512
    }
  ],
  "total_items": 42,
  "total_items_current_page": 20,
  "offset": 0
}

Get website file content

Get a single file's content, relative to a website's document root.

Read-only; refuses symlinks, oversized files, non-text file types, and files identified as containing secrets (e.g. credential files) — none of these are returned by this endpoint.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Query Parameters
  • path
    Type: string
    required

    File path, relative to the document root.

  • from_line
    Type: integer | null
    min:  
    0

    Line offset to start reading from.

  • max_lines
    Type: integer | null
    min:  
    1
    max:  
    5000

    Max number of lines to return.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/domains/{domain}/files/content
curl '/api/hosting/v1/accounts/u123456789/domains/mydomain.tld/files/content?path=index.php' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "path": "index.php",
  "content": "<?php\necho 'Hello world';\n",
  "from_line": 0,
  "total_lines": 84,
  "size_bytes": 2048
}

NodeJS

List NodeJS builds

Retrieve a paginated list of Node.js build processes for a specific website.

Each build represents a single run of the Node.js build pipeline. Use the states query parameter to filter results by build state (pending, running, completed, failed). Use the uuid from a build to poll its output via the Get Node.js Build Logs endpoint.

Path Parameters
  • username
    Type: string
    required
  • domain
    Type: string
    required

    Domain name

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

  • states
    Type: array string[] enum

    Build states to filter by

    values
    • pending
    • running
    • completed
    • failed
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/builds \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'