v1.31.0
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

Hosting: Files

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'
{
  "data": [
    {
      "uuid": "69f07fe2-197a-4fb3-9dae-606f965ad13d",
      "state": "pending",
      "options": {
        "node_version": 24,
        "app_type": "vite",
        "root_directory": "src",
        "output_directory": "dist",
        "build_script": "build",
        "entry_file": "server.js",
        "package_manager": "npm",
        "source_type": "archive",
        "source_options": {
          "archive_path": "archive.zip"
        }
      },
      "created_at": "2024-05-29T05:49:49.067239Z",
      "updated_at": "2024-05-29T05:49:49.067239Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create NodeJS build from archive

Upload a project archive, auto-detect build settings, and immediately start a Node.js build.

This is the recommended single-step approach for deploying a Node.js application. The archive is uploaded to the website's file storage, build settings are auto-detected from the package.json inside the archive, and the build process starts automatically. Optional override fields take precedence over auto-detected values. Maximum archive size is 50MB.

Before archiving, exclude node_modules/ and any build output directories (e.g. dist/, .next/, build/) — they are not needed because the build process runs the install step automatically, and including them unnecessarily increases the archive size. This also helps keep the archive well under the 50MB limit.

Example (zip):

zip -r archive.zip . --exclude "node_modules/*" --exclude "dist/*"

The returned build uuid can be used to poll progress and retrieve logs via the Get Node.js Build Logs endpoint.

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

    Domain name

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

    Project archive file (.zip, .tar.gz, or .tgz), maximum 50MB

  • app_type
    Type: string | null enum

    Node.js application type override

    values
    • create-react-app
    • vite
    • angular
    • react
    • vue
    • parcel
    • express
    • fastify
    • nest
  • build_script
    Type: string | null
    min length:  
    1
    max length:  
    64

    Build script override

  • entry_file
    Type: string | null
    min length:  
    1
    max length:  
    200

    Main entry point file override

  • node_version
    Type: integer | null enum

    Node.js version override (auto-detected from package.json if omitted)

    values
    • 18
    • 20
    • 22
    • 24
  • output_directory
    Type: string | null
    min length:  
    1
    max length:  
    200

    Build output directory override relative to the root directory

  • package_manager
    Type: string | null enum

    Package manager override

    values
    • npm
    • yarn
    • pnpm
  • root_directory
    Type: string | null
    min length:  
    1
    max length:  
    200

    Application root directory override (where package.json is located) relative to public_html

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/from-archive
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/builds/from-archive \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "archive": "",
  "node_version": 20,
  "app_type": "vite",
  "root_directory": "webapp",
  "output_directory": "dist",
  "build_script": "build",
  "entry_file": "server.js",
  "package_manager": "npm"
}'
{
  "uuid": "69f07fe2-197a-4fb3-9dae-606f965ad13d",
  "state": "pending",
  "options": {
    "node_version": 24,
    "app_type": "vite",
    "root_directory": "src",
    "output_directory": "dist",
    "build_script": "build",
    "entry_file": "server.js",
    "package_manager": "npm",
    "source_type": "archive",
    "source_options": {
      "archive_path": "archive.zip"
    }
  },
  "created_at": "2024-05-29T05:49:49.067239Z",
  "updated_at": "2024-05-29T05:49:49.067239Z"
}

Get NodeJS build logs

Retrieve logs from a specific Node.js build process.

To stream live output while a build is running, poll this endpoint repeatedly while the build state is running, passing the previously returned lines count as from_line to fetch only new output since the last call. Log content may contain ANSI escape sequences (color codes).

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

    Domain name

  • uuid
    Type: string Format: uuid
    required

    Build UUID

Query Parameters
  • from_line
    Type: integer | null

    Line from which to start retrieving logs

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/builds/{uuid}/logs
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/builds/123e4567-e89b-12d3-a456-426614174000/logs \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "logs": "added 10 packages, and audited 11 packages in 8s\n\n3 packages are looking for funding\n  run `npm fund` for details",
  "lines": 3
}

Restart Node.js application

Restarts the Node.js server process for the website. Does not rebuild or redeploy the application. Use it to apply environment or configuration changes, or to recover a hung application.

Only applicable to server-side applications (Express, Next.js, NestJS, etc.). Static front-end apps (React, Vue, Vite) have no persistent server process, so restarting them has no effect. Returns success even when the website has no server process to restart.

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

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/server/restart
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/server/restart \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List Node.js vulnerabilities

Lists known npm package vulnerabilities detected on a Node.js website, enriched with advisory metadata (severity, CVSS score, CVE, advisory URL). Results are sorted from the most severe to the least severe, then by publish date (newest first). Use the severities query parameter to filter.

Vulnerabilities with is_patchable set to true can be auto-fixed via the Patch Node.js Vulnerabilities endpoint, which opens a GitHub pull request with updated package versions. Auto-fix is only available for websites deployed from a connected GitHub repository. Vulnerabilities with is_patching_in_progress set to true are already included in an open patch pull request; while any patch pull request is open, new patch requests for this website are rejected until it is merged or closed.

Data comes from periodic dependency scans, so it may lag behind the latest deployment. An empty list means the most recent scan found no vulnerabilities; it does not guarantee the current deployment is vulnerability-free. Available on Business and Cloud Hosting plans.

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

    Domain name

Query Parameters
  • severities
    Type: array string[] enum

    Severities to filter by

    values
    • low
    • moderate
    • high
    • critical
    • unknown
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/vulnerabilities \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "package_name": "lodash",
    "installed_version": "4.17.0",
    "is_direct": true,
    "is_patchable": true,
    "fix_version": "4.17.21",
    "vulnerability_id": "GHSA-jf85-cpcp-j695",
    "severity": "high",
    "title": "Prototype Pollution in lodash",
    "description": "Versions of lodash prior to 4.17.11 are vulnerable to prototype pollution.",
    "cvss_score": 9.8,
    "cve": "CVE-2019-10744",
    "cwe": "CWE-1321",
    "url": "https://github.com/advisories/GHSA-jf85-cpcp-j695",
    "published_at": "2019-07-26T00:00:00Z",
    "is_patching_in_progress": false
  }
]

Patch Node.js vulnerabilities

Patches the selected Node.js vulnerabilities by updating the affected package versions in package.json and opening a GitHub pull request in the connected repository. The customer reviews and merges the pull request; merging triggers the automatic deployment.

Auto-fix is only available for websites deployed from a connected GitHub repository. Websites deployed from an archive have no auto-fix path and return a 404. The Hostinger GitHub App needs write access to the repository; without it the request fails with a 403 explaining the missing permission.

Only vulnerabilities with is_patchable set to true can be patched. Non-patchable IDs in the selection are skipped; the pull request covers the patchable subset, listed in patched_vulnerability_ids. Selections without any patchable vulnerability are rejected with a 422. Only one patch pull request can be open at a time per website; close or merge it before patching again. Available on Business and Cloud Hosting plans.

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

    Domain name

Body·
required
application/json
  • vulnerability_ids
    Type: array string[] 1…
    required

    List of vulnerability IDs to patch, as returned by the list vulnerabilities endpoint.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/websites/{domain}/nodejs/vulnerabilities/patch
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/nodejs/vulnerabilities/patch \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "vulnerability_ids": [
    "GHSA-1111-2222-3333"
  ]
}'
{
  "pr_url": "https://github.com/owner/repo/pull/42",
  "pr_number": 42,
  "head_branch": "fix/patch-vulnerabilities-a1b2c3d4",
  "patched_vulnerability_ids": [
    "GHSA-jf85-cpcp-j695"
  ]
}

Orders

Manage hosting service orders and subscriptions. This category provides access to order information, status tracking, and order management capabilities for hosting services.

List orders

Retrieve a paginated list of orders accessible to the authenticated client.

This endpoint returns orders of your hosting accounts as well as orders of other client hosting accounts that have shared access with you.

Use the available query parameters to filter results by order statuses or specific order IDs for more targeted results.

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

  • statuses
    Type: array string[] | null enum

    Filter by order statuses

    values
    • active
    • deleting
    • deleted
    • suspended
  • order_ids
    Type: array integer[] | null

    Filter by specific order IDs

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/orders
curl /api/hosting/v1/orders \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 12345,
      "client_id": 67890,
      "subscription_id": "sub_abc123",
      "created_at": "2023-10-08T12:00:00+00:00",
      "plan": {
        "name": "hostinger_business"
      },
      "status": "active"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

PHP

Reset PHP extensions

Resets all PHP extensions of the website to their default state.

Use it to recover from extension conflicts or restore the original configuration.

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

    Domain name

Responses
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions/reset
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/php/extensions/reset \
  --request PATCH \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get PHP details

Returns the full PHP configuration for the website: current version, available versions (supported and unsupported), enabled/disabled extensions, options with their current value, default, type and the plan limit (max), and conflicting extension groups.

Use it to check the current PHP setup before updating the version, extensions or options.

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}/php/details
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/php/details \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "php_version": "8.1",
  "php_version_full": "8.1.27",
  "php_versions": {
    "supported": {
      "8.1": "PHP 8.1"
    },
    "unsupported": {
      "5.2": "PHP 5.2"
    }
  },
  "options": {
    "additionalProperty": {
      "type": "bool",
      "value": "On",
      "comment": "Allows PHP file functions to retrieve data from remote locations",
      "default": "On",
      "range": "8M-512M",
      "max": "512M"
    }
  },
  "extensions": {
    "yaml": {
      "state": "enabled",
      "description": ""
    }
  },
  "conflicting_extensions": [
    [
      "apc",
      "opcache"
    ]
  ]
}

Get PHP info

Returns the full phpinfo page (HTML) for the website.

Use it to debug PHP issues or inspect the complete PHP environment of the website.

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}/php/php-info
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/php/php-info \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "info": "<html>...</html>"
}

Update PHP extensions

Enables or disables PHP extensions (modules) for the website.

Use the Get PHP details endpoint to check the current extension states before changing them.

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

    Domain name

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

    PHP extensions to disable.

  • enable
    Type: array string[]

    PHP extensions to enable.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/websites/{domain}/php/extensions
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/php/extensions \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "enable": [
    "json",
    "yaml"
  ],
  "disable": [
    "imagick"
  ]
}'
{
  "message": "Request accepted"
}

Update PHP options

Updates PHP options for the website (e.g. memory_limit, max_execution_time, upload_max_filesize). Only provide the options you want to change, inside the options object.

Values above the account plan limit are silently capped to that limit, so the request can succeed with a smaller applied value. Call the Get PHP details endpoint afterwards to read the applied value.

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

    Domain name

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

    Map of PHP options to update, keyed by option name. Only include options you want to change.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/websites/{domain}/php/options
curl /api/hosting/v1/accounts/u123456789/websites/mydomain.tld/php/options \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "options": {
    "memory_limit": "512M",
    "max_execution_time": 300,
    "upload_max_filesize": "256M"
  }
}'
{
  "message": "Request accepted"
}

Update PHP version

Changes the PHP version of the website.

Use the Get PHP details endpoint to see the versions available for the website.

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

    Domain name

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

    PHP version to switch the website to.

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

Websites

Manage hosted websites and web applications. This category includes endpoints for website deployment, configuration, monitoring, and management of hosting resources.

List websites

Retrieve a paginated list of websites (main and addon types) accessible to the authenticated client.

This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you.

Use the available query parameters to filter results by username, order ID, enabled status, or domain name for more targeted results.

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

  • username
    Type: string | null

    Filter by specific username

  • order_id
    Type: integer | null

    Order ID

  • is_enabled
    Type: boolean | null

    Filter by enabled status

  • domain
    Type: string | null

    Filter by domain name (exact match)

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/websites
curl /api/hosting/v1/websites \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "domain": "example.com",
      "vhost_type": "main",
      "is_enabled": true,
      "username": "cl_user123",
      "client_id": 67890,
      "order_id": 12345,
      "created_at": "2024-01-15T10:30:00+00:00",
      "root_directory": "/home/u123456798/domains/example.com/public_html",
      "parent_domain": "parent.com"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create website

Create a new website for the authenticated client.

Provide the domain name and associated order ID to create a new website. The datacenter_code parameter is required when creating the first website on a new hosting plan - this will set up and configure new hosting account in the selected datacenter.

Subsequent websites will be hosted on the same datacenter automatically.

Website creation takes up to a few minutes to complete. Check the websites list endpoint to see when your new website becomes available.

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

    Domain name for the website. Cannot start with "www."

  • order_id
    Type: integer
    required

    ID of the associated order

  • datacenter_code
    Type: string | null

    Datacenter code. This parameter is required when creating the first website on a new hosting plan.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/websites
curl /api/hosting/v1/websites \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "example.com",
  "order_id": 12345,
  "datacenter_code": "us-east-1"
}'
{
  "message": "Request accepted"
}

Delete website

Permanently deletes a website and all of its data. This action is destructive and cannot be undone. Always ask the user for explicit confirmation before calling this endpoint.

All website files, databases and related configuration will be removed. The hosting plan itself is kept, so a new website can be created on it afterwards.

The confirm field must be boolean true, otherwise the request is rejected.

Supported websites: main and addon domain websites on web hosting plans, and Website Builder websites. Parked domains and subdomains cannot be deleted with this endpoint. The domain must be the exact website domain, not a preview domain or an alias.

Returns 404 when the domain does not exist or does not belong to the authenticated client.

Website removal is processed asynchronously and can take a few minutes to complete. The response returns before the removal finishes.

Path Parameters
  • domain
    Type: string
    required

    Domain name

Body·
required
application/json
  • confirm
    enum
    const:  
    true
    required

    Must be boolean true to confirm the permanent deletion of the website.

    values
    • true
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/websites/{domain}
curl /api/hosting/v1/websites/mydomain.tld \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "confirm": true
}'
{
  "message": "Request accepted"
}

Cache

Agency Hosting: Cache

Clear Agency Plan website cache

Clears cache for all domains associated with an Agency Plan website, including its preview domain.

This operation clears all cache types for the website.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/agency-hosting/v1/websites/{website_uid}/cache
curl /api/agency-hosting/v1/websites/zpwlGlp19/cache \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Cron Jobs

List Agency Plan website cron jobs

Returns a paginated list of cron jobs configured for an Agency Plan website.

Each entry includes the schedule expression and the command executed on that schedule.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

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
Request Example for get/api/agency-hosting/v1/websites/{website_uid}/cron-jobs
curl /api/agency-hosting/v1/websites/zpwlGlp19/cron-jobs \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "01931d6f-68f5-7b72-8d9e-09c6e1e6aa0e",
      "time": "*/30 * * * *",
      "command": "php artisan schedule:run",
      "created_at": "2024-10-28T12:00:00+00:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create Agency Plan website cron job

Creates a cron job for an Agency Plan website from a schedule expression and a command.

Returns the created cron job, including its uuid, which is required to delete the cron job.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

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

    Command to run on the schedule. Must not contain pipe (|) or redirection (<, >) characters.

  • time
    Type: string
    required

    Cron schedule expression (standard 5-field crontab syntax).

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/cron-jobs
curl /api/agency-hosting/v1/websites/zpwlGlp19/cron-jobs \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "time": "*/30 * * * *",
  "command": "php artisan schedule:run"
}'
{
  "uuid": "01931d6f-68f5-7b72-8d9e-09c6e1e6aa0e",
  "time": "*/30 * * * *",
  "command": "php artisan schedule:run",
  "created_at": "2024-10-28T12:00:00+00:00"
}

Delete Agency Plan website cron job

Permanently deletes the cron job identified by its uuid from an Agency Plan website.

The operation is idempotent: deleting a cron job that does not exist succeeds without error.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • uuid
    Type: string Format: uuid
    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/agency-hosting/v1/websites/{website_uid}/cron-jobs/{uuid}
curl /api/agency-hosting/v1/websites/zpwlGlp19/cron-jobs/01931d6f-68f5-7b72-8d9e-09c6e1e6aa0e \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Databases

List Agency Plan website databases

Returns a paginated list of MySQL databases created for an Agency Plan website.

Each entry includes the database's non-system users.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

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
Request Example for get/api/agency-hosting/v1/websites/{website_uid}/databases
curl /api/agency-hosting/v1/websites/zpwlGlp19/databases \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "name": "my_database",
      "created_at": "2024-05-29T05:49:49+00:00",
      "users": [
        {
          "name": "my_user",
          "host": "localhost",
          "created_at": "2024-05-29T05:49:49+00:00"
        }
      ]
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create Agency Plan website database

Creates a MySQL database with a dedicated user for an Agency Plan website.

The database name, username, and password must all be provided by the caller.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Body·
required
application/json
  • database_name
    Type: string
    min length:  
    3
    max length:  
    30
    required

    Database name to create (alphanumeric characters).

  • database_user
    Type: string
    min length:  
    3
    max length:  
    12
    required

    Database username to create alongside the database (alphanumeric characters).

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

    Password for the database user (requires mixed case, letters, and numbers).

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/databases
curl /api/agency-hosting/v1/websites/zpwlGlp19/databases \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "database_name": "mydatabase",
  "database_user": "myuser",
  "password": "Str0ngP@ssword!"
}'
{
  "name": "my_database",
  "created_at": "2024-05-29T05:49:49+00:00",
  "users": [
    {
      "name": "my_user",
      "host": "localhost",
      "created_at": "2024-05-29T05:49:49+00:00"
    }
  ]
}

Delete Agency Plan website database

Permanently deletes a MySQL database and all its data from an Agency Plan website, including its users.

The operation is idempotent: deleting a database that does not exist succeeds without error.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • database_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/agency-hosting/v1/websites/{website_uid}/databases/{database_name}
curl /api/agency-hosting/v1/websites/zpwlGlp19/databases/my_database \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Create Agency Plan website database user

Creates a user for an existing database on an Agency Plan website.

Each database supports a single non-system user; creating a user for a database that already has one fails.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • database_name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

Body·
required
application/json
  • database_user
    Type: string
    min length:  
    3
    max length:  
    12
    required

    Database username to create (alphanumeric and underscores).

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

    Password for the database user (requires mixed case, letters, and numbers).

  • host
    Type: string | null
    min length:  
    1
    max length:  
    40

    Host the user connects from (IPv4, IPv6, % wildcard, or localhost). Defaults to localhost.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/databases/{database_name}/users
curl /api/agency-hosting/v1/websites/zpwlGlp19/databases/my_database/users \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "database_user": "my_user",
  "password": "Str0ngP@ssword!",
  "host": "localhost"
}'
{
  "name": "my_user",
  "host": "localhost",
  "created_at": "2024-05-29T05:49:49+00:00"
}

Delete Agency Plan website database user

Permanently deletes a database user from an Agency Plan website database, revoking all access it had.

The operation is idempotent: deleting a user that does not exist succeeds without error.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • database_name
    Type: string
    required

    Full database name as returned by the list databases endpoint.

  • database_user_name
    Type: string
    required

    Database username as returned by the list databases endpoint.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/agency-hosting/v1/websites/{website_uid}/databases/{database_name}/users/{database_user_name}
curl /api/agency-hosting/v1/websites/zpwlGlp19/databases/my_database/users/my_user \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Datacenters

Agency Hosting: Datacenters

List available datacenters for an Agency Plan order

Lists the datacenters available for provisioning a new website on the given Agency Plan hosting order.

Each datacenter includes a pinger_url you can ping from the client to measure round-trip latency; comparing the results across datacenters lets you pick the nearest one (lowest ping) before choosing its code as the datacenter_code when creating a website setup.

Path Parameters
  • order_id
    Type: integer
    required

    Agency Plan order ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/orders/{order_id}/datacenters
curl /api/agency-hosting/v1/orders/123456/datacenters \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "title": "Europe (Netherlands)",
    "code": "ukfast",
    "country": "uk",
    "coordinates": {
      "latitude": 51.5074,
      "longitude": 0.1278
    },
    "pinger_url": "https://my-website.com/ping.php"
  }
]

Domains

Change Agency Plan website domain

Changes the primary domain for an Agency Plan website.

Provide the current domain in the path and the new domain in the request body. Set domain to null to revert to the temporary domain.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • from_domain
    Type: string
    required

    Current domain name to change from

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

    New domain to assign to the website. Set to null to revert to the temporary domain.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/agency-hosting/v1/websites/{website_uid}/domains/{from_domain}
curl /api/agency-hosting/v1/websites/zpwlGlp19/domains/old.example.com \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "new.example.com"
}'
{
  "message": "Request accepted"
}

Link domain to Agency Plan website

Links a domain to the specified Agency Plan website so it can serve traffic for that domain.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

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

    Fully qualified domain name to link to the website

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/domains
curl /api/agency-hosting/v1/websites/zpwlGlp19/domains \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "example.com"
}'
{
  "message": "Request accepted"
}

List Agency Plan domains

Returns a paginated list of domains associated with Agency Plan websites accessible to the authenticated client.

Use the website_uuids filter to narrow results to specific websites.

Query Parameters
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

  • website_uuids
    Type: array string[] | null

    Filter by website UIDs

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/domains
curl /api/agency-hosting/v1/domains \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "fqdn": "example.com",
      "website_uid": "zpwlGlp19",
      "created_at": "2024-05-29T05:49:49+00:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Unlink domain from Agency Plan website

Unlinks a domain from the specified Agency Plan website.

The website stops serving traffic on this domain immediately.

Website files and database are preserved, and any other linked domains remain accessible.

If this is the only domain on the website, unlinking leaves the website without an accessible domain.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

  • domain
    Type: string
    required

    Domain name

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

Files

Import Agency Plan website from archive

Imports an Agency Plan website from an already-uploaded archive.

Upload the archive to the website's root directory via file browser first, then provide its filename in this request. Website contents are overwritten by the archive contents. Supported archive types: .zip, .tar, .tar.gz, .tgz.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Body·
required
application/json

Import a website from an already-uploaded archive

  • archive_name
    Type: string
    required

    Archive filename (e.g., archive.zip). The file must already be uploaded to the website's .h5g/ directory.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/files/import-archive
curl /api/agency-hosting/v1/websites/zpwlGlp19/files/import-archive \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "archive_name": "archive.zip"
}'
{
  "message": "Request accepted"
}

Orders

Agency Hosting: Orders

List Agency Plan orders

Returns a paginated list of Agency Plan orders accessible to the authenticated client.

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
Request Example for get/api/agency-hosting/v1/orders
curl /api/agency-hosting/v1/orders \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 123456,
      "client_id": 123456,
      "status": "active",
      "plan": {
        "name": "Shared Business hosting",
        "key": "shared_business_hosting"
      },
      "datacenter": {
        "code": "ukfast",
        "country": "uk"
      },
      "created_at": "2024-05-29T05:49:49+00:00"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Website Setups

Provision a new Agency Plan website

Provisions a new website on one of your Agency Plan hosting orders.

Choose the datacenter, stack (flavor), and PHP version for the site. Optionally attach your own domain — omit it, set it to null, or leave it unavailable and a free *.hostingersite.com subdomain is generated instead — and/or install WordPress by supplying the wordpress details (admin account, site title, and language).

Common setups:

  • Plain PHP site: flavor set to php-fpm, with settings.php.version; omit wordpress and type.
  • WordPress site: flavor set to the desired WordPress version (e.g. wp-7.0), plus the wordpress block (admin account, title, language).
  • Static/Node.js frontend app: flavor set to php-fpm and type set to node-static.

Provisioning runs in the background, so the response returns immediately with a setup UUID that identifies the job. The new website becomes reachable once provisioning finishes.

Path Parameters
  • order_id
    Type: integer
    required

    Agency Plan order ID

Body·
required
application/json

Create a new Agency Plan website setup on the given order

  • datacenter_code
    Type: string
    required

    Datacenter code where the website should be provisioned. Available codes depend on live capacity and are not a fixed set.

  • flavor
    Type: string Pattern: ^(wp-[0-9]+(\.[0-9]+){1,2}|php-fpm)$
    required

    Setup flavor: a specific WordPress version in the format wp-<major>.<minor> or wp-<major>.<minor>.<patch> (e.g. wp-6.8.2), or php-fpm for a plain PHP stack. Generic versions like wp-latest are not allowed.

  • settings
    Type: object
    required

    Website settings

  • clone
    Type: object

    Clone the new website from an existing website

  • derive_domain
    Type: object

    Derive the domain from an existing vhost

  • domain
    Type: string | null

    Primary domain to attach to the website. Omit or set to null to get a free auto-generated *.hostingersite.com subdomain instead.

  • type
    Type: string | null enum

    Website type

    values
    • horizons
    • node-static
  • wordpress
    Type: object

    WordPress installation options

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/orders/{order_id}/websites/setups
curl /api/agency-hosting/v1/orders/123456/websites/setups \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "datacenter_code": "us-east",
  "flavor": "wp-6.8.2",
  "settings": {
    "php": {
      "version": "8.3"
    }
  },
  "domain": "example.com",
  "type": "node-static",
  "wordpress": {
    "language": "en_US",
    "title": "My Blog",
    "admin": {
      "user": "admin",
      "password": "S3cureP@ssw0rd",
      "email": "admin@example.com"
    }
  },
  "clone": {
    "website_uid": "zpwlGlp19"
  },
  "derive_domain": {
    "from_vhost": {
      "username": "u123456789",
      "vhost": "example.com"
    }
  }
}'
{
  "setup_uuid": "0193b6d4-fabb-70e0-8ea4-cfe060a45898"
}

Get Agency Plan website setup status

Returns the current status of an Agency Plan website setup started via the setups endpoint.

Poll this endpoint using the setup_uuid returned from the provisioning request until status becomes completed, at which point website_uid identifies the new website.

Path Parameters
  • order_id
    Type: integer
    required

    Agency Plan order ID

  • setup_uuid
    Type: string Format: uuid
    required

    Website setup UUID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/orders/{order_id}/websites/setups/{setup_uuid}
curl /api/agency-hosting/v1/orders/123456/websites/setups/0193b6d4-fabb-70e0-8ea4-cfe060a45898 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "website_uid": "zpwlGlp19",
  "status": "running"
}

Websites

Build Agency Plan website NodeJS assets

Builds and deploys a Node.js application for an Agency Plan website from an already-uploaded archive.

Upload the archive to file browser first, then provide its relative path from document root in this request. Website contents are overwritten by the build result, which is deployed to public_html.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Body·
required
application/json

Build Node.js assets from an already-uploaded archive

  • archive_path
    Type: string
    required

    Directory, relative to the website document root, where the uploaded site archive currently lives. Most commonly this is simply public_html.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/agency-hosting/v1/websites/{website_uid}/build-assets
curl /api/agency-hosting/v1/websites/zpwlGlp19/build-assets \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "archive_path": "public_html"
}'
{
  "message": "Request accepted"
}

Get Agency Plan website details

Retrieves detailed information about a specific Agency Plan website, including configuration, status, metadata, hosting plan details, and resource quotas.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/websites/{website_uid}
curl /api/agency-hosting/v1/websites/zpwlGlp19 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "uid": "zpwlGlp19",
  "ipv4": "192.161.10.1",
  "flavor": "wp-6.2.0",
  "type": "node-static",
  "description": "Very awesome website",
  "state": "active",
  "created_at": "2024-05-29T05:49:49+00:00",
  "domains": [
    {
      "fqdn": "test.com",
      "parent_fqdn": "test.com",
      "ipv6": "2001:db8::1",
      "created_at": "2024-05-29T05:49:49+00:00",
      "nameservers": [
        "a.dns-parking.com",
        "b.dns-parking.com"
      ],
      "ssl_cert": {
        "names": [
          "test.com",
          "www.test.com"
        ],
        "expires_at": "2024-05-29T05:49:49+00:00",
        "created_at": "2024-05-29T05:49:49+00:00"
      },
      "custom_ssl_cert": {
        "is_expired": false,
        "expires_at": "2024-05-29T05:49:49+00:00",
        "created_at": "2024-05-29T05:49:49+00:00"
      }
    }
  ],
  "preview_domain": {
    "fqdn": "plum-bee-184082.hostingersite.com",
    "created_at": "2024-05-29T05:49:49+00:00"
  },
  "settings": {
    "php": {
      "version": "8.3",
      "workers": 4
    }
  },
  "wordpress": {
    "domain": "test.com",
    "title": "My Blog",
    "language": "en_US",
    "is_config_locked": true,
    "created_at": "2024-05-29T05:49:49+00:00"
  },
  "remote_access": {
    "mode": "ssh_and_sftp",
    "ssh": {
      "username": "u123456789_abcDeFg",
      "host": "192.161.10.1",
      "port": 65002,
      "is_enabled": true,
      "is_password_enabled": true
    },
    "sftp": {
      "username": "u123456789_abcDeFg",
      "host": "192.161.10.1",
      "port": 65002,
      "is_enabled": true
    }
  },
  "server": {
    "hostname": "us-west-1.hstgr.io",
    "country_code": "us"
  },
  "order": {
    "id": 123456,
    "status": "active",
    "created_at": "2024-05-29T05:49:49+00:00",
    "plan": {
      "name": "Hosting Single",
      "parameters": {
        "disk_quota_bytes": 21474836480,
        "inode_quota": 10000,
        "cpu_cores": 2,
        "memory_quota_bytes": 1073741824,
        "disk_iops_quota": 100000,
        "process_quota": 10000,
        "website_quota": 10,
        "max_databases_per_website": 5,
        "is_cdn_available": true
      }
    }
  },
  "user": {
    "username": "u123456789",
    "state": "active"
  },
  "staging_root": {
    "uid": "zpwlGlp19"
  }
}

Delete Agency Plan website

Permanently deletes an Agency Plan website. Deletion is processed asynchronously: the website is immediately transitioned to a deleting state and the underlying server resources are removed in the background.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/agency-hosting/v1/websites/{website_uid}
curl /api/agency-hosting/v1/websites/zpwlGlp19 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List running Agency Plan website processes

Lists active and recently completed asynchronous processes for an Agency Plan website.

Each process has a unique ID (for tracking), a type, and a status (running, completed, failed). Poll this endpoint after initiating async operations (SSL setup, backups, cloning) to track progress.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/websites/{website_uid}/processes
curl /api/agency-hosting/v1/websites/zpwlGlp19/processes \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": "0193b6d4-fabb-70e0-8ea4-cfe060a45898",
    "type": "backup_generation",
    "status": "running"
  }
]

WordPress

Change Agency Plan website WordPress core version

Changes the installed WordPress core version on an Agency Plan website to one of the versions available for installation.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

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

    Target WordPress core version to install. Must be one of the available versions.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/agency-hosting/v1/websites/{website_uid}/wordpress/settings/version
curl /api/agency-hosting/v1/websites/zpwlGlp19/wordpress/settings/version \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "version": "6.5.5"
}'
{
  "message": "Request accepted"
}

Get Agency Plan website WordPress settings

Returns the current WordPress settings for an Agency Plan website: installed core version, LiteSpeed Cache plugin status, object cache status, and maintenance mode status.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/websites/{website_uid}/wordpress/settings
curl /api/agency-hosting/v1/websites/zpwlGlp19/wordpress/settings \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "core_version": "6.5.5",
  "is_lite_speed_cache_enabled": true,
  "is_object_cache_enabled": false,
  "is_maintenance_mode_enabled": false
}

List available WordPress versions for an Agency Plan website

Lists the WordPress core versions available for installation on an Agency Plan website.

Path Parameters
  • website_uid
    Type: string
    required

    Agency Plan website UID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/agency-hosting/v1/websites/{website_uid}/wordpress/settings/versions
curl /api/agency-hosting/v1/websites/zpwlGlp19/wordpress/settings/versions \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "version": "6.5.5"
  }
]

Installations

Check if WordPress installations are valid

Check whether one or more WordPress installations are valid and working correctly. Detects broken installations caused by missing files, broken plugins, themes and similar issues.

Provide the WordPress installation (software) identifiers in the body. They can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
Body·
required
application/json
  • software_ids
    Type: array string[] 1…100
    required

    WordPress installation (software) identifiers to validate.

  • force
    Type: boolean

    Force fresh validation without cache. Preferable for troubleshooting purposes.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/installations/check-is-valid
curl /api/hosting/v1/accounts/u123456789/wordpress/installations/check-is-valid \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "software_ids": [
    "123",
    "456"
  ],
  "force": false
}'
[
  {
    "software_id": "123",
    "is_valid": true
  }
]

Delete WordPress installation

Delete the specified WordPress installation, with optional file and database removal. This removes all associated components including plugins, themes, staging websites and any other related data.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • delete_database
    Type: boolean

    Delete the installation database.

  • delete_files
    Type: boolean

    Delete installation files from disk.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/hosting/v1/accounts/{username}/wordpress/{software}
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789 \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "delete_files": false,
  "delete_database": false
}'
{
  "message": "Request accepted"
}

Detect WordPress installations

Trigger a background scan to detect WordPress installations for the account.

This operation is asynchronous: a successful response only means the scan has been queued. Poll GET /api/hosting/v1/wordpress/installations to fetch the detected installations once the scan completes.

Path Parameters
  • username
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/installations/detect
curl /api/hosting/v1/accounts/u123456789/wordpress/installations/detect \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Install WordPress

Install WordPress on an existing website.

The website must already exist before calling this endpoint. To create a new website first, use POST /api/hosting/v1/websites and poll GET /api/hosting/v1/websites until it appears.

Call GET /api/hosting/v1/wordpress/installations filtered by username and domain before proceeding to check whether WordPress is already installed on the target domain/path. If WordPress already exists and overwrite is false (the default), the async job will fail.

This operation is asynchronous: a successful response only means the install job has been queued, not that WordPress is ready. Installation typically takes 1-2 minutes. Poll GET /api/hosting/v1/wordpress/installations filtered by username and domain to track progress. When the installation appears in that list, WordPress is ready.

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

    WordPress admin credentials

  • domain
    Type: string
    required

    Domain of the existing website where WordPress will be installed

  • site_title
    Type: string
    required

    Title of the WordPress site

  • auto_updates
    Type: string | null enum

    WordPress core auto-update policy

    values
    • all
    • none
    • minor
  • database
    Type: object | null

    Optional. If the named database already exists, it will be used for this WordPress install. Otherwise a new database is created with a generated name and random credentials.

  • directory
    Type: string | null

    Relative directory to install WordPress into. Defaults to the website root when omitted.

  • language
    Type: string | null

    WordPress locale. Defaults to en_US when omitted.

  • overwrite
    Type: boolean | null

    When false (default), does not replace an existing installation. If WordPress is already installed on the domain/path, the async install job fails unless true.

  • version
    Type: string | null

    WordPress core version to install. If omitted, the latest core version compatible with the account vhost PHP version is selected.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/installations
curl /api/hosting/v1/accounts/u123456789/wordpress/installations \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "example.com",
  "site_title": "My site",
  "language": "en_US",
  "directory": "public_html",
  "overwrite": false,
  "auto_updates": "minor",
  "version": "6.5.2",
  "credentials": {
    "email": "owner@example.com",
    "login": "admin",
    "password": "********"
  },
  "database": {
    "name": "mydb",
    "password": "********"
  }
}'
{
  "message": "Request accepted"
}

List WordPress installations

List WordPress installations accessible to the authenticated client.

Use this endpoint to discover existing WordPress installations and to poll for installation status after calling the install endpoint. When a newly requested installation appears in this list, WordPress is ready. Filter by username and domain to narrow results to a specific website.

Each installation includes a valid flag and, when invalid, a validationError describing why.

Query Parameters
  • username
    Type: string | null

    Filter by specific username

  • domain
    Type: string | null

    Filter by domain name (exact match)

  • ownership
    Type: string | null enum

    Filter by ownership type. Defaults to "owned". Use "all" to include both owned and managed installations.

    values
    • owned
    • managed
    • all
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/wordpress/installations
curl /api/hosting/v1/wordpress/installations \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": "123",
    "username": "u123456789",
    "domain": "example.com",
    "site_title": "My site",
    "url": "https://example.com",
    "directory": "public_html",
    "language": "en_US",
    "login": "admin",
    "email": "owner@example.com",
    "is_valid": true,
    "validation_error": "Invalid domain",
    "created_at": "2022-01-01T00:00:00Z"
  }
]

List available WordPress core updates

List available WordPress core updates for the specified installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/updates
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/updates \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "version": "6.5.2",
    "type": "minor",
    "url": "https://wordpress.org/wordpress-6.5.2.zip"
  }
]

Get installation JWT token

Return a JWT token used to authenticate requests against the specified WordPress installation, including its MCP (Model Context Protocol) endpoint.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/jwt-token
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/jwt-token \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9",
  "expires_in": 3600,
  "expires_at": "2024-06-05T12:08:00Z",
  "mcp_url": "https://example.com/wp-json/hostinger/mcp"
}

Show WordPress core version

Show the WordPress core version for the specified installation, along with known vulnerabilities affecting it.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/version
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/version \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "version": "6.5.2",
  "vulnerabilities": [
    {
      "title": "Cross-Site Scripting (XSS)",
      "description": "A stored XSS vulnerability affecting older versions.",
      "affected_in": "4.7.0",
      "fixed_in": "4.7.1",
      "direct_url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/example"
    }
  ]
}

Update WordPress core

Update the WordPress core for the specified installation (minor update or a specific version).

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the update job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • minor
    Type: boolean

    Update the minor version only.

  • version
    Type: string | null

    Update to a specific WordPress core version.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/update
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/update \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "minor": false,
  "version": "6.5.0"
}'
{
  "message": "Request accepted"
}

Plugins

Activate WordPress plugin

Activate an installed plugin on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the activation job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Slug of the installed plugin to activate.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/activate
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/activate \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "plugin": "akismet"
}'
{
  "message": "Request accepted"
}

Deactivate WordPress plugin

Deactivate an installed plugin on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the deactivation job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Slug of the installed plugin to deactivate.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/deactivate
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/deactivate \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "plugin": "akismet"
}'
{
  "message": "Request accepted"
}

Install WordPress plugins

Install one or more plugins on an existing WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field). Use GET /api/hosting/v1/wordpress/plugins to discover the plugin slugs available for installation.

This operation is asynchronous: a successful response only means the install job has been queued, not that the plugins are ready.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • plugins
    Type: array string[] 1…20
    required

    Plugin slugs to install. Use GET /api/hosting/v1/wordpress/plugins to discover available slugs.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/install
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/install \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "plugins": [
    "akismet",
    "hello-dolly"
  ]
}'
{
  "message": "Request accepted"
}

List available WordPress plugins

List plugins recommended for installation on a WordPress installation that are not yet installed.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/available
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/available \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "slug": "akismet",
    "title": "Akismet Anti-Spam",
    "description": "Protect your site from spam.",
    "onboarding_description_slug": "akismet_onboarding_description",
    "recommended_description_slug": "akismet_recommended_description",
    "link": "https://wordpress.org/plugins/akismet/",
    "version": "5.3",
    "required_wordpress_version": "5.8",
    "required_php_version": "7.2",
    "is_plan_upgrade_needed": false
  }
]

List installed WordPress plugins

List plugins installed on a WordPress installation, including their status, available updates and known vulnerabilities.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Query Parameters
  • category
    enum
    const:  
    cache

    Filter installed plugins by category.

    values
    • cache
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "name": "akismet",
    "title": "Akismet Anti-Spam",
    "version": "5.3",
    "status": "active",
    "update": "none",
    "vulnerabilities": [
      {
        "title": "Cross-Site Scripting (XSS)",
        "description": "A stored XSS vulnerability affecting older versions.",
        "affected_in": "4.7.0",
        "fixed_in": "4.7.1",
        "direct_url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/example"
      }
    ]
  }
]

Search WordPress plugins

Search the WordPress.org plugin directory for plugins available to install.

Use the returned slug values with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/install.

Query Parameters
  • search
    Type: string
    min length:  
    3
    required

    Search term to match against plugin names. Minimum 3 characters.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/wordpress/plugins
curl '/api/hosting/v1/wordpress/plugins?search=seo' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "slug": "akismet",
    "title": "Akismet Anti-Spam",
    "icons": {
      "1x": "https://ps.w.org/akismet/assets/icon-128x128.png",
      "2x": "https://ps.w.org/akismet/assets/icon-256x256.png"
    },
    "description": "Used by millions, Akismet is quite possibly the best way to protect your site from spam."
  }
]

List suggested WordPress plugins

List curated plugin suggestions grouped by website type.

Use the returned slug values with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/install.

Query Parameters
  • order_id
    Type: integer | null

    Optionally scope suggestions to a specific order.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/wordpress/plugins/suggested
curl /api/hosting/v1/wordpress/plugins/suggested \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "website_type": "blog",
    "plugins": [
      {
        "slug": "akismet",
        "title": "Akismet Anti-Spam",
        "description": "Protect your site from spam.",
        "onboarding_description_slug": "akismet_onboarding_description",
        "recommended_description_slug": "akismet_recommended_description",
        "link": "https://wordpress.org/plugins/akismet/",
        "version": "5.3",
        "required_wordpress_version": "5.8",
        "required_php_version": "7.2",
        "is_preselected": true,
        "is_plan_upgrade_needed": false
      }
    ]
  }
]

Check if WooCommerce is installed

Check whether WooCommerce is installed on any WordPress installation of a domain. Optionally filter by domain to scope the check.

Query Parameters
  • domain
    Type: string | null

    Filter by domain name (exact match)

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/wordpress/plugins/is-woocommerce-installed
curl /api/hosting/v1/wordpress/plugins/is-woocommerce-installed \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "is_installed": true
}

Uninstall WordPress plugins

Uninstall one or more plugins from a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the uninstall job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • plugins
    Type: array string[] 1…20
    required

    Slugs of the installed plugins to uninstall.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/uninstall
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/uninstall \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "plugins": [
    "akismet",
    "hello-dolly"
  ]
}'
{
  "message": "Request accepted"
}

Update Hostinger WordPress plugin

Update a Hostinger plugin to its latest version on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the update job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Slug of the Hostinger plugin to update to its latest version.

    values
    • hostinger
    • hostinger-ai-assistant
    • hostinger-affiliate-plugin
    • hostinger-easy-onboarding
    • hostinger-reach
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/hostinger/update
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/hostinger/update \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "slug": "hostinger-affiliate-plugin"
}'
{
  "message": "Request accepted"
}

Update WordPress plugins

Update one or more installed plugins to their latest version on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the update job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • plugins
    Type: array string[] 1…20
    required

    Slugs of the installed plugins to update to their latest version.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/plugins/update
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/plugins/update \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "plugins": [
    "akismet",
    "hello-dolly"
  ]
}'
{
  "message": "Request accepted"
}

Themes

Activate WordPress theme

Activate an installed theme on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the activation job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • theme
    Type: string
    min length:  
    1
    max length:  
    50
    required

    Slug of the installed theme to activate.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/themes/activate
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/themes/activate \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "theme": "twentytwentyone"
}'
{
  "message": "Request accepted"
}

Install WordPress theme

Install a theme on an existing WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

When the theme is one of the Hostinger themes (hostinger-blog, hostinger-affiliate-theme, hostinger-ai-theme), the optional palette, layout, and font fields are forwarded to the custom installer (defaults: palette1, layout1, default). For any other theme they are ignored.

This operation is asynchronous: a successful response only means the install job has been queued, not that the theme is ready.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • theme
    Type: string
    min length:  
    1
    max length:  
    50
    required

    Slug of the theme to install. Hostinger theme slugs (hostinger-blog, hostinger-affiliate-theme, hostinger-ai-theme) trigger the custom installer and forward the optional palette/layout/font fields; any other WordPress theme slug uses the standard installer and ignores those fields.

  • font
    Type: string | null enum

    Font identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.

    values
    • professional
    • modern
    • elegant
    • creative
    • dynamic
    • default
  • layout
    Type: string | null
    min length:  
    1
    max length:  
    50

    Layout identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.

  • palette
    Type: string | null
    min length:  
    1
    max length:  
    50

    Palette identifier. Only applied when the theme is a Hostinger theme; the default is used when omitted.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/themes/install
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/themes/install \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "theme": "hostinger-blog",
  "palette": "palette1",
  "layout": "layout1",
  "font": "default"
}'
{
  "message": "Request accepted"
}

List installed WordPress themes

List themes installed on a WordPress installation, including their status, available updates and known vulnerabilities.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/themes
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/themes \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "name": "twentytwentyone",
    "title": "Twenty Twenty-One",
    "version": "2.2",
    "status": "active",
    "update": "none",
    "vulnerabilities": [
      {
        "title": "Cross-Site Scripting (XSS)",
        "description": "A stored XSS vulnerability affecting older versions.",
        "affected_in": "4.7.0",
        "fixed_in": "4.7.1",
        "direct_url": "https://www.wordfence.com/threat-intel/vulnerabilities/id/example"
      }
    ]
  }
]

List WordPress themes

List WordPress themes available to install.

Use the returned slug values with POST /api/hosting/v1/accounts/{username}/wordpress/{software}/themes/install.

Query Parameters
  • order_id
    Type: integer | null

    Optionally scope themes to a specific order.

  • search
    Type: string | null

    Search term to match against theme names.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/wordpress/themes
curl /api/hosting/v1/wordpress/themes \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "slug": "twentytwentyone",
    "title": "Twenty Twenty-One",
    "url": "https://wordpress.org/themes/twentytwentyone/",
    "featured_image_url": "https://ts.w.org/wp-content/themes/twentytwentyone/screenshot.png",
    "full_image_url": "https://ts.w.org/wp-content/themes/twentytwentyone/screenshot.png",
    "description": "A blank canvas for your ideas.",
    "logo_url": "https://ts.w.org/wp-content/themes/twentytwentyone/logo.png",
    "is_plan_upgrade_needed": false
  }
]

Uninstall WordPress themes

Uninstall one or more themes from a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the uninstall job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • themes
    Type: array string[] 1…20
    required

    Slugs of the installed themes to uninstall.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/themes/uninstall
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/themes/uninstall \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "themes": [
    "twentytwenty",
    "twentytwentyone"
  ]
}'
{
  "message": "Request accepted"
}

Update WordPress themes

Update one or more installed themes to their latest version on a WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

This operation is asynchronous: a successful response only means the update job has been queued.

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Body·
required
application/json
  • themes
    Type: array string[] 1…20
    required

    Slugs of the installed themes to update to their latest version.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/themes/update
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/themes/update \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "themes": [
    "twentytwenty",
    "twentytwentyone"
  ]
}'
{
  "message": "Request accepted"
}

Object Cache

Show Memcached object cache status

Show the Memcached object cache status for the specified WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/memcached/status
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/memcached/status \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "status": "active"
}

Toggle Memcached object cache

Activate or deactivate the Memcached object cache for the specified WordPress installation, based on the enabled flag.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Activate (true) or deactivate (false) the Memcached object cache for the WordPress installation.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/wordpress/{software}/memcached/toggle
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/memcached/toggle \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "enabled": true
}'
{
  "message": "Request accepted"
}

LiteSpeed Cache

Purge LiteSpeed Cache

Purge the LiteSpeed Cache for the specified WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/hosting/v1/accounts/{username}/wordpress/{software}/litespeed-cache/purge
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/litespeed-cache/purge \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Show LiteSpeed Cache status

Show the LiteSpeed Cache status for the specified WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/litespeed-cache/status
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/litespeed-cache/status \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "is_installed": true,
  "is_active": true
}

Maintenance

Show maintenance status

Show the maintenance mode status for the specified WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/maintenance/status
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/maintenance/status \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "status": "enabled"
}

Toggle maintenance mode

Enable or disable maintenance mode for the specified WordPress installation, based on the enabled flag.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Enable (true) or disable (false) maintenance mode for the WordPress installation.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/wordpress/{software}/maintenance/toggle
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/maintenance/toggle \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "enabled": true
}'
{
  "message": "Request accepted"
}

Login

AI Tools

Show AI option status

Show the current AI option status for the Hostinger Tools plugin on the specified WordPress installation. Filter by option to return a single option, or omit it to return all options.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

Query Parameters
  • option
    Type: string | null enum

    Filter the status by a single AI option.

    values
    • llmstxt
    • web2agent
Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/hosting/v1/accounts/{username}/wordpress/{software}/hostinger-plugins/ai-option/status
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/hostinger-plugins/ai-option/status \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "is_llmstxt_enabled": true,
  "is_web2agent_enabled": false
}

Set AI option status

Enable or disable an AI option for the Hostinger Tools plugin on the specified WordPress installation.

Provide the WordPress installation (software) identifier in the path. It can be obtained from GET /api/hosting/v1/wordpress/installations (the id field).

Path Parameters
  • username
    Type: string
    required
  • software
    Type: string Pattern: ^[0-9]+$
    required

    WordPress installation (software) identifier

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

    Enable (true) or disable (false) the AI option.

  • option
    Type: string enum
    required

    AI option name

    values
    • llmstxt
    • web2agent
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/hosting/v1/accounts/{username}/wordpress/{software}/hostinger-plugins/ai-option/status
curl /api/hosting/v1/accounts/u123456789/wordpress/1232456789/hostinger-plugins/ai-option/status \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "option": "llmstxt",
  "enable": true
}'
{
  "message": "Request accepted"
}

Websites

Create and access Hostinger Horizons websites. This category includes endpoints for creating new AI-generated websites from a text prompt and retrieving links to edit existing websites in the Hostinger Horizons interface.

Create website

Create new Hostinger Horizons website from the given message.\n Use this tool when user asks you to create a website, landing page, blog or any other type of application.\n This tool initiates the website creation process and returns a website URL and ID. The generation happens asynchronously.\n After invoking this tool, your chat reply must be EXACTLY 1 sentence summarizing that Hostinger Horizons is now creating their website and it will be ready in a few minutes and you should provide the website URL to the user immediately Do not write code.\n\nTo edit afterwards, users must go to Hostinger Horizons interface in the provided website URL. If the tool call fails with an error, you should provide a clear explanation of the error and do not generate code yourself in the chat. \n TECHNOLOGY STACK CONSTRAINTS (STRICTLY ENFORCED):\n The environment is limited to the following technologies. You MUST NOT use, suggest, or implement any technology outside this list:\n \n

  • Language: JavaScript ONLY.
  • Languages like TypeScript, Rust, Python, Java, PHP, etc., are STRICTLY PROHIBITED.\n
  • Framework: React.\n
  • Navigation: React Router.\n
  • Styling: TailwindCSS.\n
  • Components: shadcn/ui (built with @radix-ui primitives).\n
  • Icons: Lucide React.\n
  • Animations: Framer Motion.\n \n BACKEND & DATA STORAGE:\n
  • Horizons integrated backend is the EXCLUSIVE solution for persistent data storage, authentication, and database needs.\n
  • Local databases (SQLite, MySQL, etc.) are STRICTLY PROHIBITED.\n
  • Third-party services (Firebase, AWS Amplify) are allowed ONLY if explicitly requested by the user.\n \n MAPS:\n
  • OpenStreetMap is the default provider.\n
  • Alternative providers (Google Maps, Mapbox) are allowed ONLY if explicitly requested by the user.\n
Body·
required
application/json
  • message
    Type: array object[]
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/horizons/v1/websites
curl /api/horizons/v1/websites \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "message": [
    {
      "type": "text",
      "text": "Create a landing page for a coffee shop with a hero section, menu, and contact form"
    }
  ]
}'
{
  "website_url": "https://horizons.hostinger.com/123e4567-e89b-12d3-a456-426614174000?location=chatgpt",
  "website_id": "123e4567-e89b-12d3-a456-426614174000"
}

Get website

Get a link for the user to edit their website in Hostinger Horizons interface.\n Use this tool when user wants to modify, edit or add new features to an existing website.\n Websites can only be edited in Hostinger Horizons interface in the provided website URL.

Path Parameters
  • websiteId
    Type: string
    required

    The website ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/horizons/v1/websites/{websiteId}
curl /api/horizons/v1/websites/123e4567-e89b-12d3-a456-426614174000 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "website_url": "https://horizons.hostinger.com/123e4567-e89b-12d3-a456-426614174000?location=chatgpt"
}

Contacts

deprecated

Delete a contact

Delete a contact with the specified UUID.

This endpoint permanently removes a contact from the email marketing system.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot delete contacts of any other profile. Use DELETE /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid} instead.

Path Parameters
  • uuid
    Type: string Format: uuid
    required

    UUID of the contact to delete

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/contacts/{uuid}
curl /api/reach/v1/contacts/123e4567-e89b-12d3-a456-426614174000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}
deprecated

List contacts

Get a list of contacts, optionally filtered by group and subscription status.

This endpoint returns a paginated list of contacts with their basic information. You can filter contacts by group UUID and subscription status.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot list contacts of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/contacts instead, which also replaces the group filter with a tag filter.

Query Parameters
  • group_uuid
    Type: string

    Filter contacts by group UUID

  • subscription_status
    Type: string enum

    Filter contacts by subscription status

    values
    • subscribed
    • unsubscribed
    • confirmed
    • pending
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/contacts
curl /api/reach/v1/contacts \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "John",
      "surname": "Doe",
      "email": "john.doe@example.com",
      "subscription_status": "subscribed",
      "subscribed_at": "2023-01-01T00:00:00Z",
      "source": "sync",
      "note": "VIP customer"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Get contact details

Get the full details of a single contact.

Alongside the contact's own attributes this returns the tags assigned to it and the values it holds for the profile's custom contact fields.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • contactUuid
    Type: string Format: uuid
    required

    Contact uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/550e8400-e29b-41d4-a716-446655440000 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "email": "john.doe@example.com",
  "name": "John",
  "surname": "Doe",
  "phone": "+14155552671",
  "subscription_status": "subscribed",
  "subscribed_at": "2023-01-01T00:00:00Z",
  "unsubscribed_at": "2023-06-15T00:00:00Z",
  "created_at": "2022-12-01T00:00:00Z",
  "domain": "example.com",
  "source": "api",
  "note": "VIP customer",
  "tags": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "type": "custom",
      "value": "Newsletter",
      "created_at": "2025-02-27T11:54:22Z"
    }
  ],
  "fields": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "type": "text",
      "label": "Job title",
      "slug": "job_title",
      "value": "Developer",
      "selected_option_uuids": [
        "string"
      ],
      "options": [
        {
          "uuid": "550e8400-e29b-41d4-a716-446655440000",
          "label": "Gold",
          "sort_order": 0
        }
      ]
    }
  ]
}

Delete a profile contact

Permanently delete a contact from a profile.

The contact is removed together with its custom field values and tag assignments.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • contactUuid
    Type: string Format: uuid
    required

    Contact uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/550e8400-e29b-41d4-a716-446655440000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Update a contact

Update a contact's attributes and custom field values.

Only the properties present in the request body are changed, so a partial body is enough to change a single attribute. Sending a property as null clears it.

The response carries the contact's core attributes. Read back its tags, custom field values, source and note with GET /api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • contactUuid
    Type: string Format: uuid
    required

    Contact uuid parameter

Body·
required
application/json

Fields to change on a contact. Omitted properties are left untouched.

  • email
    Type: string | null
  • fields
    Type: array object[]

    Set custom field values. Omit to leave untouched, send an empty array to clear them all.

  • name
    Type: string | null
  • note
    Type: string | null
    max length:  
    75
  • phone
    Type: string | null
    max length:  
    20

    Phone number in E.164 format (leading "+" then 7-15 digits)

  • subscription_status
    Type: string | null enum
    values
    • subscribed
    • unsubscribed
    • confirmed
    • pending
  • surname
    Type: string | null
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/reach/v1/profiles/{profileUuid}/contacts/{contactUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/550e8400-e29b-41d4-a716-446655440000 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "email": "john.doe@example.com",
  "name": "John",
  "surname": "Doe",
  "phone": "+14155552671",
  "subscription_status": "subscribed",
  "note": "VIP customer",
  "fields": [
    {
      "uuid": "",
      "value": null,
      "selected_option_uuids": [
        ""
      ]
    }
  ]
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "John",
  "surname": "Doe",
  "email": "john.doe@example.com",
  "phone": "+14155552671",
  "subscription_status": "subscribed",
  "subscribed_at": "2023-01-01T00:00:00Z",
  "unsubscribed_at": "2023-06-15T00:00:00Z"
}

Create contacts in bulk

Create many contacts in a profile in a single call.

The contacts are imported in the background, so a success response means the import was accepted rather than finished. Contacts whose email already exists in the profile are left as they are. If double opt-in is enabled, new contacts start off pending and are sent a confirmation email.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Body·
required
application/json

Create many contacts in one call

  • contacts
    Type: array object[] 1…1000
    required
  • note
    Type: string | null
    max length:  
    75

    Note applied to every created contact

  • tag_uuids
    Type: array string[]

    Existing tags to attach to every created contact

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/contacts/bulk
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/bulk \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "contacts": [
    {
      "email": "john.doe@example.com",
      "name": "John",
      "surname": "Doe",
      "phone": "+14155552671"
    }
  ],
  "tag_uuids": [
    ""
  ],
  "note": "Imported from CRM"
}'
{
  "message": "Request accepted"
}

List profile contacts

Get a paginated list of contacts belonging to a profile.

Contacts can be filtered by subscription status, by tag, and by an email search term. The meta.total field of the response is the number of contacts matching the filters, so calling this endpoint without filters gives the profile's total contact count.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Query Parameters
  • subscription_status
    Type: string enum

    Filter contacts by subscription status

    values
    • subscribed
    • unsubscribed
    • confirmed
    • pending
  • tag_uuid
    Type: string Format: uuid

    Filter contacts by tag UUID

  • search
    Type: string
    max length:  
    255

    Search contacts by email

  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/contacts
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "John",
      "surname": "Doe",
      "email": "john.doe@example.com",
      "phone": "+14155552671",
      "subscription_status": "subscribed",
      "subscribed_at": "2023-01-01T00:00:00Z",
      "unsubscribed_at": "2023-06-15T00:00:00Z",
      "source": "api",
      "note": "VIP customer"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create new contacts

Create a new contact in the email marketing system.

This endpoint allows you to create a new contact with basic information like name, email, and surname.

If double opt-in is enabled, the contact will be created with a pending status and a confirmation email will be sent.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Body·
required
application/json
  • email
    Type: string
    required
  • name
    Type: string | null
  • note
    Type: string | null
    max length:  
    75
  • phone
    Type: string | null
    max length:  
    20

    Phone number in E.164 format (leading "+" then 7-15 digits)

  • surname
    Type: string | null
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/contacts
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "email": "john.doe@example.com",
  "name": "John",
  "surname": "Doe",
  "phone": "+14155552671",
  "note": "VIP customer"
}'
{
  "message": "Request accepted"
}

Contact Fields

Delete a contact field

Delete a custom contact field.

Every value contacts hold for the field is deleted with it, and for the choice types so are its options. The contacts themselves are not affected.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • fieldUuid
    Type: string Format: uuid
    required

    Contact field uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/contacts/fields/{fieldUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/fields/550e8400-e29b-41d4-a716-446655440000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Update a contact field

Rename a custom contact field and, for the choice types, replace its option set.

Options carrying a uuid are kept and relabelled, options without one are created, and any existing option left out of the list is deleted along with the values contacts hold for it. The field type and slug cannot be changed.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • fieldUuid
    Type: string Format: uuid
    required

    Contact field uuid parameter

Body·
required
application/json

Rename a custom contact field and, for the choice types, replace its option set. The field type and slug are immutable.

  • label
    Type: string
    max length:  
    255
    required
  • options
    Type: array object[] | null …100

    Replaces the option set when provided. Entries carrying a uuid are kept and relabelled, entries without one are created, and any existing option missing from the list is deleted along with the values contacts hold for it.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/reach/v1/profiles/{profileUuid}/contacts/fields/{fieldUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/fields/550e8400-e29b-41d4-a716-446655440000 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "label": "Job title",
  "options": [
    {
      "uuid": null,
      "label": ""
    }
  ]
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "type": "text",
  "label": "Job title",
  "slug": "job_title",
  "options": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "label": "Gold",
      "sort_order": 0
    }
  ],
  "created_at": "2025-02-27T11:54:22Z"
}

List contact fields

Get the custom contact fields defined in a profile.

Custom fields let you store your own attributes on contacts. The returned uuids are what you pass to the contact update endpoint to set values, and choice fields also list the options available to pick from.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/contacts/fields
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/fields \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "type": "text",
    "label": "Job title",
    "slug": "job_title",
    "options": [
      {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "label": "Gold",
        "sort_order": 0
      }
    ],
    "created_at": "2025-02-27T11:54:22Z"
  }
]

Create a contact field

Define a new custom contact field in a profile.

The slug is derived from the label and, like the field type, cannot be changed later. Use the returned uuid to set values on contacts.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Body·
required
application/json

Define a custom contact field for the profile

  • label
    Type: string
    max length:  
    255
    required
  • type
    Type: string enum
    required

    Immutable once the field exists

    values
    • text
    • number
    • date
    • single_choice
    • multi_choice
  • options
    Type: array string[] 1…100
    max length:  
    255

    Required for single_choice and multi_choice, ignored for the scalar types. Labels must be unique regardless of casing.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/contacts/fields
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/contacts/fields \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "type": "text",
  "label": "Job title",
  "options": [
    ""
  ]
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "type": "text",
  "label": "Job title",
  "slug": "job_title",
  "options": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "label": "Gold",
      "sort_order": 0
    }
  ],
  "created_at": "2025-02-27T11:54:22Z"
}

Tags

Assign a contact to a tag

Assign a tag to a single contact.

Unlike the bulk endpoint this is applied immediately rather than queued. Assigning a tag the contact already carries succeeds without duplicating it.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

  • contactUuid
    Type: string Format: uuid
    required

    Contact uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts/{contactUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000/contacts/550e8400-e29b-41d4-a716-446655440000 \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "type": "custom",
  "value": "Newsletter",
  "created_at": "2025-02-27T11:54:22Z"
}

Remove a contact from a tag

Remove a tag from a single contact.

Unlike the bulk endpoint this is applied immediately rather than queued. Neither the tag nor the contact is deleted.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

  • contactUuid
    Type: string Format: uuid
    required

    Contact uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts/{contactUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000/contacts/550e8400-e29b-41d4-a716-446655440000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Assign contacts to a tag

Assign a tag to many contacts at once.

Pass contact_uuids to target specific contacts, or all_contacts to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. Contacts that already carry the tag are left alone.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

Body·
required
application/json

Contacts to assign to, or remove from, a tag

  • all_contacts
    Type: boolean

    Apply to every contact in the profile

  • contact_uuids
    Type: array string[]

    Contacts to apply the change to. Required unless all_contacts is true.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000/contacts \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "contact_uuids": [
    ""
  ],
  "all_contacts": false
}'
{
  "message": "Request accepted"
}

Remove contacts from a tag

Remove a tag from many contacts at once.

Pass contact_uuids to target specific contacts, or all_contacts to target every contact in the profile. The work is queued, so a success response means it was accepted rather than finished. The tag itself and the contacts are not deleted.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

Body·
required
application/json

Contacts to assign to, or remove from, a tag

  • all_contacts
    Type: boolean

    Apply to every contact in the profile

  • contact_uuids
    Type: array string[]

    Contacts to apply the change to. Required unless all_contacts is true.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}/contacts
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000/contacts \
  --request DELETE \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "contact_uuids": [
    ""
  ],
  "all_contacts": false
}'
{
  "message": "Request accepted"
}

Delete a tag

Delete a tag and remove it from every contact carrying it.

The contacts themselves are not deleted. This is idempotent: deleting a tag that does not exist in the profile still succeeds.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Rename a tag

Rename a tag.

The contacts assigned to the tag are unaffected. Names are unique within a profile, so renaming a tag to a name that is already taken is rejected.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • tagUuid
    Type: string Format: uuid
    required

    Tag uuid parameter

Body·
required
application/json

Rename a tag

  • value
    Type: string
    max length:  
    255
    required

    New tag name

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/reach/v1/profiles/{profileUuid}/tags/{tagUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags/550e8400-e29b-41d4-a716-446655440000 \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "value": "Newsletter"
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "type": "custom",
  "value": "Newsletter",
  "created_at": "2025-02-27T11:54:22Z"
}

List profile tags

Get all tags defined in a profile.

Tags are the way contacts are grouped in Reach, and can be used to filter the contact list or to build segments.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/tags
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "type": "custom",
    "value": "Newsletter",
    "created_at": "2025-02-27T11:54:22Z"
  }
]

Create or find tags

Create tags in a profile.

Names that already exist in the profile are not duplicated: the existing tag is returned instead, so the call is safe to repeat. Every tag in the request is returned, whether it was created now or already existed.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Body·
required
application/json

Names to create. Names that already exist in the profile are returned as they are.

  • names
    Type: array string[] 1…100
    max length:  
    255
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/tags
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/tags \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "names": [
    "Newsletter",
    "VIP",
    "Promo"
  ]
}'
[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "type": "custom",
    "value": "Newsletter",
    "created_at": "2025-02-27T11:54:22Z"
  }
]

Segments

deprecated

List segments

Get a list of all contact segments.

This endpoint returns a list of contact segments that can be used to organize contacts.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot list the segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments instead.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/segmentation/segments
curl /api/reach/v1/segmentation/segments \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "uuid": "550e8400-e29b-41d4-a716-446655440000",
    "name": "Newsletter Subscribers",
    "created_at": "2025-02-27T11:54:22Z",
    "updated_at": "2025-02-27T11:54:22Z"
  }
]
deprecated

Create a new contact segment

Create a new contact segment.

This endpoint allows creating a new contact segment that can be used to organize contacts. The segment can be configured with specific criteria like email, name, subscription status, etc.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot create segments in any other profile. Use POST /api/reach/v1/profiles/{profileUuid}/segmentation/segments instead.

Body·
required
application/json
  • conditions
    Type: array object[] 1…5
    required
  • logic
    Type: string enum
    required
    values
    • AND
    • OR
  • name
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/segmentation/segments
curl /api/reach/v1/segmentation/segments \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "New segment name",
  "conditions": [
    {
      "operator": "equals",
      "value": "example@example.com",
      "attribute": "note"
    }
  ],
  "logic": "AND"
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Segment name",
  "query": {
    "conditions": [
      {
        "attribute": "email",
        "operator": "contains",
        "value": "example.com"
      }
    ],
    "logic": "and"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z"
}

Count profile segment contacts

Count the contacts currently matching a segment without listing them.

Cheaper than paging through the segment contacts endpoint when only the size is needed.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • segmentUuid
    Type: string
    required

    Segment uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/count
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments/550e8400-e09b-41d4-a716-400055000000/count \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "count": 150
}

List profile segment contacts

Retrieve contacts associated with a specific segment for a given profile.

This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID, scoped to a specific profile.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • segmentUuid
    Type: string
    required

    Segment uuid parameter

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
Request Example for get/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments/550e8400-e09b-41d4-a716-400055000000/contacts \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "John",
      "surname": "Doe",
      "email": "john.doe@example.com",
      "subscription_status": "subscribed",
      "subscribed_at": "2023-01-01T00:00:00Z",
      "source": "sync",
      "note": "VIP customer"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Get profile segment details

Get a single segment of a profile, including the conditions that define it.

To retrieve the contacts currently matching those conditions, use the segment contacts endpoint instead.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • segmentUuid
    Type: string
    required

    Segment uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments/550e8400-e09b-41d4-a716-400055000000 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Segment name",
  "query": {
    "conditions": [
      {
        "attribute": "email",
        "operator": "contains",
        "value": "example.com"
      }
    ],
    "logic": "and"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z"
}

Update a profile segment

Rename a segment and/or replace the conditions that define it.

name is always required. Omit conditions to rename without touching the conditions; supply them and they replace the existing set entirely rather than being merged into it. Contacts are never modified, but which of them match the segment can change immediately.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • segmentUuid
    Type: string
    required

    Segment uuid parameter

Body·
required
application/json

Rename a segment and/or replace the conditions that define it

  • name
    Type: string
    max length:  
    255
    required
  • conditions
    Type: array object[] 1…5

    Replaces the existing conditions entirely. Omit to keep the current ones.

  • logic
    Type: string enum

    How to combine multiple conditions. Required when conditions are given.

    values
    • AND
    • OR
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments/550e8400-e09b-41d4-a716-400055000000 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "VIP Customers",
  "conditions": [
    {
      "attribute": "email",
      "operator": "equals",
      "value": "example@example.com"
    }
  ],
  "logic": "AND"
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Segment name",
  "query": {
    "conditions": [
      {
        "attribute": "email",
        "operator": "contains",
        "value": "example.com"
      }
    ],
    "logic": "and"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z"
}

Delete a profile segment

Delete a segment.

Only the segment definition is removed. The contacts that matched it are left untouched.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

  • segmentUuid
    Type: string
    required

    Segment uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments/550e8400-e09b-41d4-a716-400055000000 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

List profile segments

Get a paginated list of the segments defined in a profile.

Each entry carries the number of contacts currently matching it, which is recalculated on read rather than stored. Use count_type to count either every matching contact or only the subscribed ones.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Query Parameters
  • count_type
    Type: string enum

    Which matching contacts to count for each segment

    values
    • all
    • subscribed
  • page
    Type: integer

    Page number

  • per_page
    Type: integer
    max:  
    100

    Number of items per page

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/segmentation/segments
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "VIP Customers",
      "contacts_count": 150,
      "created_at": "2025-02-27T11:54:22Z",
      "updated_at": "2025-02-27T11:54:22Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create a profile segment

Create a segment in a profile.

A segment is a saved set of conditions rather than a fixed list, so its membership changes as contacts change. Creating one does not modify any contact.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Body·
required
application/json

Create a segment from a set of conditions

  • conditions
    Type: array object[] 1…5
    required

    Conditions a contact must satisfy to fall into the segment

  • logic
    Type: string enum
    required

    How to combine multiple conditions

    values
    • AND
    • OR
  • name
    Type: string
    max length:  
    255
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/reach/v1/profiles/{profileUuid}/segmentation/segments
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/segmentation/segments \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "VIP Customers",
  "conditions": [
    {
      "attribute": "email",
      "operator": "equals",
      "value": "example@example.com"
    }
  ],
  "logic": "AND"
}'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Segment name",
  "query": {
    "conditions": [
      {
        "attribute": "email",
        "operator": "contains",
        "value": "example.com"
      }
    ],
    "logic": "and"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z"
}
deprecated

List segment contacts

Retrieve contacts associated with a specific segment.

This endpoint allows you to fetch and filter contacts that belong to a particular segment, identified by its UUID.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot read segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid}/contacts instead.

Path Parameters
  • segmentUuid
    Type: string
    required

    Segment uuid parameter

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
Request Example for get/api/reach/v1/segmentation/segments/{segmentUuid}/contacts
curl /api/reach/v1/segmentation/segments/550e8400-e09b-41d4-a716-400055000000/contacts \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "uuid": "550e8400-e29b-41d4-a716-446655440000",
      "name": "John",
      "surname": "Doe",
      "email": "john.doe@example.com",
      "subscription_status": "subscribed",
      "subscribed_at": "2023-01-01T00:00:00Z",
      "source": "sync",
      "note": "VIP customer"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}
deprecated

Get segment details

Get details of a specific segment.

This endpoint retrieves information about a single segment identified by UUID. Segments are used to organize and group contacts based on specific criteria.

Deprecated. This endpoint cannot target a profile, so it always falls back to the client's default profile and cannot read segments of any other profile. Use GET /api/reach/v1/profiles/{profileUuid}/segmentation/segments/{segmentUuid} instead.

Path Parameters
  • segmentUuid
    Type: string
    required

    Segment uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/segmentation/segments/{segmentUuid}
curl /api/reach/v1/segmentation/segments/550e8400-e09b-41d4-a716-400055000000 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "uuid": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Segment name",
  "query": {
    "conditions": [
      {
        "attribute": "email",
        "operator": "contains",
        "value": "example.com"
      }
    ],
    "logic": "and"
  },
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-02-27T11:54:22Z"
}

Profiles

Get profile domain DNS status

Retrieve the DNS configuration status for a profile's domain.

This endpoint reports the state of MX, SPF, DKIM and DMARC records, including the actual records found and the suggested records required for correct email delivery.

Path Parameters
  • profileUuid
    Type: string
    required

    Profile uuid parameter

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles/{profileUuid}/domains/dns-status
curl /api/reach/v1/profiles/550e8400-e09b-41d4-a716-400055000000/domains/dns-status \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "domain": "example.com",
  "mx": {
    "actual": [
      {
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "suggested": [
      {
        "name": "@",
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "is_valid": true
  },
  "spf": {
    "actual": [
      {
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "suggested": [
      {
        "name": "@",
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "is_valid": true
  },
  "dkim": {
    "actual": [
      {
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "suggested": [
      {
        "name": "@",
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "is_valid": true
  },
  "dmarc": {
    "actual": [
      {
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "suggested": [
      {
        "name": "@",
        "type": "MX",
        "value": "mx1.example.com"
      }
    ],
    "is_valid": true
  }
}

List Profiles

This endpoint returns all profiles available to the client, including their basic information.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/reach/v1/profiles
curl /api/reach/v1/profiles \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "limits": {
      "ai_messages_limit": 10,
      "subscribers_limit": 500,
      "emails_monthly_limit": 3500,
      "ai_messages_additional": 1096
    },
    "is_trial": false,
    "expires_at": "2027-10-21T05:38:23.000000Z",
    "resource_id": 44340307,
    "status": "active",
    "profiles": [
      {
        "uuid": "550e8400-e29b-41d4-a716-446655440000",
        "domain": "example.com",
        "created_at": "2026-01-21T07:35:04.000000Z",
        "updated_at": "2026-01-21T07:35:04.000000Z"
      }
    ]
  }
]

Actions

Track and review operations performed on your virtual machines. These endpoints provide details about specific actions—such as start, stop, or restart—including timestamps and statuses.

Get action details

Retrieve detailed information about a specific action performed on a specified virtual machine.

Use this endpoint to monitor specific VPS operation status and details.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • actionId
    Type: integer
    required

    Action ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/actions/{actionId}
curl /api/vps/v1/virtual-machines/1268054/actions/8123712 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Get actions

Retrieve actions performed on a specified virtual machine.

Actions are operations or events that have been executed on the virtual machine, such as starting, stopping, or modifying the machine. This endpoint allows you to view the history of these actions, providing details about each action, such as the action name, timestamp, and status.

Use this endpoint to view VPS operation history and troubleshoot issues.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/actions
curl /api/vps/v1/virtual-machines/1268054/actions \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 8123712,
      "name": "action_name",
      "state": "success",
      "created_at": "2025-02-27T11:54:00Z",
      "updated_at": "2025-02-27T11:58:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Backups

Safeguard your data by managing backups. You can list available backups or restore a virtual machine from a backup.

Get backups

Retrieve backups for a specified virtual machine.

Use this endpoint to view available backup points for VPS data recovery.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/backups
curl /api/vps/v1/virtual-machines/1268054/backups \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 325,
      "size": 15240192,
      "restore_time": 3600,
      "location": "nl-srv-nodebackups",
      "created_at": "2025-02-27T11:54:22Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Restore backup

Restore a backup for a specified virtual machine.

The system will then initiate the restore process, which may take some time depending on the size of the backup.

All data on the virtual machine will be overwritten with the data from the backup.

Use this endpoint to recover VPS data from backup points.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • backupId
    Type: integer
    required

    Backup ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/backups/{backupId}/restore
curl /api/vps/v1/virtual-machines/1268054/backups/8676502/restore \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Data centers

Access information on available data centers, including location details, so you can choose the optimal region for deploying your virtual machines.

Data centers Operations

Get data center list

Retrieve all available data centers.

Use this endpoint to view location options before deploying VPS instances.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/data-centers
curl /api/vps/v1/data-centers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 29,
    "name": "phx",
    "location": "us",
    "city": "Phoenix",
    "continent": "North America"
  }
]

Docker Manager

Manage Docker Compose projects directly on your VPS instances. This feature is only available for VPS instances using Docker OS templates and is currently experimental - breaking changes may occur in future updates. It enables you to programmatically deploy projects from docker-compose.yml files by providing either a URL (including GitHub repositories) or the compose file contents directly. Control project lifecycle (start/stop/restart/update/delete) and retrieve runtime information including container lists, project details, and aggregated logs. All operations are scoped to a specific virtual machine for multi-tenant management.

experimental

Get project containers

Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.

This endpoint returns detailed information about each container including their current status, port mappings, and runtime configuration.

Use this to monitor the health and state of all services within your Docker Compose project.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/containers
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/containers \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": "bbd4c89e850d",
    "name": "nginx",
    "image": "nginx:latest",
    "command": "/docker-entrypoint.sh nginx -g daemon off;",
    "status": "Up 4 hours",
    "state": "running",
    "health": "healthy",
    "ports": [
      {
        "type": "published",
        "protocol": "tcp",
        "host_ip": "0.0.0.0",
        "host_port": 8080,
        "container_port": 80,
        "host_port_start": null,
        "host_port_end": null,
        "container_port_start": null,
        "container_port_end": null
      }
    ],
    "stats": {
      "cpu_percentage": 15.4,
      "memory_percentage": 0.4,
      "memory_used": 66532147.2,
      "memory_total": 16771847290.88,
      "net_in": 2110000,
      "net_out": 30100
    }
  }
]
experimental

Get project contents

Retrieves the complete project information including the docker-compose.yml file contents, project metadata, and current deployment status.

This endpoint provides the full configuration and state details of a specific Docker Compose project.

Use this to inspect project settings, review the compose file, or check the overall project health.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "content": "services:\n    my-app:\n        image: nginx\n        ports:\n            - \"80:80\"\n    my-db:\n        image: mysql",
  "environment": "VARIABLE1=value1\nVARIABLE2=value2"
}
experimental

Delete project

Completely removes a Docker Compose project from the virtual machine, stopping all containers and cleaning up associated resources including networks, volumes, and images.

This operation is irreversible and will delete all project data.

Use this when you want to permanently remove a project and free up system resources.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/down
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/down \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}
experimental

Get project list

Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.

This endpoint returns basic information about each project including name, status, file path and list of containers with details about their names, image, status, health and ports. Container stats are omitted in this endpoint. If you need to get detailed information about container with stats included, use the Get project containers endpoint.

Use this to get an overview of all Docker projects on your VPS instance.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/docker
curl /api/vps/v1/virtual-machines/1268054/docker \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "name": "my-project",
    "status": "running(2)",
    "state": "running",
    "path": "/docker/my-project/docker-compose.yaml",
    "containers": [
      {
        "id": "bbd4c89e850d",
        "name": "nginx",
        "image": "nginx:latest",
        "command": "/docker-entrypoint.sh nginx -g daemon off;",
        "status": "Up 4 hours",
        "state": "running",
        "health": "healthy",
        "ports": [
          {
            "type": "published",
            "protocol": "tcp",
            "host_ip": "0.0.0.0",
            "host_port": 8080,
            "container_port": 80,
            "host_port_start": null,
            "host_port_end": null,
            "container_port_start": null,
            "container_port_end": null
          }
        ],
        "stats": {
          "cpu_percentage": 15.4,
          "memory_percentage": 0.4,
          "memory_used": 66532147.2,
          "memory_total": 16771847290.88,
          "net_in": 2110000,
          "net_out": 30100
        }
      }
    ]
  }
]
experimental

Create new project

Deploy new project from docker-compose.yaml contents or download contents from URL.

URL can be Github repository url in format https://github.com/[user]/[repo] and it will be automatically resolved to docker-compose.yaml file in master branch. Any other URL provided must return docker-compose.yaml file contents.

If project with the same name already exists, existing project will be replaced.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • content
    Type: string
    max length:  
    8192
    required

    URL pointing to docker-compose.yaml file, Github repository or raw YAML content of the compose file

  • project_name
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

  • environment
    Type: string | null
    max length:  
    8192

    Project environment variables

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/docker
curl /api/vps/v1/virtual-machines/1268054/docker \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "project_name": "my-project-1",
  "content": "",
  "environment": null
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}
experimental

Get project logs

Retrieves aggregated log entries from all services within a Docker Compose project.

This endpoint returns recent log output from each container, organized by service name with timestamps. The response contains the last 300 log entries across all services.

Use this for debugging, monitoring application behavior, and troubleshooting issues across your entire project stack.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/logs
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/logs \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "service": "web",
    "entries": [
      {
        "timestamp": "2024-01-15T10:30:45.123456Z",
        "line": "127.0.0.1 - - [15/Jan/2024:10:30:45 +0000] \"GET / HTTP/1.1\" 200 612"
      }
    ]
  }
]
experimental

Restart project

Restarts all services in a Docker Compose project by stopping and starting containers in the correct dependency order.

This operation preserves data volumes and network configurations while refreshing the running containers.

Use this to apply configuration changes or recover from service failures.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/restart
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/restart \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}
experimental

Start project

Starts all services in a Docker Compose project that are currently stopped.

This operation brings up containers in the correct dependency order as defined in the compose file.

Use this to resume a project that was previously stopped or to start services after a system reboot.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/start
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/start \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}
experimental

Stop project

Stops all running services in a Docker Compose project while preserving container configurations and data volumes.

This operation gracefully shuts down containers in reverse dependency order.

Use this to temporarily halt a project without removing data or configurations.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/stop
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/stop \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}
experimental

Update project

Updates a Docker Compose project by pulling the latest image versions and recreating containers with new configurations.

This operation preserves data volumes while applying changes from the compose file.

Use this to deploy application updates, apply configuration changes, or refresh container images to their latest versions.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • projectName
    Type: string
    min length:  
    3
    max length:  
    64
    required

    Docker Compose project name using alphanumeric characters, dashes, and underscores only

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/update
curl /api/vps/v1/virtual-machines/1268054/docker/my-docker-project/update \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

PTR records

Manage reverse DNS settings by creating or deleting PTR records for your virtual machines, ensuring that IP addresses correctly resolve to hostnames.

Create PTR record

Create or update a PTR (Pointer) record for a specified virtual machine.

Use this endpoint to configure reverse DNS lookup for VPS IP addresses.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • ipAddressId
    Type: integer
    required

    IP Address ID

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

    Pointer record domain

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/ptr/{ipAddressId}
curl /api/vps/v1/virtual-machines/1268054/ptr/246547 \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "domain": "example.tld"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Delete PTR record

Delete a PTR (Pointer) record for a specified virtual machine.

Once deleted, reverse DNS lookups to the virtual machine's IP address will no longer return the previously configured hostname.

Use this endpoint to remove reverse DNS configuration from VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

  • ipAddressId
    Type: integer
    required

    IP Address ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/ptr/{ipAddressId}
curl /api/vps/v1/virtual-machines/1268054/ptr/246547 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Firewall

Enhance network security with endpoints for creating, activating, deactivating, syncing, updating, and deleting firewalls and firewall rules for your virtual machines. This firewall applies rules at the network level, so it will take precedence over the virtual machine's internal firewall.

Access to firewall requires having at least one virtual machine.

Activate firewall

Activate a firewall for a specified virtual machine.

Only one firewall can be active for a virtual machine at a time.

Use this endpoint to apply firewall rules to VPS instances.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/firewall/{firewallId}/activate/{virtualMachineId}
curl /api/vps/v1/firewall/9449049/activate/1268054 \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Deactivate firewall

Deactivate a firewall for a specified virtual machine.

Use this endpoint to remove firewall protection from VPS instances.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/firewall/{firewallId}/deactivate/{virtualMachineId}
curl /api/vps/v1/firewall/9449049/deactivate/1268054 \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Get firewall details

Retrieve firewall by its ID and rules associated with it.

Use this endpoint to view specific firewall configuration and rules.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/firewall/{firewallId}
curl /api/vps/v1/firewall/9449049 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 65224,
  "name": "HTTP and SSH only",
  "is_synced": false,
  "rules": [
    {
      "id": 24541,
      "action": "accept",
      "protocol": "TCP",
      "port": "1024:2048",
      "source": "any",
      "source_detail": "any"
    }
  ],
  "created_at": "2021-09-01T12:00:00Z",
  "updated_at": "2021-09-01T12:00:00Z"
}

Delete firewall

Delete a specified firewall.

Any virtual machine that has this firewall activated will automatically have it deactivated.

Use this endpoint to remove unused firewall configurations.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/firewall/{firewallId}
curl /api/vps/v1/firewall/9449049 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get firewall list

Retrieve all available firewalls.

Use this endpoint to view existing firewall configurations.

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/firewall
curl /api/vps/v1/firewall \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 65224,
      "name": "HTTP and SSH only",
      "is_synced": false,
      "rules": [
        {
          "id": 24541,
          "action": "accept",
          "protocol": "TCP",
          "port": "1024:2048",
          "source": "any",
          "source_detail": "any"
        }
      ],
      "created_at": "2021-09-01T12:00:00Z",
      "updated_at": "2021-09-01T12:00:00Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create new firewall

Create a new firewall.

Use this endpoint to set up new firewall configurations for VPS security.

Body·
required
application/json
  • name
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/firewall
curl /api/vps/v1/firewall \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Firewall Group"
}'
{
  "id": 65224,
  "name": "HTTP and SSH only",
  "is_synced": false,
  "rules": [
    {
      "id": 24541,
      "action": "accept",
      "protocol": "TCP",
      "port": "1024:2048",
      "source": "any",
      "source_detail": "any"
    }
  ],
  "created_at": "2021-09-01T12:00:00Z",
  "updated_at": "2021-09-01T12:00:00Z"
}

Update firewall rule

Update a specific firewall rule from a specified firewall.

Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.

Use this endpoint to modify existing firewall rules.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

  • ruleId
    Type: integer
    required

    Firewall Rule ID

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

    Port or port range, ex: 1024:2048

  • protocol
    Type: string enum
    required
    values
    • TCP
    • UDP
    • ICMP
    • GRE
    • any
  • source
    Type: string enum
    required
    values
    • any
    • custom
  • source_detail
    Type: string
    required

    IP range, CIDR, single IP or any

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/firewall/{firewallId}/rules/{ruleId}
curl /api/vps/v1/firewall/9449049/rules/8941182 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "protocol": "TCP",
  "port": "443",
  "source": "any",
  "source_detail": "351.15.24.0/24"
}'
{
  "id": 24541,
  "action": "accept",
  "protocol": "TCP",
  "port": "1024:2048",
  "source": "any",
  "source_detail": "any"
}

Delete firewall rule

Delete a specific firewall rule from a specified firewall.

Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.

Use this endpoint to remove specific firewall rules.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

  • ruleId
    Type: integer
    required

    Firewall Rule ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/firewall/{firewallId}/rules/{ruleId}
curl /api/vps/v1/firewall/9449049/rules/8941182 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Create firewall rule

Create new firewall rule for a specified firewall.

By default, the firewall drops all incoming traffic, which means you must add accept rules for all ports you want to use.

Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.

Use this endpoint to add new security rules to firewalls.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

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

    Port or port range, ex: 1024:2048

  • protocol
    Type: string enum
    required
    values
    • TCP
    • UDP
    • ICMP
    • GRE
    • any
  • source
    Type: string enum
    required
    values
    • any
    • custom
  • source_detail
    Type: string
    required

    IP range, CIDR, single IP or any

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/firewall/{firewallId}/rules
curl /api/vps/v1/firewall/9449049/rules \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "protocol": "TCP",
  "port": "443",
  "source": "any",
  "source_detail": "351.15.24.0/24"
}'
{
  "id": 24541,
  "action": "accept",
  "protocol": "TCP",
  "port": "1024:2048",
  "source": "any",
  "source_detail": "any"
}

Sync firewall

Sync a firewall for a specified virtual machine.

Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated.

Use this endpoint to apply updated firewall rules to VPS instances.

Path Parameters
  • firewallId
    Type: integer
    required

    Firewall ID

  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/firewall/{firewallId}/sync/{virtualMachineId}
curl /api/vps/v1/firewall/9449049/sync/1268054 \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Malware scanner

Monitor your virtual machines' security using the Monarx malware scanner. Retrieve scan metrics or install/uninstall the scanner to help protect against malware threats.

Get scan metrics

Retrieve scan metrics for the Monarx malware scanner installed on a specified virtual machine.

The scan metrics provide detailed information about malware scans performed by Monarx, including number of scans, detected threats, and other relevant statistics. This information is useful for monitoring security status of the virtual machine and assessing effectiveness of the malware scanner.

Use this endpoint to monitor VPS security scan results and threat detection.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/monarx
curl /api/vps/v1/virtual-machines/1268054/monarx \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "records": 1,
  "malicious": 2,
  "compromised": 3,
  "scanned_files": 193218,
  "scan_started_at": "2025-02-27T11:54:22Z",
  "scan_ended_at": "2025-03-27T11:54:22Z"
}

Install Monarx

Install the Monarx malware scanner on a specified virtual machine.

Monarx is a security tool designed to detect and prevent malware infections on virtual machines. By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.

Use this endpoint to enable malware protection on VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/monarx
curl /api/vps/v1/virtual-machines/1268054/monarx \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Uninstall Monarx

Uninstall the Monarx malware scanner on a specified virtual machine.

If Monarx is not installed, the request will still be processed without any effect.

Use this endpoint to remove malware scanner from VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/monarx
curl /api/vps/v1/virtual-machines/1268054/monarx \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

OS Templates

Retrieve details of operating system templates or list all available templates to choose the right configuration when deploying or recreating virtual machines.

Get template details

Retrieve detailed information about a specific OS template for virtual machines.

Use this endpoint to view specific template specifications before deployment.

Path Parameters
  • templateId
    Type: integer
    required

    Template ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/templates/{templateId}
curl /api/vps/v1/templates/2868928 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 6523,
  "name": "Ubuntu 20.04 LTS",
  "description": "Ubuntu 20.04 LTS",
  "documentation": "https://docs.ubuntu.com"
}

Get templates

Retrieve available OS templates for virtual machines.

Use this endpoint to view operating system options before creating or recreating VPS instances.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/templates
curl /api/vps/v1/templates \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 6523,
    "name": "Ubuntu 20.04 LTS",
    "description": "Ubuntu 20.04 LTS",
    "documentation": "https://docs.ubuntu.com"
  }
]

Post-install scripts

This category allows you to create, update, delete, and retrieve scripts that can be used for automated tasks after the operating system installation. Use case includes setting up software, configuring settings, or running custom commands.

Get post-install script

Retrieve post-install script by its ID.

Use this endpoint to view specific automation script details.

Path Parameters
  • postInstallScriptId
    Type: integer
    required

    Post-install script ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/post-install-scripts/{postInstallScriptId}
curl /api/vps/v1/post-install-scripts/9568314 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 325,
  "name": "My Setup Script",
  "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Update post-install script

Update a specific post-install script.

Use this endpoint to modify existing automation scripts.

Path Parameters
  • postInstallScriptId
    Type: integer
    required

    Post-install script ID

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

    Content of the script

  • name
    Type: string
    required

    Name of the script

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/post-install-scripts/{postInstallScriptId}
curl /api/vps/v1/post-install-scripts/9568314 \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Script",
  "content": "#!/bin/bash\n\necho '\''Hello, World!'\''"
}'
{
  "id": 325,
  "name": "My Setup Script",
  "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Delete post-install script

Delete a post-install script from your account.

Use this endpoint to remove unused automation scripts.

Path Parameters
  • postInstallScriptId
    Type: integer
    required

    Post-install script ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/post-install-scripts/{postInstallScriptId}
curl /api/vps/v1/post-install-scripts/9568314 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get post-install scripts

Retrieve post-install scripts associated with your account.

Use this endpoint to view available automation scripts for VPS deployment.

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/post-install-scripts
curl /api/vps/v1/post-install-scripts \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 325,
      "name": "My Setup Script",
      "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
      "created_at": "2025-02-27T11:54:22Z",
      "updated_at": "2025-03-19T11:54:22Z"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create post-install script

Add a new post-install script to your account, which can then be used after virtual machine installation.

The script contents will be saved to the file /post_install with executable attribute set and will be executed once virtual machine is installed. The output of the script will be redirected to /post_install.log. Maximum script size is 48KB.

Use this endpoint to create automation scripts for VPS setup tasks.

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

    Content of the script

  • name
    Type: string
    required

    Name of the script

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/post-install-scripts
curl /api/vps/v1/post-install-scripts \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Script",
  "content": "#!/bin/bash\n\necho '\''Hello, World!'\''"
}'
{
  "id": 325,
  "name": "My Setup Script",
  "content": "#!/bin/bash\\napt-get update\\napt-get install -y nginx",
  "created_at": "2025-02-27T11:54:22Z",
  "updated_at": "2025-03-19T11:54:22Z"
}

Public Keys

Manage SSH keys for secure access. This category covers adding new public keys, attaching them to virtual machines, retrieving key lists, and deleting keys.

Attach public key

Attach existing public keys from your account to a specified virtual machine.

Multiple keys can be attached to a single virtual machine.

Use this endpoint to enable SSH key authentication for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • ids
    Type: array integer[]
    required

    Public Key IDs to attach

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/public-keys/attach/{virtualMachineId}
curl /api/vps/v1/public-keys/attach/1268054 \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "ids": [
    18232,
    10230230
  ]
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Delete public key

Delete a public key from your account.

Deleting public key from account does not remove it from virtual machine

Use this endpoint to remove unused SSH keys from account.

Path Parameters
  • publicKeyId
    Type: integer
    required

    Public Key ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/public-keys/{publicKeyId}
curl /api/vps/v1/public-keys/6672861 \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "message": "Request accepted"
}

Get public keys

Retrieve public keys associated with your account.

Use this endpoint to view available SSH keys for VPS authentication.

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/public-keys
curl /api/vps/v1/public-keys \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 325,
      "name": "My public key",
      "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create public key

Add a new public key to your account.

Use this endpoint to register SSH keys for VPS authentication.

Body·
required
application/json
  • key
    Type: string
    required
  • name
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/public-keys
curl /api/vps/v1/public-keys \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Public Key",
  "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}'
{
  "id": 325,
  "name": "My public key",
  "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
}

Recovery

Initiate or stop recovery mode to perform system rescue operations. This category enables you to boot a virtual machine into a state suitable for repairing file systems or recovering data.

Start recovery mode

Initiate recovery mode for a specified virtual machine.

Recovery mode is a special state that allows users to perform system rescue operations, such as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine from booting normally.

Virtual machine will boot recovery disk image and original disk image will be mounted in /mnt directory.

Use this endpoint to enable system rescue operations on VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

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

    Temporary root password for recovery mode

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/recovery
curl /api/vps/v1/virtual-machines/1268054/recovery \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "root_password": "oMeNRustosIO"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Stop recovery mode

Stop recovery mode for a specified virtual machine.

If virtual machine is not in recovery mode, this operation will fail.

Use this endpoint to exit system rescue mode and return VPS to normal operation.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/recovery
curl /api/vps/v1/virtual-machines/1268054/recovery \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Snapshots

Create, restore, or delete snapshots that capture the state of your virtual machines at a given point, allowing you to quickly recover or test changes without affecting current operations.

Get snapshot

Retrieve snapshot for a specified virtual machine.

Use this endpoint to view current VPS snapshot information.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot
curl /api/vps/v1/virtual-machines/1268054/snapshot \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 325,
  "restore_time": 1800,
  "created_at": "2025-02-27T11:54:22Z",
  "expires_at": "2025-03-19T11:54:22Z"
}

Create snapshot

Create a snapshot of a specified virtual machine.

A snapshot captures the state and data of the virtual machine at a specific point in time, allowing users to restore the virtual machine to that state if needed. This operation is useful for backup purposes, system recovery, and testing changes without affecting the current state of the virtual machine.

Creating new snapshot will overwrite the existing snapshot!

Use this endpoint to capture VPS state for backup and recovery purposes.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot
curl /api/vps/v1/virtual-machines/1268054/snapshot \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Delete snapshot

Delete a snapshot of a specified virtual machine.

Use this endpoint to remove VPS snapshots.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot
curl /api/vps/v1/virtual-machines/1268054/snapshot \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Restore snapshot

Restore a specified virtual machine to a previous state using a snapshot.

Restoring from a snapshot allows users to revert the virtual machine to that state, which is useful for system recovery, undoing changes, or testing.

Use this endpoint to revert VPS instances to previous saved states.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot/restore
curl /api/vps/v1/virtual-machines/1268054/snapshot/restore \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Virtual machine

Get attached public keys

Retrieve public keys attached to a specified virtual machine.

Use this endpoint to view SSH keys configured for specific VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/public-keys
curl /api/vps/v1/virtual-machines/1268054/public-keys \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": 325,
      "name": "My public key",
      "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQD..."
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Set hostname

Set hostname for a specified virtual machine.

Changing hostname does not update PTR record automatically. If you want your virtual machine to be reachable by a hostname, you need to point your domain A/AAAA records to virtual machine IP as well.

Use this endpoint to configure custom hostnames for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • hostname
    Type: string
    required
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/virtual-machines/{virtualMachineId}/hostname
curl /api/vps/v1/virtual-machines/1268054/hostname \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "hostname": "my.server.tld"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Reset hostname

Reset hostname and PTR record of a specified virtual machine to default value.

Use this endpoint to restore default hostname configuration for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/vps/v1/virtual-machines/{virtualMachineId}/hostname
curl /api/vps/v1/virtual-machines/1268054/hostname \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Get virtual machine details

Retrieve detailed information about a specified virtual machine.

Use this endpoint to view comprehensive VPS configuration and status.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}
curl /api/vps/v1/virtual-machines/1268054 \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 17923,
  "firewall_group_id": null,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "data_center_id": 521,
  "plan": "KVM 4",
  "hostname": "srv17923.hstgr.cloud",
  "state": "running",
  "actions_lock": "unlocked",
  "cpus": 4,
  "memory": 8192,
  "disk": 51200,
  "bandwidth": 1073741824,
  "ns1": "1.1.1.1",
  "ns2": "8.8.8.8",
  "ipv4": [
    {
      "id": 52347,
      "address": "213.331.273.15",
      "ptr": "something.domain.tld"
    }
  ],
  "ipv6": [
    {
      "id": 52347,
      "address": "213.331.273.15",
      "ptr": "something.domain.tld"
    }
  ],
  "template": {
    "id": 6523,
    "name": "Ubuntu 20.04 LTS",
    "description": "Ubuntu 20.04 LTS",
    "documentation": "https://docs.ubuntu.com"
  },
  "created_at": "2024-09-05T07:25:36.00000Z"
}

Get virtual machines

Retrieve all available virtual machines.

Use this endpoint to view available VPS instances.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines
curl /api/vps/v1/virtual-machines \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
[
  {
    "id": 17923,
    "firewall_group_id": null,
    "subscription_id": "Azz353Uhl1xC54pR0",
    "data_center_id": 521,
    "plan": "KVM 4",
    "hostname": "srv17923.hstgr.cloud",
    "state": "running",
    "actions_lock": "unlocked",
    "cpus": 4,
    "memory": 8192,
    "disk": 51200,
    "bandwidth": 1073741824,
    "ns1": "1.1.1.1",
    "ns2": "8.8.8.8",
    "ipv4": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "ipv6": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "template": {
      "id": 6523,
      "name": "Ubuntu 20.04 LTS",
      "description": "Ubuntu 20.04 LTS",
      "documentation": "https://docs.ubuntu.com"
    },
    "created_at": "2024-09-05T07:25:36.00000Z"
  }
]

Purchase new virtual machine

Purchase and setup a new virtual machine.

If virtual machine setup fails for any reason, login to hPanel and complete the setup manually.

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

Use this endpoint to create new VPS instances.

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

    Catalog price item ID

  • setup
    Type: object ·
    required
  • 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/vps/v1/virtual-machines
curl /api/vps/v1/virtual-machines \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "item_id": "hostingercom-vps-kvm2-usd-1m",
  "payment_method_id": 1327362,
  "setup": {
    "template_id": 1130,
    "data_center_id": 19,
    "post_install_script_id": 6324,
    "password": "oMeNRustosIO",
    "hostname": "my.server.tld",
    "install_monarx": false,
    "enable_backups": true,
    "ns1": "4.3.2.1",
    "ns2": "1.2.3.4",
    "public_key": {
      "name": "my-key",
      "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2X..."
    }
  },
  "coupons": []
}'
{
  "order": {
    "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"
  },
  "virtual_machine": {
    "id": 17923,
    "firewall_group_id": null,
    "subscription_id": "Azz353Uhl1xC54pR0",
    "data_center_id": 521,
    "plan": "KVM 4",
    "hostname": "srv17923.hstgr.cloud",
    "state": "running",
    "actions_lock": "unlocked",
    "cpus": 4,
    "memory": 8192,
    "disk": 51200,
    "bandwidth": 1073741824,
    "ns1": "1.1.1.1",
    "ns2": "8.8.8.8",
    "ipv4": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "ipv6": [
      {
        "id": 52347,
        "address": "213.331.273.15",
        "ptr": "something.domain.tld"
      }
    ],
    "template": {
      "id": 6523,
      "name": "Ubuntu 20.04 LTS",
      "description": "Ubuntu 20.04 LTS",
      "documentation": "https://docs.ubuntu.com"
    },
    "created_at": "2024-09-05T07:25:36.00000Z"
  }
}

Get metrics

Retrieve historical metrics for a specified virtual machine.

It includes the following metrics:

  • CPU usage
  • Memory usage
  • Disk usage
  • Network usage
  • Uptime

Use this endpoint to monitor VPS performance and resource utilization over time.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Query Parameters
  • date_from
    Type: string Format: date-time
    required

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • date_to
    Type: string Format: date-time
    required

    the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for get/api/vps/v1/virtual-machines/{virtualMachineId}/metrics
curl '/api/vps/v1/virtual-machines/1268054/metrics?date_from=null&date_to=null' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "cpu_usage": {
    "unit": "%",
    "usage": {
      "1742269632": 1.45
    }
  },
  "ram_usage": {
    "unit": "bytes",
    "usage": {
      "1742269632": 554176512
    }
  },
  "disk_space": {
    "unit": "bytes",
    "usage": {
      "1742269632": 2620018688
    }
  },
  "outgoing_traffic": {
    "unit": "bytes",
    "usage": {
      "1742269632": 784800
    }
  },
  "incoming_traffic": {
    "unit": "bytes",
    "usage": {
      "1742269632": 8978400
    }
  },
  "uptime": {
    "unit": "milliseconds",
    "usage": {
      "1742269632": 455248
    }
  }
}

Set nameservers

Set nameservers for a specified virtual machine.

Be aware, that improper nameserver configuration can lead to the virtual machine being unable to resolve domain names.

Use this endpoint to configure custom DNS resolvers for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • ns1
    Type: string
    required
  • ns2
    Type: string | null
  • ns3
    Type: string | null
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/virtual-machines/{virtualMachineId}/nameservers
curl /api/vps/v1/virtual-machines/1268054/nameservers \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "ns1": "4.3.2.1",
  "ns2": "1.2.3.4",
  "ns3": "5.2.3.4"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Set panel password

Set panel password for a specified virtual machine.

If virtual machine does not use panel OS, the request will still be processed without any effect. Requirements for password are same as in the recreate virtual machine endpoint.

Use this endpoint to configure control panel access credentials for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

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

    Panel password for the virtual machine

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/virtual-machines/{virtualMachineId}/panel-password
curl /api/vps/v1/virtual-machines/1268054/panel-password \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "password": "oMeNRustosIO"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Recreate virtual machine

Recreate a virtual machine from scratch.

The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state. Snapshots, if there are any, will be deleted.

Password Requirements

Password will be checked against leaked password databases. Requirements for the password are:

  • At least 12 characters long
  • At least one uppercase letter
  • At least one lowercase letter
  • At least one number
  • Is not leaked publicly

This operation is irreversible and will result in the loss of all data stored on the virtual machine!

Use this endpoint to completely rebuild VPS instances with fresh OS installation.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • template_id
    Type: integer
    required

    Template ID

  • panel_password
    Type: string
    min length:  
    12
    Format: password

    Panel password for the panel-based OS template. If not provided, random password will be generated. If OS does not support panel_password this field will be ignored. Password will not be shown in the response.

  • password
    Type: string
    min length:  
    12
    Format: password

    Root password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.

  • post_install_script_id
    Type: integer

    Post-install script to execute after virtual machine was recreated

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/recreate
curl /api/vps/v1/virtual-machines/1268054/recreate \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "template_id": 1130,
  "password": "oMeNRustosIO",
  "panel_password": "Mna58c17a4d",
  "post_install_script_id": 6324
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Restart virtual machine

Restart a specified virtual machine by fully stopping and starting it.

If the virtual machine was stopped, it will be started.

Use this endpoint to reboot VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/restart
curl /api/vps/v1/virtual-machines/1268054/restart \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Set root password

Set root password for a specified virtual machine.

Requirements for password are same as in the recreate virtual machine endpoint.

Use this endpoint to update administrator credentials for VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

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

    Root password for the virtual machine

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for put/api/vps/v1/virtual-machines/{virtualMachineId}/root-password
curl /api/vps/v1/virtual-machines/1268054/root-password \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "password": "oMeNRustosIO"
}'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Setup purchased virtual machine

Setup newly purchased virtual machine with initial state.

Use this endpoint to configure and initialize purchased VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Body·
required
application/json
  • data_center_id
    Type: integer
    required

    Data center ID

  • template_id
    Type: integer
    required

    Template ID

  • enable_backups
    Type: boolean

    Enable weekly backup schedule

  • hostname
    Type: string

    Override default hostname of the virtual machine

  • install_monarx
    Type: boolean

    Install Monarx malware scanner (if supported)

  • ns1
    Type: string

    Name server 1

  • ns2
    Type: string

    Name server 2

  • password
    Type: string
    min length:  
    12
    Format: password

    Password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.

  • post_install_script_id
    Type: integer

    Post-install script ID

  • public_key
    Type: object

    Use SSH key

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/setup
curl /api/vps/v1/virtual-machines/1268054/setup \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "template_id": 1130,
  "data_center_id": 19,
  "post_install_script_id": 6324,
  "password": "oMeNRustosIO",
  "hostname": "my.server.tld",
  "install_monarx": false,
  "enable_backups": true,
  "ns1": "4.3.2.1",
  "ns2": "1.2.3.4",
  "public_key": {
    "name": "my-key",
    "key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQC2X..."
  }
}'
{
  "id": 17923,
  "firewall_group_id": null,
  "subscription_id": "Azz353Uhl1xC54pR0",
  "data_center_id": 521,
  "plan": "KVM 4",
  "hostname": "srv17923.hstgr.cloud",
  "state": "running",
  "actions_lock": "unlocked",
  "cpus": 4,
  "memory": 8192,
  "disk": 51200,
  "bandwidth": 1073741824,
  "ns1": "1.1.1.1",
  "ns2": "8.8.8.8",
  "ipv4": [
    {
      "id": 52347,
      "address": "213.331.273.15",
      "ptr": "something.domain.tld"
    }
  ],
  "ipv6": [
    {
      "id": 52347,
      "address": "213.331.273.15",
      "ptr": "something.domain.tld"
    }
  ],
  "template": {
    "id": 6523,
    "name": "Ubuntu 20.04 LTS",
    "description": "Ubuntu 20.04 LTS",
    "documentation": "https://docs.ubuntu.com"
  },
  "created_at": "2024-09-05T07:25:36.00000Z"
}

Start virtual machine

Start a specified virtual machine.

If the virtual machine is already running, the request will still be processed without any effect.

Use this endpoint to power on stopped VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/start
curl /api/vps/v1/virtual-machines/1268054/start \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Stop virtual machine

Stop a specified virtual machine.

If the virtual machine is already stopped, the request will still be processed without any effect.

This is a compute-only power state change and does not affect billing. To stop future charges, disable auto-renewal on the owning subscription.

Use this endpoint to power off running VPS instances.

Path Parameters
  • virtualMachineId
    Type: integer
    required

    Virtual Machine ID

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/api/vps/v1/virtual-machines/{virtualMachineId}/stop
curl /api/vps/v1/virtual-machines/1268054/stop \
  --request POST \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": 8123712,
  "name": "action_name",
  "state": "success",
  "created_at": "2025-02-27T11:54:00Z",
  "updated_at": "2025-02-27T11:58:00Z"
}

Stores

Manage your online stores. This category includes endpoints for listing and creating stores associated with your account, and deleting stores you no longer need.

Delete store

Soft-delete a store owned by your account.

The underlying store data is preserved; only the store is marked as deleted.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to delete.

Responses
  • application/json
  • application/json
  • application/json
Request Example for delete/api/ecommerce/v1/stores/{store_id}
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG \
  --request DELETE \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "id": "store_01J8Z5F8W9K8M4A7B3C2D1E0FG",
  "is_deleted": true
}

Get stores

Retrieve the stores associated with your account.

Query Parameters
  • page
    Type: integer

    Page number

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/ecommerce/v1/stores
curl /api/ecommerce/v1/stores \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "data": [
    {
      "id": "store_01J8Z5F8W9K8M4A7B3C2D1E0FG",
      "name": "My Store",
      "created_at": "2026-01-21T07:35:04.000000Z",
      "updated_at": "2026-01-21T07:35:04.000000Z",
      "version": "v2_standalone",
      "company_name": "My Company"
    }
  ],
  "meta": {
    "current_page": 1,
    "per_page": 15,
    "total": 100
  }
}

Create store

Create a new store for your account.

A primary sales channel is created alongside the store.

Body·
required
application/json
  • company_email
    Type: string
  • company_name
    Type: string
  • country_code
    Type: string
    min length:  
    2
    max length:  
    2

    ISO 3166-1 alpha-2 country code.

  • language
    Type: string
    min length:  
    2
    max length:  
    2

    ISO 639-1 language code.

  • name
    Type: string
    max length:  
    255
  • sales_channel
    Type: object
Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores
curl /api/ecommerce/v1/stores \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Store",
  "country_code": "us",
  "company_email": "owner@example.com",
  "company_name": "My Company",
  "language": "en",
  "sales_channel": {
    "type": "custom",
    "external_id": null
  }
}'
{
  "store": {
    "id": "store_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "name": "My Store",
    "company_name": "My Company",
    "h_panel_id": "1234567",
    "created_at": "2026-01-21T07:35:04.000000Z",
    "default_currency_code": "usd"
  },
  "sales_channel": {
    "id": "scha_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "type": "custom",
    "external_id": null
  }
}

Get store metadata

Get a store's readiness metadata: whether payment methods and shipping are configured, plus its default currency. Useful to verify prerequisites before building a storefront.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to read metadata for.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/ecommerce/v1/stores/{store_id}/metadata
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/metadata \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "metadata": {
    "has_payment_methods": true,
    "has_shipping": true,
    "default_currency_code": "eur",
    "default_currency": {
      "code": "eur",
      "symbol": "€",
      "symbol_native": "€",
      "name": "Euro",
      "name_plural": "Euros",
      "decimal_digits": 2,
      "rounding": 0,
      "template": "€$1",
      "min_amount": 50
    }
  }
}

Sales channels

List sales channels

List a store's active sales channels with their full metadata.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to list sales channels for.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/ecommerce/v1/stores/{store_id}/sales-channels
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/sales-channels \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "sales_channels": [
    {
      "id": "scha_01J8Z5F8W9K8M4A7B3C2D1E0FG",
      "type": "custom",
      "is_primary": false,
      "is_active": true,
      "external_id": null,
      "name": "Vintagio Onepager",
      "domain": "https://www.bestshirt.vintagio.com"
    }
  ]
}

Create custom sales channel

Create a custom sales channel for a store. Build your own frontend and keep your catalog, orders, shipping and payments in sync through the Ecommerce API.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to create the sales channel for.

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

    Merchant-facing custom name shown in the sales channels list.

  • type
    enum
    const:  
    custom
    required

    Sales channel type. Only "custom" channels can be created via the API.

    values
    • custom
  • url
    Type: string | null
    max length:  
    2048

    Optional public address where the custom sales channel lives.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores/{store_id}/sales-channels
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/sales-channels \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "type": "custom",
  "name": "Vintagio Onepager",
  "url": "https://www.bestshirt.vintagio.com"
}'
{
  "sales_channel": {
    "id": "scha_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "type": "custom",
    "is_primary": false,
    "is_active": true,
    "external_id": null,
    "name": "Vintagio Onepager",
    "domain": "https://www.bestshirt.vintagio.com"
  }
}

Update sales channel

Update a custom sales channel. The merchant-facing name and the public url (returned as the channel domain) can be changed. Pass null to clear a value.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store that owns the sales channel.

  • sales_channel_id
    Type: string
    required

    The ID of the sales channel to update.

Body·
required
application/json
  • name
    Type: string | null
    max length:  
    100

    Merchant-facing custom name shown in the sales channels list. Pass null to clear it.

  • url
    Type: string | null
    max length:  
    2048

    Public address where the custom sales channel lives. Pass null to clear it.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api/ecommerce/v1/stores/{store_id}/sales-channels/{sales_channel_id}
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/sales-channels/scha_01J8Z5F8W9K8M4A7B3C2D1E0FG \
  --request PATCH \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "Vintagio Onepager",
  "url": "https://www.bestshirt.vintagio.com"
}'
{
  "sales_channel": {
    "id": "scha_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "type": "custom",
    "is_primary": false,
    "is_active": true,
    "external_id": null,
    "name": "Vintagio Onepager",
    "domain": "https://www.bestshirt.vintagio.com"
  }
}

Products

Manage products in your online store. This category includes endpoints for creating physical and digital products with pricing and optional descriptions.

Create digital product

Create a published digital product with a single variant and an optional external download link.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to create the product in.

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

    The product name.

  • price
    Type: integer
    min:  
    1
    required

    Price in the smallest currency unit (e.g. cents). Must be positive.

  • currency
    Type: string | null
    min length:  
    3
    max length:  
    3

    ISO 4217 currency code. Defaults to the store's default currency when omitted.

  • description
    Type: string | null
    max length:  
    5000

    The product description.

  • download_url
    Type: string | null
    max length:  
    2048

    Optional external download link delivered to the customer after purchase.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores/{store_id}/products/digital
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/products/digital \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My eBook",
  "price": 999,
  "description": "A digital download.",
  "currency": "usd",
  "download_url": "https://example.com/downloads/ebook.pdf"
}'
{
  "product": {
    "id": "prod_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "title": "My Product",
    "type": "physical",
    "status": "published",
    "price": 1000,
    "currency_code": "usd"
  },
  "admin_url": "https://admin.example.com/store_01.../products/edit?product=prod_01..."
}

Create physical product

Create a published physical product with a single variant priced in the store currency.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to create the product in.

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

    The product name.

  • price
    Type: integer
    min:  
    1
    required

    Price in the smallest currency unit (e.g. cents). Must be positive.

  • currency
    Type: string | null
    min length:  
    3
    max length:  
    3

    ISO 4217 currency code. Defaults to the store's default currency when omitted.

  • description
    Type: string | null
    max length:  
    5000

    The product description.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores/{store_id}/products/physical
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/products/physical \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "name": "My Product",
  "price": 1000,
  "description": "A great product.",
  "currency": "usd"
}'
{
  "product": {
    "id": "prod_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "title": "My Product",
    "type": "physical",
    "status": "published",
    "price": 1000,
    "currency_code": "usd"
  },
  "admin_url": "https://admin.example.com/store_01.../products/edit?product=prod_01..."
}

Shipping

Configure shipping options for your online store. This category includes endpoints for setting the flat-rate shipping price applied to customer orders.

Set store shipping

Set the flat-rate shipping price for a store, creating the shipping zone if it does not exist yet.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to configure shipping for.

Body·
required
application/json
  • price
    Type: integer
    min:  
    0
    required

    Flat shipping rate in the smallest currency unit (e.g. cents). Use 0 for free shipping.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores/{store_id}/shipping
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/shipping \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "price": 500
}'
{
  "shipping_option": {
    "id": "so_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "amount": 500,
    "currency_code": "usd"
  },
  "admin_url": "https://admin.example.com/store_01.../store-settings/shipping"
}

Payments

Manage payment methods for your online store. This category includes endpoints for enabling payment options such as manual (cash on delivery) payment at checkout.

Enable manual payment method

Enable a manual payment method so the store can accept orders without an online payment provider.

Path Parameters
  • store_id
    Type: string
    required

    The ID of the store to enable manual payment for.

Body·
required
application/json
  • title
    Type: string | null
    max length:  
    255

    Optional display name shown to customers at checkout.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/api/ecommerce/v1/stores/{store_id}/payment-methods/manual
curl /api/ecommerce/v1/stores/store_01J8Z5F8W9K8M4A7B3C2D1E0FG/payment-methods/manual \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "title": "Cash on delivery"
}'
{
  "payment_method": {
    "id": "spp_01J8Z5F8W9K8M4A7B3C2D1E0FG",
    "provider_id": "manual",
    "is_enabled": true,
    "title": "Cash on delivery"
  },
  "admin_url": "https://admin.example.com/store_01.../store-settings/payment-management"
}

Miscellaneous

Ecommerce: Miscellaneous

Get custom storefront setup instructions

Retrieve step-by-step setup instructions, formatted as Markdown, for connecting a custom sales channel to your store and keeping your catalog, orders, shipping and payments in sync through the Ecommerce API.

Responses
  • application/json
  • application/json
  • application/json
Request Example for get/api/ecommerce/v1/miscellaneous/custom-storefront-instructions
curl /api/ecommerce/v1/miscellaneous/custom-storefront-instructions \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "instructions": "# Connect your custom storefront\n\nUse the Ecommerce API to sync your store."
}

Models

Models