> For the complete documentation index, see [llms.txt](https://docs.hostinger.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hostinger.com/api-reference/overview.md).

# API Reference

How to authenticate against the Hostinger API, how requests and rate limits work, where to find the full endpoint reference, and the other ways to automate Hostinger — the CLI, the SDKs, the MCP serve

The Hostinger API is a mostly RESTful API over HTTPS. Every endpoint is documented under [**Endpoints**](/api-reference/endpoints.md), grouped by product — hosting, domains, DNS, email, VPS, WordPress, ecommerce, and billing.

Those pages are rendered from the same OpenAPI specification that produces the CLI, the SDKs, and the MCP server, so the reference cannot drift from the API itself.

## Authentication

1. Generate an API token in [hPanel → API](https://hpanel.hostinger.com/profile/api). Tokens inherit the permissions of the user who created them and can be set to expire. See [Security & Access](/account/security.md) for how they're managed.
2. Send the token as a bearer header on every request:

```bash
curl https://developers.hostinger.com/api/hosting/v1/websites \
  -H "Authorization: Bearer YOUR_API_TOKEN"
```

## Making requests

The base URL is `https://developers.hostinger.com`, and every path is prefixed with `/api/`, the product, and a version — for example `/api/hosting/v1/websites`. Versions are per endpoint, so `v1` paths keep working as new ones are added.

Requests must use `Content-Type: application/json`, and responses are always JSON.

Parameters arrive in three places:

* **Path parameters** identify a resource and are written in curly braces in the reference — `/api/vps/v1/virtual-machines/{virtualMachineId}`. Substitute the value; every path parameter is required.
* **Query parameters** filter, search, and paginate — `?page=2`. All of them are optional. See [Pagination](/api-reference/pagination.md) for `page` and `per_page`.
* **Request bodies** carry the data for `POST`, `PUT`, and `PATCH` as a single JSON object. Each [endpoint page](/api-reference/endpoints.md) documents the required structure and shows an example.

A `202 Accepted` means the request was taken but completes asynchronously — the purchase endpoints return it while payment is processing. Poll the resource rather than resending. [Errors](/api-reference/errors.md) covers the rest of the status codes and what a failed response looks like.

## Rate limits

The API allows **90 requests per minute**. Authenticated requests are counted per user — so the same token used from several machines shares one budget — and unauthenticated requests are counted per IP address. Some accounts have a custom limit; a few endpoints, such as domain availability checks, are metered separately.

Exceeding the limit returns `429 Too Many Requests`. Authenticated responses carry `X-RateLimit-Limit` and `X-RateLimit-Remaining` so you can pace your calls, and a `429` adds `Retry-After`. Repeatedly hitting the limit can get your IP temporarily blocked.

## Trying endpoints from the browser

Each endpoint page has a **Test it** panel. Paste an API token into it and the request runs against the live API from your browser — the same call the code samples show.

> Test requests count against your rate limit and act on your real account. Prefer read-only endpoints while exploring.

## Reference pages

* [**Endpoints**](/api-reference/endpoints.md) — every endpoint, grouped by product
* [**Pagination**](/api-reference/pagination.md) — `page`, `per_page`, and the `meta` object on list endpoints
* [**Errors**](/api-reference/errors.md) — status codes, the error response shape, and correlation IDs
* [**Support & feedback**](/api-reference/support.md) — where to report a bug or request an endpoint

## Other ways to automate Hostinger

* [**Hostinger CLI**](/api-reference/cli.md) — the official command-line client, generated from this same specification. Install it and sign in from your browser; no API token needed:

```bash
brew install hostinger/tap/hostinger
hostinger hosting websites list
```

* [**Scripting with the CLI**](/api-reference/cli-scripting.md) — piping JSON output into scripts and CI
* [**SDKs**](/api-reference/sdks.md) — official client libraries for PHP, Python, and TypeScript
* [**Email SDKs**](/api-reference/email-sdks.md) — libraries and a CLI for the separate [Mail API](https://api.mail.hostinger.com), which reads and sends mail from your mailboxes
* [**Hostinger Connector**](/hostinger-connector/overview.md) — manage Hostinger from your code editor through an AI assistant, powered by this API
* **MCP server** — the [`@hostinger/mcp`](https://www.npmjs.com/package/@hostinger/mcp) npm package exposes the API as 372 Model Context Protocol tools for any AI assistant, or connect to the hosted remote server at `https://mcp.hostinger.com` with no install

[**Tools & integrations**](/api-reference/tools.md) covers all of the above plus the Terraform provider, Ansible collection, n8n node, WHMCS module, and Postman collection.

***

*Last updated: September 10, 2026*
