This is page 1 of 3. Use http://codebase.md/hostinger/api-mcp-server?lines=true&page={x} to view the full context.
# Directory Structure
```
├── .env.example
├── .github
│ ├── ISSUE_TEMPLATE
│ │ └── bug_report.md
│ └── workflows
│ └── build-release.yaml
├── build.js
├── CODEOWNERS
├── Dockerfile
├── glama.json
├── LICENSE
├── package-lock.json
├── package.json
├── README.md
├── server.js
├── server.ts
├── tsconfig.json
└── types.d.ts
```
# Files
--------------------------------------------------------------------------------
/.env.example:
--------------------------------------------------------------------------------
```
1 | # API Configuration
2 | TRANSPORT=stdio # Fixed to stdio
3 |
4 | # Debug
5 | DEBUG=false
6 |
7 | # --- Authorization Configuration ---
8 | # Example for HTTP Bearer Token "apiToken"
9 | APITOKEN=YOUR_TOKEN_VALUE
10 |
11 |
```
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
```markdown
1 | # hostinger-api-mcp
2 |
3 | Model Context Protocol (MCP) server for Hostinger API.
4 |
5 | ## Prerequisites
6 | - Node.js version 24 or higher
7 |
8 | If you don't have Node.js installed, you can download it from the [official website](https://nodejs.org/en/download/).
9 | Alternatively, you can use a package manager like [Homebrew](https://brew.sh/) (for macOS) or [Chocolatey](https://chocolatey.org/) (for Windows) to install Node.js.
10 |
11 | We recommend using [NVM (Node Version Manager)](https://github.com/nvm-sh/nvm) to install and manage installed Node.js versions.
12 | After installing NVM, you can install Node.js with the following command:
13 | ```bash
14 | nvm install v24
15 | nvm use v24
16 | ```
17 |
18 | ## Installation
19 |
20 | To install the MCP server, run one of the following command, depending on your package manager:
21 |
22 | ```bash
23 | # Install globally from npm
24 | npm install -g hostinger-api-mcp
25 |
26 | # Or with yarn
27 | yarn global add hostinger-api-mcp
28 |
29 | # Or with pnpm
30 | pnpm add -g hostinger-api-mcp
31 | ```
32 |
33 | ## Update
34 |
35 | To update the MCP server to the latest version, use one of the following commands, depending on your package manager:
36 |
37 | ```bash
38 | # Update globally from npm
39 | npm update -g hostinger-api-mcp
40 |
41 | # Or with yarn
42 | yarn global upgrade hostinger-api-mcp
43 |
44 | # Or with pnpm
45 | pnpm update -g hostinger-api-mcp
46 | ```
47 |
48 | ## Configuration
49 |
50 | The following environment variables can be configured when running the server:
51 | - `DEBUG`: Enable debug logging (true/false) (default: false)
52 | - `API_TOKEN`: Your API token, which will be sent in the `Authorization` header.
53 |
54 | ## Usage
55 |
56 | ### JSON configuration for Claude, Cursor, etc.
57 |
58 | ```json
59 | {
60 | "mcpServers": {
61 | "hostinger-api": {
62 | "command": "hostinger-api-mcp",
63 | "env": {
64 | "DEBUG": "false",
65 | "API_TOKEN": "YOUR API TOKEN"
66 | }
67 | }
68 | }
69 | }
70 | ```
71 |
72 | ### Transport Options
73 |
74 | The MCP server supports two transport modes:
75 |
76 | #### Standard I/O Transport
77 |
78 | The server can use standard input / output (stdio) transport (default). This provides local streaming:
79 |
80 | #### Streamable HTTP Transport
81 |
82 | The server can use HTTP streaming transport. This provides bidirectional streaming over HTTP:
83 |
84 | ```bash
85 | # Default HTTP transport on localhost:8100
86 | hostinger-api-mcp --http
87 |
88 | # Specify custom host and port
89 | hostinger-api-mcp --http --host 0.0.0.0 --port 8150
90 | ```
91 |
92 | #### Command Line Options
93 |
94 | ```
95 | Options:
96 | --http Use HTTP streaming transport
97 | --stdio Use Server-Sent Events transport (default)
98 | --host {host} Hostname or IP address to listen on (default: 127.0.0.1)
99 | --port {port} Port to bind to (default: 8100)
100 | --help Show help message
101 | ```
102 |
103 | ### Using as an MCP Tool Provider
104 |
105 | This server implements the Model Context Protocol (MCP) and can be used with any MCP-compatible consumer.
106 |
107 | Example of connecting to this server using HTTP streaming transport:
108 |
109 | ```javascript
110 | import { Client } from "@modelcontextprotocol/sdk/client/index.js";
111 | import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
112 |
113 | // Create HTTP transport
114 | const transport = new StreamableHTTPClientTransport({
115 | url: "http://localhost:8100/",
116 | headers: {
117 | "Authorization": `Bearer ${process.env.API_TOKEN}`
118 | }
119 | });
120 |
121 | // Connect to the MCP server
122 | const client = new Client({
123 | name: "my-client",
124 | version: "1.0.0"
125 | }, {
126 | capabilities: {}
127 | });
128 |
129 | await client.connect(transport);
130 |
131 | // List available tools
132 | const { tools } = await client.listTools();
133 | console.log("Available tools:", tools);
134 |
135 | // Call a tool
136 | const result = await client.callTool({
137 | name: "billing_getCatalogItemListV1",
138 | arguments: { category: "DOMAIN" }
139 | });
140 | console.log("Tool result:", result);
141 | ```
142 |
143 | ## Available Tools
144 |
145 | This MCP server provides the following tools:
146 |
147 | ### hosting_importWordpressWebsite
148 |
149 | Import a WordPress website from an archive file to a hosting server. This tool uploads a website archive (zip, tar, tar.gz, etc.) and a database dump (.sql file) to deploy a complete WordPress website. The archive will be extracted on the server automatically. Note: This process may take a while for larger sites. After upload completion, files are being extracted and the site will be available in a few minutes. The username will be automatically resolved from the domain.
150 |
151 | - **Method**: ``
152 | - **Path**: ``
153 |
154 | **Parameters**:
155 |
156 | - `domain`: Domain name associated with the hosting account (e.g., example.com) (required)
157 | - `archivePath`: Absolute or relative path to the website archive file. Supported formats: zip, tar, tar.gz, tgz, 7z, gz, gzip. If user provides directory path, create archive from it before proceeding using EXACTLY this naming pattern: directoryname_YYYYMMDD_HHMMSS.zip (e.g., mywebsite_20250115_143022.zip) (required)
158 | - `databaseDump`: Absolute or relative path to a database dump file (.sql) (required)
159 |
160 | ### hosting_deployWordpressPlugin
161 |
162 | Deploy a WordPress plugin from a directory to a hosting server. This tool uploads all plugin files and triggers plugin deployment.
163 |
164 | - **Method**: ``
165 | - **Path**: ``
166 |
167 | **Parameters**:
168 |
169 | - `domain`: Domain name associated with the hosting account (e.g., example.com) (required)
170 | - `slug`: WordPress plugin slug (e.g., omnisend) (required)
171 | - `pluginPath`: Absolute or relative path to the plugin directory containing all plugin files (required)
172 |
173 | ### hosting_deployWordpressTheme
174 |
175 | Deploy a WordPress theme from a directory to a hosting server. This tool uploads all theme files and triggers theme deployment. The uploaded theme can optionally be activated after deployment.
176 |
177 | - **Method**: ``
178 | - **Path**: ``
179 |
180 | **Parameters**:
181 |
182 | - `domain`: Domain name associated with the hosting account (e.g., example.com) (required)
183 | - `slug`: WordPress theme slug (e.g., twentytwentyfive) (required)
184 | - `themePath`: Absolute or relative path to the theme directory containing all theme files (required)
185 | - `activate`: Whether to activate the theme after deployment (default: false)
186 |
187 | ### billing_getCatalogItemListV1
188 |
189 | Retrieve catalog items available for order.
190 |
191 | Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
192 |
193 | Use this endpoint to view available services and pricing before placing orders.
194 |
195 | - **Method**: `GET`
196 | - **Path**: `/api/billing/v1/catalog`
197 |
198 | **Parameters**:
199 |
200 | - `category`: Filter catalog items by category
201 | - `name`: Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
202 |
203 | ### billing_createServiceOrderV1
204 |
205 | Create a new service order.
206 |
207 | **DEPRECATED**
208 |
209 | To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.
210 |
211 | To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.
212 |
213 |
214 | To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
215 | Coupons also can be provided during order creation.
216 |
217 | Orders created using this endpoint will be set for automatic renewal.
218 |
219 | Some `credit_card` payments might need additional verification, rendering purchase unprocessed.
220 | We recommend use other payment methods than `credit_card` if you encounter this issue.
221 |
222 | - **Method**: `POST`
223 | - **Path**: `/api/billing/v1/orders`
224 |
225 | **Parameters**:
226 |
227 | - `payment_method_id`: Payment method ID (required)
228 | - `items`: items parameter (required)
229 | - `coupons`: Discount coupon codes
230 |
231 | ### billing_setDefaultPaymentMethodV1
232 |
233 | Set the default payment method for your account.
234 |
235 | Use this endpoint to configure the primary payment method for future orders.
236 |
237 | - **Method**: `POST`
238 | - **Path**: `/api/billing/v1/payment-methods/{paymentMethodId}`
239 |
240 | **Parameters**:
241 |
242 | - `paymentMethodId`: Payment method ID (required)
243 |
244 | ### billing_deletePaymentMethodV1
245 |
246 | Delete a payment method from your account.
247 |
248 | Use this endpoint to remove unused payment methods from user accounts.
249 |
250 | - **Method**: `DELETE`
251 | - **Path**: `/api/billing/v1/payment-methods/{paymentMethodId}`
252 |
253 | **Parameters**:
254 |
255 | - `paymentMethodId`: Payment method ID (required)
256 |
257 | ### billing_getPaymentMethodListV1
258 |
259 | Retrieve available payment methods that can be used for placing new orders.
260 |
261 | If you want to add new payment method, please use [hPanel](https://hpanel.hostinger.com/billing/payment-methods).
262 |
263 | Use this endpoint to view available payment options before creating orders.
264 |
265 | - **Method**: `GET`
266 | - **Path**: `/api/billing/v1/payment-methods`
267 |
268 |
269 |
270 | ### billing_cancelSubscriptionV1
271 |
272 | Cancel a subscription and stop any further billing.
273 |
274 | Use this endpoint when users want to terminate active services.
275 |
276 | - **Method**: `DELETE`
277 | - **Path**: `/api/billing/v1/subscriptions/{subscriptionId}`
278 |
279 | **Parameters**:
280 |
281 | - `subscriptionId`: Subscription ID (required)
282 |
283 | ### billing_getSubscriptionListV1
284 |
285 | Retrieve a list of all subscriptions associated with your account.
286 |
287 | Use this endpoint to monitor active services and billing status.
288 |
289 | - **Method**: `GET`
290 | - **Path**: `/api/billing/v1/subscriptions`
291 |
292 |
293 |
294 | ### billing_disableAutoRenewalV1
295 |
296 | Disable auto-renewal for a subscription.
297 |
298 | Use this endpoint when disable auto-renewal for a subscription.
299 |
300 | - **Method**: `DELETE`
301 | - **Path**: `/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/disable`
302 |
303 | **Parameters**:
304 |
305 | - `subscriptionId`: Subscription ID (required)
306 |
307 | ### billing_enableAutoRenewalV1
308 |
309 | Enable auto-renewal for a subscription.
310 |
311 | Use this endpoint when enable auto-renewal for a subscription.
312 |
313 | - **Method**: `PATCH`
314 | - **Path**: `/api/billing/v1/subscriptions/{subscriptionId}/auto-renewal/enable`
315 |
316 | **Parameters**:
317 |
318 | - `subscriptionId`: Subscription ID (required)
319 |
320 | ### DNS_getDNSSnapshotV1
321 |
322 | Retrieve particular DNS snapshot with contents of DNS zone records.
323 |
324 | Use this endpoint to view historical DNS configurations for domains.
325 |
326 | - **Method**: `GET`
327 | - **Path**: `/api/dns/v1/snapshots/{domain}/{snapshotId}`
328 |
329 | **Parameters**:
330 |
331 | - `domain`: Domain name (required)
332 | - `snapshotId`: Snapshot ID (required)
333 |
334 | ### DNS_getDNSSnapshotListV1
335 |
336 | Retrieve DNS snapshots for a domain.
337 |
338 | Use this endpoint to view available DNS backup points for restoration.
339 |
340 | - **Method**: `GET`
341 | - **Path**: `/api/dns/v1/snapshots/{domain}`
342 |
343 | **Parameters**:
344 |
345 | - `domain`: Domain name (required)
346 |
347 | ### DNS_restoreDNSSnapshotV1
348 |
349 | Restore DNS zone to the selected snapshot.
350 |
351 | Use this endpoint to revert domain DNS to a previous configuration.
352 |
353 | - **Method**: `POST`
354 | - **Path**: `/api/dns/v1/snapshots/{domain}/{snapshotId}/restore`
355 |
356 | **Parameters**:
357 |
358 | - `domain`: Domain name (required)
359 | - `snapshotId`: Snapshot ID (required)
360 |
361 | ### DNS_getDNSRecordsV1
362 |
363 | Retrieve DNS zone records for a specific domain.
364 |
365 | Use this endpoint to view current DNS configuration for domain management.
366 |
367 | - **Method**: `GET`
368 | - **Path**: `/api/dns/v1/zones/{domain}`
369 |
370 | **Parameters**:
371 |
372 | - `domain`: Domain name (required)
373 |
374 | ### DNS_updateDNSRecordsV1
375 |
376 | Update DNS records for the selected domain.
377 |
378 | Using `overwrite = true` will replace existing records with the provided ones.
379 | Otherwise existing records will be updated and new records will be added.
380 |
381 | Use this endpoint to modify domain DNS configuration.
382 |
383 | - **Method**: `PUT`
384 | - **Path**: `/api/dns/v1/zones/{domain}`
385 |
386 | **Parameters**:
387 |
388 | - `domain`: Domain name (required)
389 | - `overwrite`: 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.
390 | - `zone`: zone parameter (required)
391 |
392 | ### DNS_deleteDNSRecordsV1
393 |
394 | Delete DNS records for the selected domain.
395 |
396 | To filter which records to delete, add the `name` of the record and `type` to the filter.
397 | Multiple filters can be provided with single request.
398 |
399 | If you have multiple records with the same name and type, and you want to delete only part of them,
400 | refer to the `Update zone records` endpoint.
401 |
402 | Use this endpoint to remove specific DNS records from domains.
403 |
404 | - **Method**: `DELETE`
405 | - **Path**: `/api/dns/v1/zones/{domain}`
406 |
407 | **Parameters**:
408 |
409 | - `domain`: Domain name (required)
410 |
411 | ### DNS_resetDNSRecordsV1
412 |
413 | Reset DNS zone to the default records.
414 |
415 | Use this endpoint to restore domain DNS to original configuration.
416 |
417 | - **Method**: `POST`
418 | - **Path**: `/api/dns/v1/zones/{domain}/reset`
419 |
420 | **Parameters**:
421 |
422 | - `domain`: Domain name (required)
423 | - `sync`: Determines if operation should be run synchronously
424 | - `reset_email_records`: Determines if email records should be reset
425 | - `whitelisted_record_types`: Specifies which record types to not reset
426 |
427 | ### DNS_validateDNSRecordsV1
428 |
429 | Validate DNS records prior to update for the selected domain.
430 |
431 | If the validation is successful, the response will contain `200 Success` code.
432 | If there is validation error, the response will fail with `422 Validation error` code.
433 |
434 | Use this endpoint to verify DNS record validity before applying changes.
435 |
436 | - **Method**: `POST`
437 | - **Path**: `/api/dns/v1/zones/{domain}/validate`
438 |
439 | **Parameters**:
440 |
441 | - `domain`: Domain name (required)
442 | - `overwrite`: 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.
443 | - `zone`: zone parameter (required)
444 |
445 | ### v2_getDomainVerificationsDIRECT
446 |
447 | Retrieve a list of pending and completed domain verifications.
448 |
449 | - **Method**: `GET`
450 | - **Path**: `/api/v2/direct/verifications/active`
451 |
452 |
453 |
454 | ### domains_checkDomainAvailabilityV1
455 |
456 | Check availability of domain names across multiple TLDs.
457 |
458 | Multiple TLDs can be checked at once.
459 | If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`.
460 | TLDs should be provided without leading dot (e.g. `com`, `net`, `org`).
461 |
462 | Endpoint has rate limit of 10 requests per minute.
463 |
464 | Use this endpoint to verify domain availability before purchase.
465 |
466 | - **Method**: `POST`
467 | - **Path**: `/api/domains/v1/availability`
468 |
469 | **Parameters**:
470 |
471 | - `domain`: Domain name (without TLD) (required)
472 | - `tlds`: TLDs list (required)
473 | - `with_alternatives`: Should response include alternatives
474 |
475 | ### domains_getDomainForwardingV1
476 |
477 | Retrieve domain forwarding data.
478 |
479 | Use this endpoint to view current redirect configuration for domains.
480 |
481 | - **Method**: `GET`
482 | - **Path**: `/api/domains/v1/forwarding/{domain}`
483 |
484 | **Parameters**:
485 |
486 | - `domain`: Domain name (required)
487 |
488 | ### domains_deleteDomainForwardingV1
489 |
490 | Delete domain forwarding data.
491 |
492 | Use this endpoint to remove redirect configuration from domains.
493 |
494 | - **Method**: `DELETE`
495 | - **Path**: `/api/domains/v1/forwarding/{domain}`
496 |
497 | **Parameters**:
498 |
499 | - `domain`: Domain name (required)
500 |
501 | ### domains_createDomainForwardingV1
502 |
503 | Create domain forwarding configuration.
504 |
505 | Use this endpoint to set up domain redirects to other URLs.
506 |
507 | - **Method**: `POST`
508 | - **Path**: `/api/domains/v1/forwarding`
509 |
510 | **Parameters**:
511 |
512 | - `domain`: Domain name (required)
513 | - `redirect_type`: Redirect type (required)
514 | - `redirect_url`: URL to forward domain to (required)
515 |
516 | ### domains_enableDomainLockV1
517 |
518 | Enable domain lock for the domain.
519 |
520 | When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
521 |
522 | Use this endpoint to secure domains against unauthorized transfers.
523 |
524 | - **Method**: `PUT`
525 | - **Path**: `/api/domains/v1/portfolio/{domain}/domain-lock`
526 |
527 | **Parameters**:
528 |
529 | - `domain`: Domain name (required)
530 |
531 | ### domains_disableDomainLockV1
532 |
533 | Disable domain lock for the domain.
534 |
535 | Domain lock needs to be disabled before transferring the domain to another registrar.
536 |
537 | Use this endpoint to prepare domains for transfer to other registrars.
538 |
539 | - **Method**: `DELETE`
540 | - **Path**: `/api/domains/v1/portfolio/{domain}/domain-lock`
541 |
542 | **Parameters**:
543 |
544 | - `domain`: Domain name (required)
545 |
546 | ### domains_getDomainDetailsV1
547 |
548 | Retrieve detailed information for specified domain.
549 |
550 | Use this endpoint to view comprehensive domain configuration and status.
551 |
552 | - **Method**: `GET`
553 | - **Path**: `/api/domains/v1/portfolio/{domain}`
554 |
555 | **Parameters**:
556 |
557 | - `domain`: Domain name (required)
558 |
559 | ### domains_getDomainListV1
560 |
561 | Retrieve all domains associated with your account.
562 |
563 | Use this endpoint to view user's domain portfolio.
564 |
565 | - **Method**: `GET`
566 | - **Path**: `/api/domains/v1/portfolio`
567 |
568 |
569 |
570 | ### domains_purchaseNewDomainV1
571 |
572 | Purchase and register a new domain name.
573 |
574 | If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status.
575 |
576 | If no payment method is provided, your default payment method will be used automatically.
577 |
578 | If no WHOIS information is provided, default contact information for that TLD will be used.
579 | Before making request, ensure WHOIS information for desired TLD exists in your account.
580 |
581 | Some TLDs require `additional_details` to be provided and these will be validated before completing purchase.
582 |
583 | Use this endpoint to register new domains for users.
584 |
585 | - **Method**: `POST`
586 | - **Path**: `/api/domains/v1/portfolio`
587 |
588 | **Parameters**:
589 |
590 | - `domain`: Domain name (required)
591 | - `item_id`: Catalog price item ID (required)
592 | - `payment_method_id`: Payment method ID, default will be used if not provided
593 | - `domain_contacts`: Domain contact information
594 | - `additional_details`: Additional registration data, possible values depends on TLD
595 | - `coupons`: Discount coupon codes
596 |
597 | ### domains_enablePrivacyProtectionV1
598 |
599 | Enable privacy protection for the domain.
600 |
601 | When privacy protection is enabled, domain owner's personal information is hidden from public WHOIS database.
602 |
603 | Use this endpoint to protect domain owner's personal information from public view.
604 |
605 | - **Method**: `PUT`
606 | - **Path**: `/api/domains/v1/portfolio/{domain}/privacy-protection`
607 |
608 | **Parameters**:
609 |
610 | - `domain`: Domain name (required)
611 |
612 | ### domains_disablePrivacyProtectionV1
613 |
614 | Disable privacy protection for the domain.
615 |
616 | When privacy protection is disabled, domain owner's personal information is visible in public WHOIS database.
617 |
618 | Use this endpoint to make domain owner's information publicly visible.
619 |
620 | - **Method**: `DELETE`
621 | - **Path**: `/api/domains/v1/portfolio/{domain}/privacy-protection`
622 |
623 | **Parameters**:
624 |
625 | - `domain`: Domain name (required)
626 |
627 | ### domains_updateDomainNameserversV1
628 |
629 | Set nameservers for a specified domain.
630 |
631 | Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
632 |
633 | Use this endpoint to configure custom DNS hosting for domains.
634 |
635 | - **Method**: `PUT`
636 | - **Path**: `/api/domains/v1/portfolio/{domain}/nameservers`
637 |
638 | **Parameters**:
639 |
640 | - `domain`: Domain name (required)
641 | - `ns1`: First name server (required)
642 | - `ns2`: Second name server (required)
643 | - `ns3`: Third name server
644 | - `ns4`: Fourth name server
645 |
646 | ### domains_getWHOISProfileV1
647 |
648 | Retrieve a WHOIS contact profile.
649 |
650 | Use this endpoint to view domain registration contact information.
651 |
652 | - **Method**: `GET`
653 | - **Path**: `/api/domains/v1/whois/{whoisId}`
654 |
655 | **Parameters**:
656 |
657 | - `whoisId`: WHOIS ID (required)
658 |
659 | ### domains_deleteWHOISProfileV1
660 |
661 | Delete WHOIS contact profile.
662 |
663 | Use this endpoint to remove unused contact profiles from account.
664 |
665 | - **Method**: `DELETE`
666 | - **Path**: `/api/domains/v1/whois/{whoisId}`
667 |
668 | **Parameters**:
669 |
670 | - `whoisId`: WHOIS ID (required)
671 |
672 | ### domains_getWHOISProfileListV1
673 |
674 | Retrieve WHOIS contact profiles.
675 |
676 | Use this endpoint to view available contact profiles for domain registration.
677 |
678 | - **Method**: `GET`
679 | - **Path**: `/api/domains/v1/whois`
680 |
681 | **Parameters**:
682 |
683 | - `tld`: Filter by TLD (without leading dot)
684 |
685 | ### domains_createWHOISProfileV1
686 |
687 | Create WHOIS contact profile.
688 |
689 | Use this endpoint to add new contact information for domain registration.
690 |
691 | - **Method**: `POST`
692 | - **Path**: `/api/domains/v1/whois`
693 |
694 | **Parameters**:
695 |
696 | - `tld`: TLD of the domain (without leading dot) (required)
697 | - `country`: ISO 3166 2-letter country code (required)
698 | - `entity_type`: Legal entity type (required)
699 | - `tld_details`: TLD details
700 | - `whois_details`: WHOIS details (required)
701 |
702 | ### domains_getWHOISProfileUsageV1
703 |
704 | Retrieve domain list where provided WHOIS contact profile is used.
705 |
706 | Use this endpoint to view which domains use specific contact profiles.
707 |
708 | - **Method**: `GET`
709 | - **Path**: `/api/domains/v1/whois/{whoisId}/usage`
710 |
711 | **Parameters**:
712 |
713 | - `whoisId`: WHOIS ID (required)
714 |
715 | ### hosting_listAvailableDatacentersV1
716 |
717 | Retrieve a list of datacenters available for setting up hosting plans based on available datacenter capacity and hosting plan of your order.
718 | The first item in the list is the best match for your specific order requirements.
719 |
720 | - **Method**: `GET`
721 | - **Path**: `/api/hosting/v1/datacenters`
722 |
723 | **Parameters**:
724 |
725 | - `order_id`: Order ID (required)
726 |
727 | ### hosting_generateAFreeSubdomainV1
728 |
729 | Generate a unique free subdomain that can be used for hosting services without purchasing custom domains.
730 | Free subdomains allow you to start using hosting services immediately and you can always connect a custom domain to your site later.
731 |
732 | - **Method**: `POST`
733 | - **Path**: `/api/hosting/v1/domains/free-subdomains`
734 |
735 |
736 |
737 | ### hosting_verifyDomainOwnershipV1
738 |
739 | Verify ownership of a single domain and return the verification status.
740 |
741 | Use this endpoint to check if a domain is accessible for you before using it for new websites.
742 | If the domain is accessible, the response will have `is_accessible: true`.
743 | If not, add the given TXT record to your domain's DNS records and try verifying again.
744 | Keep in mind that it may take up to 10 minutes for new TXT DNS records to propagate.
745 |
746 | Skip this verification when using Hostinger's free subdomains (*.hostingersite.com).
747 |
748 | - **Method**: `POST`
749 | - **Path**: `/api/hosting/v1/domains/verify-ownership`
750 |
751 | **Parameters**:
752 |
753 | - `domain`: Domain to verify ownership for (required)
754 |
755 | ### hosting_listOrdersV1
756 |
757 | Retrieve a paginated list of orders accessible to the authenticated client.
758 |
759 | This endpoint returns orders of your hosting accounts as well as orders of other client hosting accounts that have shared access with you.
760 |
761 | Use the available query parameters to filter results by order statuses or specific order IDs for more targeted results.
762 |
763 | - **Method**: `GET`
764 | - **Path**: `/api/hosting/v1/orders`
765 |
766 | **Parameters**:
767 |
768 | - `page`: Page number
769 | - `per_page`: Number of items per page
770 | - `statuses`: Filter by order statuses
771 | - `order_ids`: Filter by specific order IDs
772 |
773 | ### hosting_listWebsitesV1
774 |
775 | Retrieve a paginated list of websites (main and addon types) accessible to the authenticated client.
776 |
777 | This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you.
778 |
779 | Use the available query parameters to filter results by username, order ID, enabled status, or domain name for more targeted results.
780 |
781 | - **Method**: `GET`
782 | - **Path**: `/api/hosting/v1/websites`
783 |
784 | **Parameters**:
785 |
786 | - `page`: Page number
787 | - `per_page`: Number of items per page
788 | - `username`: Filter by specific username
789 | - `order_id`: Order ID
790 | - `is_enabled`: Filter by enabled status
791 | - `domain`: Filter by domain name (exact match)
792 |
793 | ### hosting_createWebsiteV1
794 |
795 | Create a new website for the authenticated client.
796 |
797 | 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.
798 |
799 | Subsequent websites will be hosted on the same datacenter automatically.
800 |
801 | Website creation takes up to a few minutes to complete. Check the websites list endpoint to see when your new website becomes available.
802 |
803 | - **Method**: `POST`
804 | - **Path**: `/api/hosting/v1/websites`
805 |
806 | **Parameters**:
807 |
808 | - `domain`: Domain name for the website. Cannot start with "www." (required)
809 | - `order_id`: ID of the associated order (required)
810 | - `datacenter_code`: Datacenter code. This parameter is required when creating the first website on a new hosting plan.
811 |
812 | ### reach_deleteAContactV1
813 |
814 | Delete a contact with the specified UUID.
815 |
816 | This endpoint permanently removes a contact from the email marketing system.
817 |
818 | - **Method**: `DELETE`
819 | - **Path**: `/api/reach/v1/contacts/{uuid}`
820 |
821 | **Parameters**:
822 |
823 | - `uuid`: UUID of the contact to delete (required)
824 |
825 | ### reach_listContactGroupsV1
826 |
827 | Get a list of all contact groups.
828 |
829 | This endpoint returns a list of contact groups that can be used to organize contacts.
830 |
831 | - **Method**: `GET`
832 | - **Path**: `/api/reach/v1/contacts/groups`
833 |
834 |
835 |
836 | ### reach_listContactsV1
837 |
838 | Get a list of contacts, optionally filtered by group and subscription status.
839 |
840 | This endpoint returns a paginated list of contacts with their basic information.
841 | You can filter contacts by group UUID and subscription status.
842 |
843 | - **Method**: `GET`
844 | - **Path**: `/api/reach/v1/contacts`
845 |
846 | **Parameters**:
847 |
848 | - `group_uuid`: Filter contacts by group UUID
849 | - `subscription_status`: Filter contacts by subscription status
850 | - `page`: Page number
851 |
852 | ### reach_createANewContactV1
853 |
854 | Create a new contact in the email marketing system.
855 |
856 | This endpoint allows you to create a new contact with basic information like name, email, and surname.
857 | You can optionally assign the contact to specific groups and add notes.
858 |
859 | The contact will be automatically subscribed to email communications.
860 |
861 | - **Method**: `POST`
862 | - **Path**: `/api/reach/v1/contacts`
863 |
864 | **Parameters**:
865 |
866 | - `email`: email parameter (required)
867 | - `name`: name parameter
868 | - `surname`: surname parameter
869 | - `group_uuids`: group_uuids parameter
870 | - `note`: note parameter
871 |
872 | ### VPS_getDataCenterListV1
873 |
874 | Retrieve all available data centers.
875 |
876 | Use this endpoint to view location options before deploying VPS instances.
877 |
878 | - **Method**: `GET`
879 | - **Path**: `/api/vps/v1/data-centers`
880 |
881 |
882 |
883 | ### VPS_getProjectContainersV1
884 |
885 | Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.
886 |
887 | This endpoint returns detailed information about each container including their current status, port mappings, and runtime configuration.
888 |
889 | Use this to monitor the health and state of all services within your Docker Compose project.
890 |
891 | - **Method**: `GET`
892 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/containers`
893 |
894 | **Parameters**:
895 |
896 | - `virtualMachineId`: Virtual Machine ID (required)
897 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
898 |
899 | ### VPS_getProjectContentsV1
900 |
901 | Retrieves the complete project information including the docker-compose.yml file contents, project metadata, and current deployment status.
902 |
903 | This endpoint provides the full configuration and state details of a specific Docker Compose project.
904 |
905 | Use this to inspect project settings, review the compose file, or check the overall project health.
906 |
907 | - **Method**: `GET`
908 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}`
909 |
910 | **Parameters**:
911 |
912 | - `virtualMachineId`: Virtual Machine ID (required)
913 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
914 |
915 | ### VPS_deleteProjectV1
916 |
917 | Completely removes a Docker Compose project from the virtual machine, stopping all containers and cleaning up
918 | associated resources including networks, volumes, and images.
919 |
920 | This operation is irreversible and will delete all project data.
921 |
922 | Use this when you want to permanently remove a project and free up system resources.
923 |
924 | - **Method**: `DELETE`
925 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/down`
926 |
927 | **Parameters**:
928 |
929 | - `virtualMachineId`: Virtual Machine ID (required)
930 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
931 |
932 | ### VPS_getProjectListV1
933 |
934 | Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.
935 |
936 | This endpoint returns basic information about each project including name, status, file path and list of containers with
937 | details about their names, image, status, health and ports. Container stats are omitted in this endpoint.
938 | If you need to get detailed information about container with stats included, use the `Get project containers` endpoint.
939 |
940 | Use this to get an overview of all Docker projects on your VPS instance.
941 |
942 | - **Method**: `GET`
943 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker`
944 |
945 | **Parameters**:
946 |
947 | - `virtualMachineId`: Virtual Machine ID (required)
948 |
949 | ### VPS_createNewProjectV1
950 |
951 | Deploy new project from docker-compose.yaml contents or download contents from URL.
952 |
953 | URL can be Github repository url in format https://github.com/[user]/[repo] and it will be automatically resolved to
954 | docker-compose.yaml file in master branch. Any other URL provided must return docker-compose.yaml file contents.
955 |
956 | If project with the same name already exists, existing project will be replaced.
957 |
958 | - **Method**: `POST`
959 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker`
960 |
961 | **Parameters**:
962 |
963 | - `virtualMachineId`: Virtual Machine ID (required)
964 | - `project_name`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
965 | - `content`: URL pointing to docker-compose.yaml file, Github repository or raw YAML content of the compose file (required)
966 | - `environment`: Project environment variables
967 |
968 | ### VPS_getProjectLogsV1
969 |
970 | Retrieves aggregated log entries from all services within a Docker Compose project.
971 |
972 | This endpoint returns recent log output from each container, organized by service name with timestamps.
973 | The response contains the last 300 log entries across all services.
974 |
975 | Use this for debugging, monitoring application behavior, and troubleshooting issues across your entire project stack.
976 |
977 | - **Method**: `GET`
978 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/logs`
979 |
980 | **Parameters**:
981 |
982 | - `virtualMachineId`: Virtual Machine ID (required)
983 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
984 |
985 | ### VPS_restartProjectV1
986 |
987 | Restarts all services in a Docker Compose project by stopping and starting containers in the correct dependency order.
988 |
989 | This operation preserves data volumes and network configurations while refreshing the running containers.
990 |
991 | Use this to apply configuration changes or recover from service failures.
992 |
993 | - **Method**: `POST`
994 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/restart`
995 |
996 | **Parameters**:
997 |
998 | - `virtualMachineId`: Virtual Machine ID (required)
999 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
1000 |
1001 | ### VPS_startProjectV1
1002 |
1003 | Starts all services in a Docker Compose project that are currently stopped.
1004 |
1005 | This operation brings up containers in the correct dependency order as defined in the compose file.
1006 |
1007 | Use this to resume a project that was previously stopped or to start services after a system reboot.
1008 |
1009 | - **Method**: `POST`
1010 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/start`
1011 |
1012 | **Parameters**:
1013 |
1014 | - `virtualMachineId`: Virtual Machine ID (required)
1015 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
1016 |
1017 | ### VPS_stopProjectV1
1018 |
1019 | Stops all running services in a Docker Compose project while preserving container configurations and data volumes.
1020 |
1021 | This operation gracefully shuts down containers in reverse dependency order.
1022 |
1023 | Use this to temporarily halt a project without removing data or configurations.
1024 |
1025 | - **Method**: `POST`
1026 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/stop`
1027 |
1028 | **Parameters**:
1029 |
1030 | - `virtualMachineId`: Virtual Machine ID (required)
1031 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
1032 |
1033 | ### VPS_updateProjectV1
1034 |
1035 | Updates a Docker Compose project by pulling the latest image versions and recreating containers with new configurations.
1036 |
1037 | This operation preserves data volumes while applying changes from the compose file.
1038 |
1039 | Use this to deploy application updates, apply configuration changes, or refresh container images to their latest versions.
1040 |
1041 | - **Method**: `POST`
1042 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/update`
1043 |
1044 | **Parameters**:
1045 |
1046 | - `virtualMachineId`: Virtual Machine ID (required)
1047 | - `projectName`: Docker Compose project name using alphanumeric characters, dashes, and underscores only (required)
1048 |
1049 | ### VPS_activateFirewallV1
1050 |
1051 | Activate a firewall for a specified virtual machine.
1052 |
1053 | Only one firewall can be active for a virtual machine at a time.
1054 |
1055 | Use this endpoint to apply firewall rules to VPS instances.
1056 |
1057 | - **Method**: `POST`
1058 | - **Path**: `/api/vps/v1/firewall/{firewallId}/activate/{virtualMachineId}`
1059 |
1060 | **Parameters**:
1061 |
1062 | - `firewallId`: Firewall ID (required)
1063 | - `virtualMachineId`: Virtual Machine ID (required)
1064 |
1065 | ### VPS_deactivateFirewallV1
1066 |
1067 | Deactivate a firewall for a specified virtual machine.
1068 |
1069 | Use this endpoint to remove firewall protection from VPS instances.
1070 |
1071 | - **Method**: `POST`
1072 | - **Path**: `/api/vps/v1/firewall/{firewallId}/deactivate/{virtualMachineId}`
1073 |
1074 | **Parameters**:
1075 |
1076 | - `firewallId`: Firewall ID (required)
1077 | - `virtualMachineId`: Virtual Machine ID (required)
1078 |
1079 | ### VPS_getFirewallDetailsV1
1080 |
1081 | Retrieve firewall by its ID and rules associated with it.
1082 |
1083 | Use this endpoint to view specific firewall configuration and rules.
1084 |
1085 | - **Method**: `GET`
1086 | - **Path**: `/api/vps/v1/firewall/{firewallId}`
1087 |
1088 | **Parameters**:
1089 |
1090 | - `firewallId`: Firewall ID (required)
1091 |
1092 | ### VPS_deleteFirewallV1
1093 |
1094 | Delete a specified firewall.
1095 |
1096 | Any virtual machine that has this firewall activated will automatically have it deactivated.
1097 |
1098 | Use this endpoint to remove unused firewall configurations.
1099 |
1100 | - **Method**: `DELETE`
1101 | - **Path**: `/api/vps/v1/firewall/{firewallId}`
1102 |
1103 | **Parameters**:
1104 |
1105 | - `firewallId`: Firewall ID (required)
1106 |
1107 | ### VPS_getFirewallListV1
1108 |
1109 | Retrieve all available firewalls.
1110 |
1111 | Use this endpoint to view existing firewall configurations.
1112 |
1113 | - **Method**: `GET`
1114 | - **Path**: `/api/vps/v1/firewall`
1115 |
1116 | **Parameters**:
1117 |
1118 | - `page`: Page number
1119 |
1120 | ### VPS_createNewFirewallV1
1121 |
1122 | Create a new firewall.
1123 |
1124 | Use this endpoint to set up new firewall configurations for VPS security.
1125 |
1126 | - **Method**: `POST`
1127 | - **Path**: `/api/vps/v1/firewall`
1128 |
1129 | **Parameters**:
1130 |
1131 | - `name`: name parameter (required)
1132 |
1133 | ### VPS_updateFirewallRuleV1
1134 |
1135 | Update a specific firewall rule from a specified firewall.
1136 |
1137 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1138 |
1139 | Use this endpoint to modify existing firewall rules.
1140 |
1141 | - **Method**: `PUT`
1142 | - **Path**: `/api/vps/v1/firewall/{firewallId}/rules/{ruleId}`
1143 |
1144 | **Parameters**:
1145 |
1146 | - `firewallId`: Firewall ID (required)
1147 | - `ruleId`: Firewall Rule ID (required)
1148 | - `protocol`: protocol parameter (required)
1149 | - `port`: Port or port range, ex: 1024:2048 (required)
1150 | - `source`: source parameter (required)
1151 | - `source_detail`: IP range, CIDR, single IP or `any` (required)
1152 |
1153 | ### VPS_deleteFirewallRuleV1
1154 |
1155 | Delete a specific firewall rule from a specified firewall.
1156 |
1157 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1158 |
1159 | Use this endpoint to remove specific firewall rules.
1160 |
1161 | - **Method**: `DELETE`
1162 | - **Path**: `/api/vps/v1/firewall/{firewallId}/rules/{ruleId}`
1163 |
1164 | **Parameters**:
1165 |
1166 | - `firewallId`: Firewall ID (required)
1167 | - `ruleId`: Firewall Rule ID (required)
1168 |
1169 | ### VPS_createFirewallRuleV1
1170 |
1171 | Create new firewall rule for a specified firewall.
1172 |
1173 | By default, the firewall drops all incoming traffic, which means you must add accept rules for all ports you want to use.
1174 |
1175 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1176 |
1177 | Use this endpoint to add new security rules to firewalls.
1178 |
1179 | - **Method**: `POST`
1180 | - **Path**: `/api/vps/v1/firewall/{firewallId}/rules`
1181 |
1182 | **Parameters**:
1183 |
1184 | - `firewallId`: Firewall ID (required)
1185 | - `protocol`: protocol parameter (required)
1186 | - `port`: Port or port range, ex: 1024:2048 (required)
1187 | - `source`: source parameter (required)
1188 | - `source_detail`: IP range, CIDR, single IP or `any` (required)
1189 |
1190 | ### VPS_syncFirewallV1
1191 |
1192 | Sync a firewall for a specified virtual machine.
1193 |
1194 | Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated.
1195 |
1196 | Use this endpoint to apply updated firewall rules to VPS instances.
1197 |
1198 | - **Method**: `POST`
1199 | - **Path**: `/api/vps/v1/firewall/{firewallId}/sync/{virtualMachineId}`
1200 |
1201 | **Parameters**:
1202 |
1203 | - `firewallId`: Firewall ID (required)
1204 | - `virtualMachineId`: Virtual Machine ID (required)
1205 |
1206 | ### VPS_getPostInstallScriptV1
1207 |
1208 | Retrieve post-install script by its ID.
1209 |
1210 | Use this endpoint to view specific automation script details.
1211 |
1212 | - **Method**: `GET`
1213 | - **Path**: `/api/vps/v1/post-install-scripts/{postInstallScriptId}`
1214 |
1215 | **Parameters**:
1216 |
1217 | - `postInstallScriptId`: Post-install script ID (required)
1218 |
1219 | ### VPS_updatePostInstallScriptV1
1220 |
1221 | Update a specific post-install script.
1222 |
1223 | Use this endpoint to modify existing automation scripts.
1224 |
1225 | - **Method**: `PUT`
1226 | - **Path**: `/api/vps/v1/post-install-scripts/{postInstallScriptId}`
1227 |
1228 | **Parameters**:
1229 |
1230 | - `postInstallScriptId`: Post-install script ID (required)
1231 | - `name`: Name of the script (required)
1232 | - `content`: Content of the script (required)
1233 |
1234 | ### VPS_deletePostInstallScriptV1
1235 |
1236 | Delete a post-install script from your account.
1237 |
1238 | Use this endpoint to remove unused automation scripts.
1239 |
1240 | - **Method**: `DELETE`
1241 | - **Path**: `/api/vps/v1/post-install-scripts/{postInstallScriptId}`
1242 |
1243 | **Parameters**:
1244 |
1245 | - `postInstallScriptId`: Post-install script ID (required)
1246 |
1247 | ### VPS_getPostInstallScriptsV1
1248 |
1249 | Retrieve post-install scripts associated with your account.
1250 |
1251 | Use this endpoint to view available automation scripts for VPS deployment.
1252 |
1253 | - **Method**: `GET`
1254 | - **Path**: `/api/vps/v1/post-install-scripts`
1255 |
1256 | **Parameters**:
1257 |
1258 | - `page`: Page number
1259 |
1260 | ### VPS_createPostInstallScriptV1
1261 |
1262 | Add a new post-install script to your account, which can then be used after virtual machine installation.
1263 |
1264 | The script contents will be saved to the file `/post_install` with executable attribute set and will be executed once virtual machine is installed.
1265 | The output of the script will be redirected to `/post_install.log`. Maximum script size is 48KB.
1266 |
1267 | Use this endpoint to create automation scripts for VPS setup tasks.
1268 |
1269 | - **Method**: `POST`
1270 | - **Path**: `/api/vps/v1/post-install-scripts`
1271 |
1272 | **Parameters**:
1273 |
1274 | - `name`: Name of the script (required)
1275 | - `content`: Content of the script (required)
1276 |
1277 | ### VPS_attachPublicKeyV1
1278 |
1279 | Attach existing public keys from your account to a specified virtual machine.
1280 |
1281 | Multiple keys can be attached to a single virtual machine.
1282 |
1283 | Use this endpoint to enable SSH key authentication for VPS instances.
1284 |
1285 | - **Method**: `POST`
1286 | - **Path**: `/api/vps/v1/public-keys/attach/{virtualMachineId}`
1287 |
1288 | **Parameters**:
1289 |
1290 | - `virtualMachineId`: Virtual Machine ID (required)
1291 | - `ids`: Public Key IDs to attach (required)
1292 |
1293 | ### VPS_deletePublicKeyV1
1294 |
1295 | Delete a public key from your account.
1296 |
1297 | **Deleting public key from account does not remove it from virtual machine**
1298 |
1299 | Use this endpoint to remove unused SSH keys from account.
1300 |
1301 | - **Method**: `DELETE`
1302 | - **Path**: `/api/vps/v1/public-keys/{publicKeyId}`
1303 |
1304 | **Parameters**:
1305 |
1306 | - `publicKeyId`: Public Key ID (required)
1307 |
1308 | ### VPS_getPublicKeysV1
1309 |
1310 | Retrieve public keys associated with your account.
1311 |
1312 | Use this endpoint to view available SSH keys for VPS authentication.
1313 |
1314 | - **Method**: `GET`
1315 | - **Path**: `/api/vps/v1/public-keys`
1316 |
1317 | **Parameters**:
1318 |
1319 | - `page`: Page number
1320 |
1321 | ### VPS_createPublicKeyV1
1322 |
1323 | Add a new public key to your account.
1324 |
1325 | Use this endpoint to register SSH keys for VPS authentication.
1326 |
1327 | - **Method**: `POST`
1328 | - **Path**: `/api/vps/v1/public-keys`
1329 |
1330 | **Parameters**:
1331 |
1332 | - `name`: name parameter (required)
1333 | - `key`: key parameter (required)
1334 |
1335 | ### VPS_getTemplateDetailsV1
1336 |
1337 | Retrieve detailed information about a specific OS template for virtual machines.
1338 |
1339 | Use this endpoint to view specific template specifications before deployment.
1340 |
1341 | - **Method**: `GET`
1342 | - **Path**: `/api/vps/v1/templates/{templateId}`
1343 |
1344 | **Parameters**:
1345 |
1346 | - `templateId`: Template ID (required)
1347 |
1348 | ### VPS_getTemplatesV1
1349 |
1350 | Retrieve available OS templates for virtual machines.
1351 |
1352 | Use this endpoint to view operating system options before creating or recreating VPS instances.
1353 |
1354 | - **Method**: `GET`
1355 | - **Path**: `/api/vps/v1/templates`
1356 |
1357 |
1358 |
1359 | ### VPS_getActionDetailsV1
1360 |
1361 | Retrieve detailed information about a specific action performed on a specified virtual machine.
1362 |
1363 | Use this endpoint to monitor specific VPS operation status and details.
1364 |
1365 | - **Method**: `GET`
1366 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/actions/{actionId}`
1367 |
1368 | **Parameters**:
1369 |
1370 | - `virtualMachineId`: Virtual Machine ID (required)
1371 | - `actionId`: Action ID (required)
1372 |
1373 | ### VPS_getActionsV1
1374 |
1375 | Retrieve actions performed on a specified virtual machine.
1376 |
1377 | Actions are operations or events that have been executed on the virtual machine, such as starting, stopping, or modifying
1378 | the machine. This endpoint allows you to view the history of these actions, providing details about each action,
1379 | such as the action name, timestamp, and status.
1380 |
1381 | Use this endpoint to view VPS operation history and troubleshoot issues.
1382 |
1383 | - **Method**: `GET`
1384 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/actions`
1385 |
1386 | **Parameters**:
1387 |
1388 | - `virtualMachineId`: Virtual Machine ID (required)
1389 | - `page`: Page number
1390 |
1391 | ### VPS_getAttachedPublicKeysV1
1392 |
1393 | Retrieve public keys attached to a specified virtual machine.
1394 |
1395 | Use this endpoint to view SSH keys configured for specific VPS instances.
1396 |
1397 | - **Method**: `GET`
1398 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/public-keys`
1399 |
1400 | **Parameters**:
1401 |
1402 | - `virtualMachineId`: Virtual Machine ID (required)
1403 | - `page`: Page number
1404 |
1405 | ### VPS_getBackupsV1
1406 |
1407 | Retrieve backups for a specified virtual machine.
1408 |
1409 | Use this endpoint to view available backup points for VPS data recovery.
1410 |
1411 | - **Method**: `GET`
1412 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/backups`
1413 |
1414 | **Parameters**:
1415 |
1416 | - `virtualMachineId`: Virtual Machine ID (required)
1417 | - `page`: Page number
1418 |
1419 | ### VPS_restoreBackupV1
1420 |
1421 | Restore a backup for a specified virtual machine.
1422 |
1423 | The system will then initiate the restore process, which may take some time depending on the size of the backup.
1424 |
1425 | **All data on the virtual machine will be overwritten with the data from the backup.**
1426 |
1427 | Use this endpoint to recover VPS data from backup points.
1428 |
1429 | - **Method**: `POST`
1430 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/backups/{backupId}/restore`
1431 |
1432 | **Parameters**:
1433 |
1434 | - `virtualMachineId`: Virtual Machine ID (required)
1435 | - `backupId`: Backup ID (required)
1436 |
1437 | ### VPS_setHostnameV1
1438 |
1439 | Set hostname for a specified virtual machine.
1440 |
1441 | Changing hostname does not update PTR record automatically.
1442 | If you want your virtual machine to be reachable by a hostname,
1443 | you need to point your domain A/AAAA records to virtual machine IP as well.
1444 |
1445 | Use this endpoint to configure custom hostnames for VPS instances.
1446 |
1447 | - **Method**: `PUT`
1448 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/hostname`
1449 |
1450 | **Parameters**:
1451 |
1452 | - `virtualMachineId`: Virtual Machine ID (required)
1453 | - `hostname`: hostname parameter (required)
1454 |
1455 | ### VPS_resetHostnameV1
1456 |
1457 | Reset hostname and PTR record of a specified virtual machine to default value.
1458 |
1459 | Use this endpoint to restore default hostname configuration for VPS instances.
1460 |
1461 | - **Method**: `DELETE`
1462 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/hostname`
1463 |
1464 | **Parameters**:
1465 |
1466 | - `virtualMachineId`: Virtual Machine ID (required)
1467 |
1468 | ### VPS_getVirtualMachineDetailsV1
1469 |
1470 | Retrieve detailed information about a specified virtual machine.
1471 |
1472 | Use this endpoint to view comprehensive VPS configuration and status.
1473 |
1474 | - **Method**: `GET`
1475 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}`
1476 |
1477 | **Parameters**:
1478 |
1479 | - `virtualMachineId`: Virtual Machine ID (required)
1480 |
1481 | ### VPS_getVirtualMachinesV1
1482 |
1483 | Retrieve all available virtual machines.
1484 |
1485 | Use this endpoint to view available VPS instances.
1486 |
1487 | - **Method**: `GET`
1488 | - **Path**: `/api/vps/v1/virtual-machines`
1489 |
1490 |
1491 |
1492 | ### VPS_purchaseNewVirtualMachineV1
1493 |
1494 | Purchase and setup a new virtual machine.
1495 |
1496 | If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.
1497 |
1498 | If no payment method is provided, your default payment method will be used automatically.
1499 |
1500 | Use this endpoint to create new VPS instances.
1501 |
1502 | - **Method**: `POST`
1503 | - **Path**: `/api/vps/v1/virtual-machines`
1504 |
1505 | **Parameters**:
1506 |
1507 | - `item_id`: Catalog price item ID (required)
1508 | - `payment_method_id`: Payment method ID, default will be used if not provided
1509 | - `setup`: setup parameter (required)
1510 | - `coupons`: Discount coupon codes
1511 |
1512 | ### VPS_getScanMetricsV1
1513 |
1514 | Retrieve scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.
1515 |
1516 | The scan metrics provide detailed information about malware scans performed by Monarx, including number of scans,
1517 | detected threats, and other relevant statistics. This information is useful for monitoring security status of the
1518 | virtual machine and assessing effectiveness of the malware scanner.
1519 |
1520 | Use this endpoint to monitor VPS security scan results and threat detection.
1521 |
1522 | - **Method**: `GET`
1523 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/monarx`
1524 |
1525 | **Parameters**:
1526 |
1527 | - `virtualMachineId`: Virtual Machine ID (required)
1528 |
1529 | ### VPS_installMonarxV1
1530 |
1531 | Install the Monarx malware scanner on a specified virtual machine.
1532 |
1533 | [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines.
1534 | By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.
1535 |
1536 | Use this endpoint to enable malware protection on VPS instances.
1537 |
1538 | - **Method**: `POST`
1539 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/monarx`
1540 |
1541 | **Parameters**:
1542 |
1543 | - `virtualMachineId`: Virtual Machine ID (required)
1544 |
1545 | ### VPS_uninstallMonarxV1
1546 |
1547 | Uninstall the Monarx malware scanner on a specified virtual machine.
1548 |
1549 | If Monarx is not installed, the request will still be processed without any effect.
1550 |
1551 | Use this endpoint to remove malware scanner from VPS instances.
1552 |
1553 | - **Method**: `DELETE`
1554 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/monarx`
1555 |
1556 | **Parameters**:
1557 |
1558 | - `virtualMachineId`: Virtual Machine ID (required)
1559 |
1560 | ### VPS_getMetricsV1
1561 |
1562 | Retrieve historical metrics for a specified virtual machine.
1563 |
1564 | It includes the following metrics:
1565 | - CPU usage
1566 | - Memory usage
1567 | - Disk usage
1568 | - Network usage
1569 | - Uptime
1570 |
1571 | Use this endpoint to monitor VPS performance and resource utilization over time.
1572 |
1573 | - **Method**: `GET`
1574 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/metrics`
1575 |
1576 | **Parameters**:
1577 |
1578 | - `virtualMachineId`: Virtual Machine ID (required)
1579 | - `date_from`: date_from parameter (required)
1580 | - `date_to`: date_to parameter (required)
1581 |
1582 | ### VPS_setNameserversV1
1583 |
1584 | Set nameservers for a specified virtual machine.
1585 |
1586 | Be aware, that improper nameserver configuration can lead to the virtual machine being unable to resolve domain names.
1587 |
1588 | Use this endpoint to configure custom DNS resolvers for VPS instances.
1589 |
1590 | - **Method**: `PUT`
1591 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/nameservers`
1592 |
1593 | **Parameters**:
1594 |
1595 | - `virtualMachineId`: Virtual Machine ID (required)
1596 | - `ns1`: ns1 parameter (required)
1597 | - `ns2`: ns2 parameter
1598 | - `ns3`: ns3 parameter
1599 |
1600 | ### VPS_createPTRRecordV1
1601 |
1602 | Create or update a PTR (Pointer) record for a specified virtual machine.
1603 |
1604 | Use this endpoint to configure reverse DNS lookup for VPS IP addresses.
1605 |
1606 | - **Method**: `POST`
1607 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/ptr/{ipAddressId}`
1608 |
1609 | **Parameters**:
1610 |
1611 | - `virtualMachineId`: Virtual Machine ID (required)
1612 | - `ipAddressId`: IP Address ID (required)
1613 | - `domain`: Pointer record domain (required)
1614 |
1615 | ### VPS_deletePTRRecordV1
1616 |
1617 | Delete a PTR (Pointer) record for a specified virtual machine.
1618 |
1619 | Once deleted, reverse DNS lookups to the virtual machine's IP address will no longer return the previously configured hostname.
1620 |
1621 | Use this endpoint to remove reverse DNS configuration from VPS instances.
1622 |
1623 | - **Method**: `DELETE`
1624 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/ptr/{ipAddressId}`
1625 |
1626 | **Parameters**:
1627 |
1628 | - `virtualMachineId`: Virtual Machine ID (required)
1629 | - `ipAddressId`: IP Address ID (required)
1630 |
1631 | ### VPS_setPanelPasswordV1
1632 |
1633 | Set panel password for a specified virtual machine.
1634 |
1635 | If virtual machine does not use panel OS, the request will still be processed without any effect.
1636 | Requirements for password are same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
1637 |
1638 | Use this endpoint to configure control panel access credentials for VPS instances.
1639 |
1640 | - **Method**: `PUT`
1641 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/panel-password`
1642 |
1643 | **Parameters**:
1644 |
1645 | - `virtualMachineId`: Virtual Machine ID (required)
1646 | - `password`: Panel password for the virtual machine (required)
1647 |
1648 | ### VPS_startRecoveryModeV1
1649 |
1650 | Initiate recovery mode for a specified virtual machine.
1651 |
1652 | Recovery mode is a special state that allows users to perform system rescue operations,
1653 | such as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine
1654 | from booting normally.
1655 |
1656 | Virtual machine will boot recovery disk image and original disk image will be mounted in `/mnt` directory.
1657 |
1658 | Use this endpoint to enable system rescue operations on VPS instances.
1659 |
1660 | - **Method**: `POST`
1661 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/recovery`
1662 |
1663 | **Parameters**:
1664 |
1665 | - `virtualMachineId`: Virtual Machine ID (required)
1666 | - `root_password`: Temporary root password for recovery mode (required)
1667 |
1668 | ### VPS_stopRecoveryModeV1
1669 |
1670 | Stop recovery mode for a specified virtual machine.
1671 |
1672 | If virtual machine is not in recovery mode, this operation will fail.
1673 |
1674 | Use this endpoint to exit system rescue mode and return VPS to normal operation.
1675 |
1676 | - **Method**: `DELETE`
1677 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/recovery`
1678 |
1679 | **Parameters**:
1680 |
1681 | - `virtualMachineId`: Virtual Machine ID (required)
1682 |
1683 | ### VPS_recreateVirtualMachineV1
1684 |
1685 | Recreate a virtual machine from scratch.
1686 |
1687 | The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state.
1688 | Snapshots, if there are any, will be deleted.
1689 |
1690 | ## Password Requirements
1691 | Password will be checked against leaked password databases.
1692 | Requirements for the password are:
1693 | - At least 8 characters long
1694 | - At least one uppercase letter
1695 | - At least one lowercase letter
1696 | - At least one number
1697 | - Is not leaked publicly
1698 |
1699 | **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
1700 |
1701 | Use this endpoint to completely rebuild VPS instances with fresh OS installation.
1702 |
1703 | - **Method**: `POST`
1704 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/recreate`
1705 |
1706 | **Parameters**:
1707 |
1708 | - `virtualMachineId`: Virtual Machine ID (required)
1709 | - `template_id`: Template ID (required)
1710 | - `password`: Root password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.
1711 | - `panel_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.
1712 | - `post_install_script_id`: Post-install script to execute after virtual machine was recreated
1713 |
1714 | ### VPS_restartVirtualMachineV1
1715 |
1716 | Restart a specified virtual machine by fully stopping and starting it.
1717 |
1718 | If the virtual machine was stopped, it will be started.
1719 |
1720 | Use this endpoint to reboot VPS instances.
1721 |
1722 | - **Method**: `POST`
1723 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/restart`
1724 |
1725 | **Parameters**:
1726 |
1727 | - `virtualMachineId`: Virtual Machine ID (required)
1728 |
1729 | ### VPS_setRootPasswordV1
1730 |
1731 | Set root password for a specified virtual machine.
1732 |
1733 | Requirements for password are same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
1734 |
1735 | Use this endpoint to update administrator credentials for VPS instances.
1736 |
1737 | - **Method**: `PUT`
1738 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/root-password`
1739 |
1740 | **Parameters**:
1741 |
1742 | - `virtualMachineId`: Virtual Machine ID (required)
1743 | - `password`: Root password for the virtual machine (required)
1744 |
1745 | ### VPS_setupPurchasedVirtualMachineV1
1746 |
1747 | Setup newly purchased virtual machine with `initial` state.
1748 |
1749 | Use this endpoint to configure and initialize purchased VPS instances.
1750 |
1751 | - **Method**: `POST`
1752 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/setup`
1753 |
1754 | **Parameters**:
1755 |
1756 | - `virtualMachineId`: Virtual Machine ID (required)
1757 | - `template_id`: Template ID (required)
1758 | - `data_center_id`: Data center ID (required)
1759 | - `post_install_script_id`: Post-install script ID
1760 | - `password`: Password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.
1761 | - `hostname`: Override default hostname of the virtual machine
1762 | - `install_monarx`: Install Monarx malware scanner (if supported)
1763 | - `enable_backups`: Enable weekly backup schedule
1764 | - `ns1`: Name server 1
1765 | - `ns2`: Name server 2
1766 | - `public_key`: Use SSH key
1767 |
1768 | ### VPS_getSnapshotV1
1769 |
1770 | Retrieve snapshot for a specified virtual machine.
1771 |
1772 | Use this endpoint to view current VPS snapshot information.
1773 |
1774 | - **Method**: `GET`
1775 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot`
1776 |
1777 | **Parameters**:
1778 |
1779 | - `virtualMachineId`: Virtual Machine ID (required)
1780 |
1781 | ### VPS_createSnapshotV1
1782 |
1783 | Create a snapshot of a specified virtual machine.
1784 |
1785 | A snapshot captures the state and data of the virtual machine at a specific point in time,
1786 | allowing users to restore the virtual machine to that state if needed.
1787 | This operation is useful for backup purposes, system recovery,
1788 | and testing changes without affecting the current state of the virtual machine.
1789 |
1790 | **Creating new snapshot will overwrite the existing snapshot!**
1791 |
1792 | Use this endpoint to capture VPS state for backup and recovery purposes.
1793 |
1794 | - **Method**: `POST`
1795 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot`
1796 |
1797 | **Parameters**:
1798 |
1799 | - `virtualMachineId`: Virtual Machine ID (required)
1800 |
1801 | ### VPS_deleteSnapshotV1
1802 |
1803 | Delete a snapshot of a specified virtual machine.
1804 |
1805 | Use this endpoint to remove VPS snapshots.
1806 |
1807 | - **Method**: `DELETE`
1808 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot`
1809 |
1810 | **Parameters**:
1811 |
1812 | - `virtualMachineId`: Virtual Machine ID (required)
1813 |
1814 | ### VPS_restoreSnapshotV1
1815 |
1816 | Restore a specified virtual machine to a previous state using a snapshot.
1817 |
1818 | Restoring from a snapshot allows users to revert the virtual machine to that state, which is useful for system recovery, undoing changes, or testing.
1819 |
1820 | Use this endpoint to revert VPS instances to previous saved states.
1821 |
1822 | - **Method**: `POST`
1823 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/snapshot/restore`
1824 |
1825 | **Parameters**:
1826 |
1827 | - `virtualMachineId`: Virtual Machine ID (required)
1828 |
1829 | ### VPS_startVirtualMachineV1
1830 |
1831 | Start a specified virtual machine.
1832 |
1833 | If the virtual machine is already running, the request will still be processed without any effect.
1834 |
1835 | Use this endpoint to power on stopped VPS instances.
1836 |
1837 | - **Method**: `POST`
1838 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/start`
1839 |
1840 | **Parameters**:
1841 |
1842 | - `virtualMachineId`: Virtual Machine ID (required)
1843 |
1844 | ### VPS_stopVirtualMachineV1
1845 |
1846 | Stop a specified virtual machine.
1847 |
1848 | If the virtual machine is already stopped, the request will still be processed without any effect.
1849 |
1850 | Use this endpoint to power off running VPS instances.
1851 |
1852 | - **Method**: `POST`
1853 | - **Path**: `/api/vps/v1/virtual-machines/{virtualMachineId}/stop`
1854 |
1855 | **Parameters**:
1856 |
1857 | - `virtualMachineId`: Virtual Machine ID (required)
1858 |
```
--------------------------------------------------------------------------------
/glama.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "$schema": "https://glama.ai/mcp/schemas/server.json",
3 | "maintainers": [
4 | "algirdasci",
5 | "fizikiukas"
6 | ]
7 | }
```
--------------------------------------------------------------------------------
/Dockerfile:
--------------------------------------------------------------------------------
```dockerfile
1 | FROM node:24.4.1-alpine
2 |
3 | WORKDIR /app
4 |
5 | COPY package.json package-lock.json* ./
6 |
7 | RUN npm ci --only=production
8 |
9 | COPY . .
10 |
11 | ENV NODE_ENV=production
12 |
13 | RUN chmod +x server.js
14 |
15 | CMD ["node", "server.js"]
16 |
```
--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "compilerOptions": {
3 | "target": "es2022",
4 | "module": "esnext",
5 | "moduleResolution": "node",
6 | "esModuleInterop": true,
7 | "strict": true,
8 | "skipLibCheck": true,
9 | "forceConsistentCasingInFileNames": true,
10 | "outDir": "dist"
11 | },
12 | "include": ["*.ts", "*.js"],
13 | "exclude": ["node_modules"]
14 | }
15 |
```
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
```markdown
1 | ---
2 | name: Bug Report
3 | about: Create a report to help us improve
4 | title: '[BUG] '
5 | labels: 'bug'
6 | assignees: ''
7 |
8 | ---
9 |
10 | ## Bug Description
11 | <!-- Provide a clear and concise description of what the bug is -->
12 |
13 | ## Steps to Reproduce
14 | <!-- List the steps to reproduce the behavior -->
15 | 1. Go to '...'
16 | 2. Click on '...'
17 | 3. Scroll down to '...'
18 | 4. See error
19 |
20 | ## Expected Behavior
21 | <!-- Describe what you expected to happen -->
22 |
23 | ## Actual Behavior
24 | <!-- Describe what actually happened -->
25 |
26 | ## Screenshots
27 | <!-- If applicable, add screenshots to help explain your problem -->
28 |
29 | ## Error Messages / Stack Trace
30 | <!-- If applicable, paste any error messages or stack traces here -->
31 | ```
32 | [Paste error message or stack trace here]
33 | ```
34 |
35 | ## Additional Context
36 | <!-- Add any other context about the problem here -->
37 |
```
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
```json
1 | {
2 | "name": "hostinger-api-mcp",
3 | "version": "0.1.14",
4 | "description": "MCP server for Hostinger API",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/hostinger/api-mcp-server.git"
8 | },
9 | "license": "MIT",
10 | "keywords": [
11 | "hostinger",
12 | "mcp",
13 | "server",
14 | "rest",
15 | "api"
16 | ],
17 | "type": "module",
18 | "main": "server.js",
19 | "bin": {
20 | "hostinger-api-mcp": "./server.js"
21 | },
22 | "scripts": {
23 | "start": "node server.js",
24 | "build": "node build.js",
25 | "start:ts": "npx tsc && node dist/server.js"
26 | },
27 | "dependencies": {
28 | "@modelcontextprotocol/sdk": "^1.10.0",
29 | "axios": "^1.8.0",
30 | "cors": "^2.8.5",
31 | "dotenv": "^16.4.7",
32 | "express": "^4.21.2",
33 | "minimist": "^1.2.8",
34 | "tus-js-client": "^4.1.0"
35 | },
36 | "devDependencies": {
37 | "@types/node": "^24.0.0",
38 | "@types/express": "^5.0.0",
39 | "@types/cors": "^2.8.17",
40 | "@types/minimist": "^1.2.5",
41 | "typescript": "^5.7.2"
42 | },
43 | "engines": {
44 | "node": ">=20.0.0"
45 | }
46 | }
```
--------------------------------------------------------------------------------
/build.js:
--------------------------------------------------------------------------------
```javascript
1 | #!/usr/bin/env node
2 |
3 | import { exec } from 'child_process';
4 | import fs from 'fs';
5 | import path from 'path';
6 | import { fileURLToPath } from 'url';
7 |
8 | // Get proper paths for ES modules
9 | const __filename = fileURLToPath(import.meta.url);
10 | const __dirname = path.dirname(__filename);
11 |
12 | // Ensure dist directory exists
13 | if (!fs.existsSync('./dist')) {
14 | fs.mkdirSync('./dist');
15 | }
16 |
17 | // Run TypeScript compiler
18 | console.log('Compiling TypeScript...');
19 | exec('npx tsc', (error, stdout, stderr) => {
20 | if (error) {
21 | console.error('Error compiling TypeScript:', error);
22 | console.error(stderr);
23 | process.exit(1);
24 | }
25 |
26 | if (stdout) {
27 | console.log(stdout);
28 | }
29 |
30 | console.log('TypeScript compilation successful');
31 |
32 | // Copy .env.example to dist
33 | try {
34 | if (fs.existsSync('./.env.example')) {
35 | fs.copyFileSync('./.env.example', './dist/.env.example');
36 | console.log('Copied .env.example to dist directory');
37 | }
38 |
39 | if (fs.existsSync('./README.md')) {
40 | fs.copyFileSync('./README.md', './dist/README.md');
41 | console.log('Copied README.md to dist directory');
42 | }
43 |
44 | // Create package.json in dist
45 | const packageJson = JSON.parse(fs.readFileSync('./package.json', 'utf8'));
46 | packageJson.main = 'server.js';
47 | fs.writeFileSync('./dist/package.json', JSON.stringify(packageJson, null, 2));
48 | console.log('Created package.json in dist directory');
49 |
50 | console.log('Build completed successfully');
51 | } catch (err) {
52 | console.error('Error copying files:', err);
53 | process.exit(1);
54 | }
55 | });
56 |
```
--------------------------------------------------------------------------------
/.github/workflows/build-release.yaml:
--------------------------------------------------------------------------------
```yaml
1 | name: build-release
2 |
3 | on:
4 | push:
5 | branches:
6 | - main
7 |
8 | jobs:
9 | release:
10 | runs-on: ubuntu-latest
11 | steps:
12 | - name: Repo checkout
13 | uses: actions/checkout@v4
14 |
15 | - name: Bump version and push tag
16 | id: bump
17 | uses: mathieudutour/[email protected]
18 | with:
19 | github_token: ${{ secrets.GITHUB_TOKEN }}
20 | release_branches: main
21 |
22 | - name: Release tag
23 | uses: ncipollo/release-action@v1
24 | with:
25 | tag: ${{ steps.bump.outputs.new_tag }}
26 | generateReleaseNotes: true
27 |
28 | publish-npmjs:
29 | runs-on: ubuntu-latest
30 | needs: [release]
31 | permissions:
32 | contents: read
33 | id-token: write
34 | steps:
35 | - uses: actions/checkout@v4
36 |
37 | - uses: actions/setup-node@v4
38 | with:
39 | node-version: '24.x'
40 | registry-url: 'https://registry.npmjs.org'
41 |
42 | - name: Update NPM
43 | run: npm install -g npm@latest
44 |
45 | - name: Install dependencies
46 | run: npm install
47 |
48 | - name: Publish package
49 | run: npm publish --provenance --access public
50 |
51 | release-github:
52 | runs-on: ubuntu-latest
53 | needs: [release]
54 | permissions:
55 | contents: read
56 | id-token: write
57 | packages: write
58 | steps:
59 | - uses: actions/checkout@v4
60 |
61 | - uses: actions/setup-node@v4
62 | with:
63 | node-version: '24.x'
64 | registry-url: 'https://npm.pkg.github.com'
65 | scope: '@hostinger'
66 |
67 | - name: Install dependencies
68 | run: npm install
69 |
70 | - name: Publish package
71 | run: |
72 | sed -i 's+"name": ".*+"name": "@${{ github.repository }}",+gI' ./package.json
73 | npm publish --provenance --access public
74 | env:
75 | NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76 |
```
--------------------------------------------------------------------------------
/types.d.ts:
--------------------------------------------------------------------------------
```typescript
1 | /**
2 | * Type definitions for the API endpoints
3 | * Auto-generated from OpenAPI specification
4 | */
5 |
6 | export interface APITools {
7 | /**
8 | * Import a WordPress website from an archive file to a hosting server. This tool uploads a website archive (zip, tar, tar.gz, etc.) and a database dump (.sql file) to deploy a complete WordPress website. The archive will be extracted on the server automatically. Note: This process may take a while for larger sites. After upload completion, files are being extracted and the site will be available in a few minutes. The username will be automatically resolved from the domain.
9 | */
10 | "hosting_importWordpressWebsite": {
11 | params: {
12 | /**
13 | * Domain name associated with the hosting account (e.g., example.com)
14 | */
15 | domain: string;
16 | /**
17 | * Absolute or relative path to the website archive file. Supported formats: zip, tar, tar.gz, tgz, 7z, gz, gzip. If user provides directory path, create archive from it before proceeding using EXACTLY this naming pattern: directoryname_YYYYMMDD_HHMMSS.zip (e.g., mywebsite_20250115_143022.zip)
18 | */
19 | archivePath: string;
20 | /**
21 | * Absolute or relative path to a database dump file (.sql)
22 | */
23 | databaseDump: string;
24 | };
25 | response: any; // Response structure will depend on the API
26 | };
27 |
28 | /**
29 | * Deploy a WordPress plugin from a directory to a hosting server. This tool uploads all plugin files and triggers plugin deployment.
30 | */
31 | "hosting_deployWordpressPlugin": {
32 | params: {
33 | /**
34 | * Domain name associated with the hosting account (e.g., example.com)
35 | */
36 | domain: string;
37 | /**
38 | * WordPress plugin slug (e.g., omnisend)
39 | */
40 | slug: string;
41 | /**
42 | * Absolute or relative path to the plugin directory containing all plugin files
43 | */
44 | pluginPath: string;
45 | };
46 | response: any; // Response structure will depend on the API
47 | };
48 |
49 | /**
50 | * Deploy a WordPress theme from a directory to a hosting server. This tool uploads all theme files and triggers theme deployment. The uploaded theme can optionally be activated after deployment.
51 | */
52 | "hosting_deployWordpressTheme": {
53 | params: {
54 | /**
55 | * Domain name associated with the hosting account (e.g., example.com)
56 | */
57 | domain: string;
58 | /**
59 | * WordPress theme slug (e.g., twentytwentyfive)
60 | */
61 | slug: string;
62 | /**
63 | * Absolute or relative path to the theme directory containing all theme files
64 | */
65 | themePath: string;
66 | /**
67 | * Whether to activate the theme after deployment (default: false)
68 | */
69 | activate?: boolean;
70 | };
71 | response: any; // Response structure will depend on the API
72 | };
73 |
74 | /**
75 | * Retrieve catalog items available for order.
76 |
77 | Prices in catalog items is displayed as cents (without floating point), e.g: float `17.99` is displayed as integer `1799`.
78 |
79 | Use this endpoint to view available services and pricing before placing orders.
80 | */
81 | "billing_getCatalogItemListV1": {
82 | params: {
83 | /**
84 | * Filter catalog items by category
85 | */
86 | category?: string;
87 | /**
88 | * Filter catalog items by name. Use `*` for wildcard search, e.g. `.COM*` to find .com domain
89 | */
90 | name?: string;
91 | };
92 | response: any; // Response structure will depend on the API
93 | };
94 |
95 | /**
96 | * Create a new service order.
97 |
98 | **DEPRECATED**
99 |
100 | To purchase a domain, use [`POST /api/domains/v1/portfolio`](/#tag/domains-portfolio/POST/api/domains/v1/portfolio) instead.
101 |
102 | To purchase a VPS, use [`POST /api/vps/v1/virtual-machines`](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines) instead.
103 |
104 |
105 | To place order, you need to provide payment method ID and list of price items from the catalog endpoint together with quantity.
106 | Coupons also can be provided during order creation.
107 |
108 | Orders created using this endpoint will be set for automatic renewal.
109 |
110 | Some `credit_card` payments might need additional verification, rendering purchase unprocessed.
111 | We recommend use other payment methods than `credit_card` if you encounter this issue.
112 | */
113 | "billing_createServiceOrderV1": {
114 | params: {
115 | /**
116 | * Payment method ID
117 | */
118 | payment_method_id: number;
119 | /**
120 | * items parameter
121 | */
122 | items: array;
123 | /**
124 | * Discount coupon codes
125 | */
126 | coupons?: array;
127 | };
128 | response: any; // Response structure will depend on the API
129 | };
130 |
131 | /**
132 | * Set the default payment method for your account.
133 |
134 | Use this endpoint to configure the primary payment method for future orders.
135 | */
136 | "billing_setDefaultPaymentMethodV1": {
137 | params: {
138 | /**
139 | * Payment method ID
140 | */
141 | paymentMethodId: number;
142 | };
143 | response: any; // Response structure will depend on the API
144 | };
145 |
146 | /**
147 | * Delete a payment method from your account.
148 |
149 | Use this endpoint to remove unused payment methods from user accounts.
150 | */
151 | "billing_deletePaymentMethodV1": {
152 | params: {
153 | /**
154 | * Payment method ID
155 | */
156 | paymentMethodId: number;
157 | };
158 | response: any; // Response structure will depend on the API
159 | };
160 |
161 | /**
162 | * Retrieve available payment methods that can be used for placing new orders.
163 |
164 | If you want to add new payment method, please use [hPanel](https://hpanel.hostinger.com/billing/payment-methods).
165 |
166 | Use this endpoint to view available payment options before creating orders.
167 | */
168 | "billing_getPaymentMethodListV1": {
169 | params: {
170 |
171 | };
172 | response: any; // Response structure will depend on the API
173 | };
174 |
175 | /**
176 | * Cancel a subscription and stop any further billing.
177 |
178 | Use this endpoint when users want to terminate active services.
179 | */
180 | "billing_cancelSubscriptionV1": {
181 | params: {
182 | /**
183 | * Subscription ID
184 | */
185 | subscriptionId: string;
186 | };
187 | response: any; // Response structure will depend on the API
188 | };
189 |
190 | /**
191 | * Retrieve a list of all subscriptions associated with your account.
192 |
193 | Use this endpoint to monitor active services and billing status.
194 | */
195 | "billing_getSubscriptionListV1": {
196 | params: {
197 |
198 | };
199 | response: any; // Response structure will depend on the API
200 | };
201 |
202 | /**
203 | * Disable auto-renewal for a subscription.
204 |
205 | Use this endpoint when disable auto-renewal for a subscription.
206 | */
207 | "billing_disableAutoRenewalV1": {
208 | params: {
209 | /**
210 | * Subscription ID
211 | */
212 | subscriptionId: string;
213 | };
214 | response: any; // Response structure will depend on the API
215 | };
216 |
217 | /**
218 | * Enable auto-renewal for a subscription.
219 |
220 | Use this endpoint when enable auto-renewal for a subscription.
221 | */
222 | "billing_enableAutoRenewalV1": {
223 | params: {
224 | /**
225 | * Subscription ID
226 | */
227 | subscriptionId: string;
228 | };
229 | response: any; // Response structure will depend on the API
230 | };
231 |
232 | /**
233 | * Retrieve particular DNS snapshot with contents of DNS zone records.
234 |
235 | Use this endpoint to view historical DNS configurations for domains.
236 | */
237 | "DNS_getDNSSnapshotV1": {
238 | params: {
239 | /**
240 | * Domain name
241 | */
242 | domain: string;
243 | /**
244 | * Snapshot ID
245 | */
246 | snapshotId: number;
247 | };
248 | response: any; // Response structure will depend on the API
249 | };
250 |
251 | /**
252 | * Retrieve DNS snapshots for a domain.
253 |
254 | Use this endpoint to view available DNS backup points for restoration.
255 | */
256 | "DNS_getDNSSnapshotListV1": {
257 | params: {
258 | /**
259 | * Domain name
260 | */
261 | domain: string;
262 | };
263 | response: any; // Response structure will depend on the API
264 | };
265 |
266 | /**
267 | * Restore DNS zone to the selected snapshot.
268 |
269 | Use this endpoint to revert domain DNS to a previous configuration.
270 | */
271 | "DNS_restoreDNSSnapshotV1": {
272 | params: {
273 | /**
274 | * Domain name
275 | */
276 | domain: string;
277 | /**
278 | * Snapshot ID
279 | */
280 | snapshotId: number;
281 | };
282 | response: any; // Response structure will depend on the API
283 | };
284 |
285 | /**
286 | * Retrieve DNS zone records for a specific domain.
287 |
288 | Use this endpoint to view current DNS configuration for domain management.
289 | */
290 | "DNS_getDNSRecordsV1": {
291 | params: {
292 | /**
293 | * Domain name
294 | */
295 | domain: string;
296 | };
297 | response: any; // Response structure will depend on the API
298 | };
299 |
300 | /**
301 | * Update DNS records for the selected domain.
302 |
303 | Using `overwrite = true` will replace existing records with the provided ones.
304 | Otherwise existing records will be updated and new records will be added.
305 |
306 | Use this endpoint to modify domain DNS configuration.
307 | */
308 | "DNS_updateDNSRecordsV1": {
309 | params: {
310 | /**
311 | * Domain name
312 | */
313 | domain: string;
314 | /**
315 | * 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.
316 | */
317 | overwrite?: boolean;
318 | /**
319 | * zone parameter
320 | */
321 | zone: array;
322 | };
323 | response: any; // Response structure will depend on the API
324 | };
325 |
326 | /**
327 | * Delete DNS records for the selected domain.
328 |
329 | To filter which records to delete, add the `name` of the record and `type` to the filter.
330 | Multiple filters can be provided with single request.
331 |
332 | If you have multiple records with the same name and type, and you want to delete only part of them,
333 | refer to the `Update zone records` endpoint.
334 |
335 | Use this endpoint to remove specific DNS records from domains.
336 | */
337 | "DNS_deleteDNSRecordsV1": {
338 | params: {
339 | /**
340 | * Domain name
341 | */
342 | domain: string;
343 | };
344 | response: any; // Response structure will depend on the API
345 | };
346 |
347 | /**
348 | * Reset DNS zone to the default records.
349 |
350 | Use this endpoint to restore domain DNS to original configuration.
351 | */
352 | "DNS_resetDNSRecordsV1": {
353 | params: {
354 | /**
355 | * Domain name
356 | */
357 | domain: string;
358 | /**
359 | * Determines if operation should be run synchronously
360 | */
361 | sync?: boolean;
362 | /**
363 | * Determines if email records should be reset
364 | */
365 | reset_email_records?: boolean;
366 | /**
367 | * Specifies which record types to not reset
368 | */
369 | whitelisted_record_types?: array;
370 | };
371 | response: any; // Response structure will depend on the API
372 | };
373 |
374 | /**
375 | * Validate DNS records prior to update for the selected domain.
376 |
377 | If the validation is successful, the response will contain `200 Success` code.
378 | If there is validation error, the response will fail with `422 Validation error` code.
379 |
380 | Use this endpoint to verify DNS record validity before applying changes.
381 | */
382 | "DNS_validateDNSRecordsV1": {
383 | params: {
384 | /**
385 | * Domain name
386 | */
387 | domain: string;
388 | /**
389 | * 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.
390 | */
391 | overwrite?: boolean;
392 | /**
393 | * zone parameter
394 | */
395 | zone: array;
396 | };
397 | response: any; // Response structure will depend on the API
398 | };
399 |
400 | /**
401 | * Retrieve a list of pending and completed domain verifications.
402 | */
403 | "v2_getDomainVerificationsDIRECT": {
404 | params: {
405 |
406 | };
407 | response: any; // Response structure will depend on the API
408 | };
409 |
410 | /**
411 | * Check availability of domain names across multiple TLDs.
412 |
413 | Multiple TLDs can be checked at once.
414 | If you want alternative domains with response, provide only one TLD and set `with_alternatives` to `true`.
415 | TLDs should be provided without leading dot (e.g. `com`, `net`, `org`).
416 |
417 | Endpoint has rate limit of 10 requests per minute.
418 |
419 | Use this endpoint to verify domain availability before purchase.
420 | */
421 | "domains_checkDomainAvailabilityV1": {
422 | params: {
423 | /**
424 | * Domain name (without TLD)
425 | */
426 | domain: string;
427 | /**
428 | * TLDs list
429 | */
430 | tlds: array;
431 | /**
432 | * Should response include alternatives
433 | */
434 | with_alternatives?: boolean;
435 | };
436 | response: any; // Response structure will depend on the API
437 | };
438 |
439 | /**
440 | * Retrieve domain forwarding data.
441 |
442 | Use this endpoint to view current redirect configuration for domains.
443 | */
444 | "domains_getDomainForwardingV1": {
445 | params: {
446 | /**
447 | * Domain name
448 | */
449 | domain: string;
450 | };
451 | response: any; // Response structure will depend on the API
452 | };
453 |
454 | /**
455 | * Delete domain forwarding data.
456 |
457 | Use this endpoint to remove redirect configuration from domains.
458 | */
459 | "domains_deleteDomainForwardingV1": {
460 | params: {
461 | /**
462 | * Domain name
463 | */
464 | domain: string;
465 | };
466 | response: any; // Response structure will depend on the API
467 | };
468 |
469 | /**
470 | * Create domain forwarding configuration.
471 |
472 | Use this endpoint to set up domain redirects to other URLs.
473 | */
474 | "domains_createDomainForwardingV1": {
475 | params: {
476 | /**
477 | * Domain name
478 | */
479 | domain: string;
480 | /**
481 | * Redirect type
482 | */
483 | redirect_type: string;
484 | /**
485 | * URL to forward domain to
486 | */
487 | redirect_url: string;
488 | };
489 | response: any; // Response structure will depend on the API
490 | };
491 |
492 | /**
493 | * Enable domain lock for the domain.
494 |
495 | When domain lock is enabled, the domain cannot be transferred to another registrar without first disabling the lock.
496 |
497 | Use this endpoint to secure domains against unauthorized transfers.
498 | */
499 | "domains_enableDomainLockV1": {
500 | params: {
501 | /**
502 | * Domain name
503 | */
504 | domain: string;
505 | };
506 | response: any; // Response structure will depend on the API
507 | };
508 |
509 | /**
510 | * Disable domain lock for the domain.
511 |
512 | Domain lock needs to be disabled before transferring the domain to another registrar.
513 |
514 | Use this endpoint to prepare domains for transfer to other registrars.
515 | */
516 | "domains_disableDomainLockV1": {
517 | params: {
518 | /**
519 | * Domain name
520 | */
521 | domain: string;
522 | };
523 | response: any; // Response structure will depend on the API
524 | };
525 |
526 | /**
527 | * Retrieve detailed information for specified domain.
528 |
529 | Use this endpoint to view comprehensive domain configuration and status.
530 | */
531 | "domains_getDomainDetailsV1": {
532 | params: {
533 | /**
534 | * Domain name
535 | */
536 | domain: string;
537 | };
538 | response: any; // Response structure will depend on the API
539 | };
540 |
541 | /**
542 | * Retrieve all domains associated with your account.
543 |
544 | Use this endpoint to view user's domain portfolio.
545 | */
546 | "domains_getDomainListV1": {
547 | params: {
548 |
549 | };
550 | response: any; // Response structure will depend on the API
551 | };
552 |
553 | /**
554 | * Purchase and register a new domain name.
555 |
556 | If registration fails, login to [hPanel](https://hpanel.hostinger.com/) and check domain registration status.
557 |
558 | If no payment method is provided, your default payment method will be used automatically.
559 |
560 | If no WHOIS information is provided, default contact information for that TLD will be used.
561 | Before making request, ensure WHOIS information for desired TLD exists in your account.
562 |
563 | Some TLDs require `additional_details` to be provided and these will be validated before completing purchase.
564 |
565 | Use this endpoint to register new domains for users.
566 | */
567 | "domains_purchaseNewDomainV1": {
568 | params: {
569 | /**
570 | * Domain name
571 | */
572 | domain: string;
573 | /**
574 | * Catalog price item ID
575 | */
576 | item_id: string;
577 | /**
578 | * Payment method ID, default will be used if not provided
579 | */
580 | payment_method_id?: number;
581 | /**
582 | * Domain contact information
583 | */
584 | domain_contacts?: object;
585 | /**
586 | * Additional registration data, possible values depends on TLD
587 | */
588 | additional_details?: object;
589 | /**
590 | * Discount coupon codes
591 | */
592 | coupons?: array;
593 | };
594 | response: any; // Response structure will depend on the API
595 | };
596 |
597 | /**
598 | * Enable privacy protection for the domain.
599 |
600 | When privacy protection is enabled, domain owner's personal information is hidden from public WHOIS database.
601 |
602 | Use this endpoint to protect domain owner's personal information from public view.
603 | */
604 | "domains_enablePrivacyProtectionV1": {
605 | params: {
606 | /**
607 | * Domain name
608 | */
609 | domain: string;
610 | };
611 | response: any; // Response structure will depend on the API
612 | };
613 |
614 | /**
615 | * Disable privacy protection for the domain.
616 |
617 | When privacy protection is disabled, domain owner's personal information is visible in public WHOIS database.
618 |
619 | Use this endpoint to make domain owner's information publicly visible.
620 | */
621 | "domains_disablePrivacyProtectionV1": {
622 | params: {
623 | /**
624 | * Domain name
625 | */
626 | domain: string;
627 | };
628 | response: any; // Response structure will depend on the API
629 | };
630 |
631 | /**
632 | * Set nameservers for a specified domain.
633 |
634 | Be aware, that improper nameserver configuration can lead to the domain being unresolvable or unavailable.
635 |
636 | Use this endpoint to configure custom DNS hosting for domains.
637 | */
638 | "domains_updateDomainNameserversV1": {
639 | params: {
640 | /**
641 | * Domain name
642 | */
643 | domain: string;
644 | /**
645 | * First name server
646 | */
647 | ns1: string;
648 | /**
649 | * Second name server
650 | */
651 | ns2: string;
652 | /**
653 | * Third name server
654 | */
655 | ns3?: string;
656 | /**
657 | * Fourth name server
658 | */
659 | ns4?: string;
660 | };
661 | response: any; // Response structure will depend on the API
662 | };
663 |
664 | /**
665 | * Retrieve a WHOIS contact profile.
666 |
667 | Use this endpoint to view domain registration contact information.
668 | */
669 | "domains_getWHOISProfileV1": {
670 | params: {
671 | /**
672 | * WHOIS ID
673 | */
674 | whoisId: number;
675 | };
676 | response: any; // Response structure will depend on the API
677 | };
678 |
679 | /**
680 | * Delete WHOIS contact profile.
681 |
682 | Use this endpoint to remove unused contact profiles from account.
683 | */
684 | "domains_deleteWHOISProfileV1": {
685 | params: {
686 | /**
687 | * WHOIS ID
688 | */
689 | whoisId: number;
690 | };
691 | response: any; // Response structure will depend on the API
692 | };
693 |
694 | /**
695 | * Retrieve WHOIS contact profiles.
696 |
697 | Use this endpoint to view available contact profiles for domain registration.
698 | */
699 | "domains_getWHOISProfileListV1": {
700 | params: {
701 | /**
702 | * Filter by TLD (without leading dot)
703 | */
704 | tld?: string;
705 | };
706 | response: any; // Response structure will depend on the API
707 | };
708 |
709 | /**
710 | * Create WHOIS contact profile.
711 |
712 | Use this endpoint to add new contact information for domain registration.
713 | */
714 | "domains_createWHOISProfileV1": {
715 | params: {
716 | /**
717 | * TLD of the domain (without leading dot)
718 | */
719 | tld: string;
720 | /**
721 | * ISO 3166 2-letter country code
722 | */
723 | country: string;
724 | /**
725 | * Legal entity type
726 | */
727 | entity_type: string;
728 | /**
729 | * TLD details
730 | */
731 | tld_details?: object;
732 | /**
733 | * WHOIS details
734 | */
735 | whois_details: object;
736 | };
737 | response: any; // Response structure will depend on the API
738 | };
739 |
740 | /**
741 | * Retrieve domain list where provided WHOIS contact profile is used.
742 |
743 | Use this endpoint to view which domains use specific contact profiles.
744 | */
745 | "domains_getWHOISProfileUsageV1": {
746 | params: {
747 | /**
748 | * WHOIS ID
749 | */
750 | whoisId: number;
751 | };
752 | response: any; // Response structure will depend on the API
753 | };
754 |
755 | /**
756 | * Retrieve a list of datacenters available for setting up hosting plans based on available datacenter capacity and hosting plan of your order.
757 | The first item in the list is the best match for your specific order requirements.
758 | */
759 | "hosting_listAvailableDatacentersV1": {
760 | params: {
761 | /**
762 | * Order ID
763 | */
764 | order_id: number;
765 | };
766 | response: any; // Response structure will depend on the API
767 | };
768 |
769 | /**
770 | * Generate a unique free subdomain that can be used for hosting services without purchasing custom domains.
771 | Free subdomains allow you to start using hosting services immediately and you can always connect a custom domain to your site later.
772 | */
773 | "hosting_generateAFreeSubdomainV1": {
774 | params: {
775 |
776 | };
777 | response: any; // Response structure will depend on the API
778 | };
779 |
780 | /**
781 | * Verify ownership of a single domain and return the verification status.
782 |
783 | Use this endpoint to check if a domain is accessible for you before using it for new websites.
784 | If the domain is accessible, the response will have `is_accessible: true`.
785 | If not, add the given TXT record to your domain's DNS records and try verifying again.
786 | Keep in mind that it may take up to 10 minutes for new TXT DNS records to propagate.
787 |
788 | Skip this verification when using Hostinger's free subdomains (*.hostingersite.com).
789 | */
790 | "hosting_verifyDomainOwnershipV1": {
791 | params: {
792 | /**
793 | * Domain to verify ownership for
794 | */
795 | domain: string;
796 | };
797 | response: any; // Response structure will depend on the API
798 | };
799 |
800 | /**
801 | * Retrieve a paginated list of orders accessible to the authenticated client.
802 |
803 | This endpoint returns orders of your hosting accounts as well as orders of other client hosting accounts that have shared access with you.
804 |
805 | Use the available query parameters to filter results by order statuses or specific order IDs for more targeted results.
806 | */
807 | "hosting_listOrdersV1": {
808 | params: {
809 | /**
810 | * Page number
811 | */
812 | page?: number;
813 | /**
814 | * Number of items per page
815 | */
816 | per_page?: number;
817 | /**
818 | * Filter by order statuses
819 | */
820 | statuses?: array;
821 | /**
822 | * Filter by specific order IDs
823 | */
824 | order_ids?: array;
825 | };
826 | response: any; // Response structure will depend on the API
827 | };
828 |
829 | /**
830 | * Retrieve a paginated list of websites (main and addon types) accessible to the authenticated client.
831 |
832 | This endpoint returns websites from your hosting accounts as well as websites from other client hosting accounts that have shared access with you.
833 |
834 | Use the available query parameters to filter results by username, order ID, enabled status, or domain name for more targeted results.
835 | */
836 | "hosting_listWebsitesV1": {
837 | params: {
838 | /**
839 | * Page number
840 | */
841 | page?: number;
842 | /**
843 | * Number of items per page
844 | */
845 | per_page?: number;
846 | /**
847 | * Filter by specific username
848 | */
849 | username?: string;
850 | /**
851 | * Order ID
852 | */
853 | order_id?: number;
854 | /**
855 | * Filter by enabled status
856 | */
857 | is_enabled?: boolean;
858 | /**
859 | * Filter by domain name (exact match)
860 | */
861 | domain?: string;
862 | };
863 | response: any; // Response structure will depend on the API
864 | };
865 |
866 | /**
867 | * Create a new website for the authenticated client.
868 |
869 | 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.
870 |
871 | Subsequent websites will be hosted on the same datacenter automatically.
872 |
873 | Website creation takes up to a few minutes to complete. Check the websites list endpoint to see when your new website becomes available.
874 | */
875 | "hosting_createWebsiteV1": {
876 | params: {
877 | /**
878 | * Domain name for the website. Cannot start with "www."
879 | */
880 | domain: string;
881 | /**
882 | * ID of the associated order
883 | */
884 | order_id: number;
885 | /**
886 | * Datacenter code. This parameter is required when creating the first website on a new hosting plan.
887 | */
888 | datacenter_code?: string;
889 | };
890 | response: any; // Response structure will depend on the API
891 | };
892 |
893 | /**
894 | * Delete a contact with the specified UUID.
895 |
896 | This endpoint permanently removes a contact from the email marketing system.
897 | */
898 | "reach_deleteAContactV1": {
899 | params: {
900 | /**
901 | * UUID of the contact to delete
902 | */
903 | uuid: string;
904 | };
905 | response: any; // Response structure will depend on the API
906 | };
907 |
908 | /**
909 | * Get a list of all contact groups.
910 |
911 | This endpoint returns a list of contact groups that can be used to organize contacts.
912 | */
913 | "reach_listContactGroupsV1": {
914 | params: {
915 |
916 | };
917 | response: any; // Response structure will depend on the API
918 | };
919 |
920 | /**
921 | * Get a list of contacts, optionally filtered by group and subscription status.
922 |
923 | This endpoint returns a paginated list of contacts with their basic information.
924 | You can filter contacts by group UUID and subscription status.
925 | */
926 | "reach_listContactsV1": {
927 | params: {
928 | /**
929 | * Filter contacts by group UUID
930 | */
931 | group_uuid?: string;
932 | /**
933 | * Filter contacts by subscription status
934 | */
935 | subscription_status?: string;
936 | /**
937 | * Page number
938 | */
939 | page?: number;
940 | };
941 | response: any; // Response structure will depend on the API
942 | };
943 |
944 | /**
945 | * Create a new contact in the email marketing system.
946 |
947 | This endpoint allows you to create a new contact with basic information like name, email, and surname.
948 | You can optionally assign the contact to specific groups and add notes.
949 |
950 | The contact will be automatically subscribed to email communications.
951 | */
952 | "reach_createANewContactV1": {
953 | params: {
954 | /**
955 | * email parameter
956 | */
957 | email: string;
958 | /**
959 | * name parameter
960 | */
961 | name?: string;
962 | /**
963 | * surname parameter
964 | */
965 | surname?: string;
966 | /**
967 | * group_uuids parameter
968 | */
969 | group_uuids?: array;
970 | /**
971 | * note parameter
972 | */
973 | note?: string;
974 | };
975 | response: any; // Response structure will depend on the API
976 | };
977 |
978 | /**
979 | * Retrieve all available data centers.
980 |
981 | Use this endpoint to view location options before deploying VPS instances.
982 | */
983 | "VPS_getDataCenterListV1": {
984 | params: {
985 |
986 | };
987 | response: any; // Response structure will depend on the API
988 | };
989 |
990 | /**
991 | * Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.
992 |
993 | This endpoint returns detailed information about each container including their current status, port mappings, and runtime configuration.
994 |
995 | Use this to monitor the health and state of all services within your Docker Compose project.
996 | */
997 | "VPS_getProjectContainersV1": {
998 | params: {
999 | /**
1000 | * Virtual Machine ID
1001 | */
1002 | virtualMachineId: number;
1003 | /**
1004 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1005 | */
1006 | projectName: string;
1007 | };
1008 | response: any; // Response structure will depend on the API
1009 | };
1010 |
1011 | /**
1012 | * Retrieves the complete project information including the docker-compose.yml file contents, project metadata, and current deployment status.
1013 |
1014 | This endpoint provides the full configuration and state details of a specific Docker Compose project.
1015 |
1016 | Use this to inspect project settings, review the compose file, or check the overall project health.
1017 | */
1018 | "VPS_getProjectContentsV1": {
1019 | params: {
1020 | /**
1021 | * Virtual Machine ID
1022 | */
1023 | virtualMachineId: number;
1024 | /**
1025 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1026 | */
1027 | projectName: string;
1028 | };
1029 | response: any; // Response structure will depend on the API
1030 | };
1031 |
1032 | /**
1033 | * Completely removes a Docker Compose project from the virtual machine, stopping all containers and cleaning up
1034 | associated resources including networks, volumes, and images.
1035 |
1036 | This operation is irreversible and will delete all project data.
1037 |
1038 | Use this when you want to permanently remove a project and free up system resources.
1039 | */
1040 | "VPS_deleteProjectV1": {
1041 | params: {
1042 | /**
1043 | * Virtual Machine ID
1044 | */
1045 | virtualMachineId: number;
1046 | /**
1047 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1048 | */
1049 | projectName: string;
1050 | };
1051 | response: any; // Response structure will depend on the API
1052 | };
1053 |
1054 | /**
1055 | * Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.
1056 |
1057 | This endpoint returns basic information about each project including name, status, file path and list of containers with
1058 | details about their names, image, status, health and ports. Container stats are omitted in this endpoint.
1059 | If you need to get detailed information about container with stats included, use the `Get project containers` endpoint.
1060 |
1061 | Use this to get an overview of all Docker projects on your VPS instance.
1062 | */
1063 | "VPS_getProjectListV1": {
1064 | params: {
1065 | /**
1066 | * Virtual Machine ID
1067 | */
1068 | virtualMachineId: number;
1069 | };
1070 | response: any; // Response structure will depend on the API
1071 | };
1072 |
1073 | /**
1074 | * Deploy new project from docker-compose.yaml contents or download contents from URL.
1075 |
1076 | URL can be Github repository url in format https://github.com/[user]/[repo] and it will be automatically resolved to
1077 | docker-compose.yaml file in master branch. Any other URL provided must return docker-compose.yaml file contents.
1078 |
1079 | If project with the same name already exists, existing project will be replaced.
1080 | */
1081 | "VPS_createNewProjectV1": {
1082 | params: {
1083 | /**
1084 | * Virtual Machine ID
1085 | */
1086 | virtualMachineId: number;
1087 | /**
1088 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1089 | */
1090 | project_name: string;
1091 | /**
1092 | * URL pointing to docker-compose.yaml file, Github repository or raw YAML content of the compose file
1093 | */
1094 | content: string;
1095 | /**
1096 | * Project environment variables
1097 | */
1098 | environment?: string;
1099 | };
1100 | response: any; // Response structure will depend on the API
1101 | };
1102 |
1103 | /**
1104 | * Retrieves aggregated log entries from all services within a Docker Compose project.
1105 |
1106 | This endpoint returns recent log output from each container, organized by service name with timestamps.
1107 | The response contains the last 300 log entries across all services.
1108 |
1109 | Use this for debugging, monitoring application behavior, and troubleshooting issues across your entire project stack.
1110 | */
1111 | "VPS_getProjectLogsV1": {
1112 | params: {
1113 | /**
1114 | * Virtual Machine ID
1115 | */
1116 | virtualMachineId: number;
1117 | /**
1118 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1119 | */
1120 | projectName: string;
1121 | };
1122 | response: any; // Response structure will depend on the API
1123 | };
1124 |
1125 | /**
1126 | * Restarts all services in a Docker Compose project by stopping and starting containers in the correct dependency order.
1127 |
1128 | This operation preserves data volumes and network configurations while refreshing the running containers.
1129 |
1130 | Use this to apply configuration changes or recover from service failures.
1131 | */
1132 | "VPS_restartProjectV1": {
1133 | params: {
1134 | /**
1135 | * Virtual Machine ID
1136 | */
1137 | virtualMachineId: number;
1138 | /**
1139 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1140 | */
1141 | projectName: string;
1142 | };
1143 | response: any; // Response structure will depend on the API
1144 | };
1145 |
1146 | /**
1147 | * Starts all services in a Docker Compose project that are currently stopped.
1148 |
1149 | This operation brings up containers in the correct dependency order as defined in the compose file.
1150 |
1151 | Use this to resume a project that was previously stopped or to start services after a system reboot.
1152 | */
1153 | "VPS_startProjectV1": {
1154 | params: {
1155 | /**
1156 | * Virtual Machine ID
1157 | */
1158 | virtualMachineId: number;
1159 | /**
1160 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1161 | */
1162 | projectName: string;
1163 | };
1164 | response: any; // Response structure will depend on the API
1165 | };
1166 |
1167 | /**
1168 | * Stops all running services in a Docker Compose project while preserving container configurations and data volumes.
1169 |
1170 | This operation gracefully shuts down containers in reverse dependency order.
1171 |
1172 | Use this to temporarily halt a project without removing data or configurations.
1173 | */
1174 | "VPS_stopProjectV1": {
1175 | params: {
1176 | /**
1177 | * Virtual Machine ID
1178 | */
1179 | virtualMachineId: number;
1180 | /**
1181 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1182 | */
1183 | projectName: string;
1184 | };
1185 | response: any; // Response structure will depend on the API
1186 | };
1187 |
1188 | /**
1189 | * Updates a Docker Compose project by pulling the latest image versions and recreating containers with new configurations.
1190 |
1191 | This operation preserves data volumes while applying changes from the compose file.
1192 |
1193 | Use this to deploy application updates, apply configuration changes, or refresh container images to their latest versions.
1194 | */
1195 | "VPS_updateProjectV1": {
1196 | params: {
1197 | /**
1198 | * Virtual Machine ID
1199 | */
1200 | virtualMachineId: number;
1201 | /**
1202 | * Docker Compose project name using alphanumeric characters, dashes, and underscores only
1203 | */
1204 | projectName: string;
1205 | };
1206 | response: any; // Response structure will depend on the API
1207 | };
1208 |
1209 | /**
1210 | * Activate a firewall for a specified virtual machine.
1211 |
1212 | Only one firewall can be active for a virtual machine at a time.
1213 |
1214 | Use this endpoint to apply firewall rules to VPS instances.
1215 | */
1216 | "VPS_activateFirewallV1": {
1217 | params: {
1218 | /**
1219 | * Firewall ID
1220 | */
1221 | firewallId: number;
1222 | /**
1223 | * Virtual Machine ID
1224 | */
1225 | virtualMachineId: number;
1226 | };
1227 | response: any; // Response structure will depend on the API
1228 | };
1229 |
1230 | /**
1231 | * Deactivate a firewall for a specified virtual machine.
1232 |
1233 | Use this endpoint to remove firewall protection from VPS instances.
1234 | */
1235 | "VPS_deactivateFirewallV1": {
1236 | params: {
1237 | /**
1238 | * Firewall ID
1239 | */
1240 | firewallId: number;
1241 | /**
1242 | * Virtual Machine ID
1243 | */
1244 | virtualMachineId: number;
1245 | };
1246 | response: any; // Response structure will depend on the API
1247 | };
1248 |
1249 | /**
1250 | * Retrieve firewall by its ID and rules associated with it.
1251 |
1252 | Use this endpoint to view specific firewall configuration and rules.
1253 | */
1254 | "VPS_getFirewallDetailsV1": {
1255 | params: {
1256 | /**
1257 | * Firewall ID
1258 | */
1259 | firewallId: number;
1260 | };
1261 | response: any; // Response structure will depend on the API
1262 | };
1263 |
1264 | /**
1265 | * Delete a specified firewall.
1266 |
1267 | Any virtual machine that has this firewall activated will automatically have it deactivated.
1268 |
1269 | Use this endpoint to remove unused firewall configurations.
1270 | */
1271 | "VPS_deleteFirewallV1": {
1272 | params: {
1273 | /**
1274 | * Firewall ID
1275 | */
1276 | firewallId: number;
1277 | };
1278 | response: any; // Response structure will depend on the API
1279 | };
1280 |
1281 | /**
1282 | * Retrieve all available firewalls.
1283 |
1284 | Use this endpoint to view existing firewall configurations.
1285 | */
1286 | "VPS_getFirewallListV1": {
1287 | params: {
1288 | /**
1289 | * Page number
1290 | */
1291 | page?: number;
1292 | };
1293 | response: any; // Response structure will depend on the API
1294 | };
1295 |
1296 | /**
1297 | * Create a new firewall.
1298 |
1299 | Use this endpoint to set up new firewall configurations for VPS security.
1300 | */
1301 | "VPS_createNewFirewallV1": {
1302 | params: {
1303 | /**
1304 | * name parameter
1305 | */
1306 | name: string;
1307 | };
1308 | response: any; // Response structure will depend on the API
1309 | };
1310 |
1311 | /**
1312 | * Update a specific firewall rule from a specified firewall.
1313 |
1314 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1315 |
1316 | Use this endpoint to modify existing firewall rules.
1317 | */
1318 | "VPS_updateFirewallRuleV1": {
1319 | params: {
1320 | /**
1321 | * Firewall ID
1322 | */
1323 | firewallId: number;
1324 | /**
1325 | * Firewall Rule ID
1326 | */
1327 | ruleId: number;
1328 | /**
1329 | * protocol parameter
1330 | */
1331 | protocol: string;
1332 | /**
1333 | * Port or port range, ex: 1024:2048
1334 | */
1335 | port: string;
1336 | /**
1337 | * source parameter
1338 | */
1339 | source: string;
1340 | /**
1341 | * IP range, CIDR, single IP or `any`
1342 | */
1343 | source_detail: string;
1344 | };
1345 | response: any; // Response structure will depend on the API
1346 | };
1347 |
1348 | /**
1349 | * Delete a specific firewall rule from a specified firewall.
1350 |
1351 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1352 |
1353 | Use this endpoint to remove specific firewall rules.
1354 | */
1355 | "VPS_deleteFirewallRuleV1": {
1356 | params: {
1357 | /**
1358 | * Firewall ID
1359 | */
1360 | firewallId: number;
1361 | /**
1362 | * Firewall Rule ID
1363 | */
1364 | ruleId: number;
1365 | };
1366 | response: any; // Response structure will depend on the API
1367 | };
1368 |
1369 | /**
1370 | * Create new firewall rule for a specified firewall.
1371 |
1372 | By default, the firewall drops all incoming traffic, which means you must add accept rules for all ports you want to use.
1373 |
1374 | Any virtual machine that has this firewall activated will lose sync with the firewall and will have to be synced again manually.
1375 |
1376 | Use this endpoint to add new security rules to firewalls.
1377 | */
1378 | "VPS_createFirewallRuleV1": {
1379 | params: {
1380 | /**
1381 | * Firewall ID
1382 | */
1383 | firewallId: number;
1384 | /**
1385 | * protocol parameter
1386 | */
1387 | protocol: string;
1388 | /**
1389 | * Port or port range, ex: 1024:2048
1390 | */
1391 | port: string;
1392 | /**
1393 | * source parameter
1394 | */
1395 | source: string;
1396 | /**
1397 | * IP range, CIDR, single IP or `any`
1398 | */
1399 | source_detail: string;
1400 | };
1401 | response: any; // Response structure will depend on the API
1402 | };
1403 |
1404 | /**
1405 | * Sync a firewall for a specified virtual machine.
1406 |
1407 | Firewall can lose sync with virtual machine if the firewall has new rules added, removed or updated.
1408 |
1409 | Use this endpoint to apply updated firewall rules to VPS instances.
1410 | */
1411 | "VPS_syncFirewallV1": {
1412 | params: {
1413 | /**
1414 | * Firewall ID
1415 | */
1416 | firewallId: number;
1417 | /**
1418 | * Virtual Machine ID
1419 | */
1420 | virtualMachineId: number;
1421 | };
1422 | response: any; // Response structure will depend on the API
1423 | };
1424 |
1425 | /**
1426 | * Retrieve post-install script by its ID.
1427 |
1428 | Use this endpoint to view specific automation script details.
1429 | */
1430 | "VPS_getPostInstallScriptV1": {
1431 | params: {
1432 | /**
1433 | * Post-install script ID
1434 | */
1435 | postInstallScriptId: number;
1436 | };
1437 | response: any; // Response structure will depend on the API
1438 | };
1439 |
1440 | /**
1441 | * Update a specific post-install script.
1442 |
1443 | Use this endpoint to modify existing automation scripts.
1444 | */
1445 | "VPS_updatePostInstallScriptV1": {
1446 | params: {
1447 | /**
1448 | * Post-install script ID
1449 | */
1450 | postInstallScriptId: number;
1451 | /**
1452 | * Name of the script
1453 | */
1454 | name: string;
1455 | /**
1456 | * Content of the script
1457 | */
1458 | content: string;
1459 | };
1460 | response: any; // Response structure will depend on the API
1461 | };
1462 |
1463 | /**
1464 | * Delete a post-install script from your account.
1465 |
1466 | Use this endpoint to remove unused automation scripts.
1467 | */
1468 | "VPS_deletePostInstallScriptV1": {
1469 | params: {
1470 | /**
1471 | * Post-install script ID
1472 | */
1473 | postInstallScriptId: number;
1474 | };
1475 | response: any; // Response structure will depend on the API
1476 | };
1477 |
1478 | /**
1479 | * Retrieve post-install scripts associated with your account.
1480 |
1481 | Use this endpoint to view available automation scripts for VPS deployment.
1482 | */
1483 | "VPS_getPostInstallScriptsV1": {
1484 | params: {
1485 | /**
1486 | * Page number
1487 | */
1488 | page?: number;
1489 | };
1490 | response: any; // Response structure will depend on the API
1491 | };
1492 |
1493 | /**
1494 | * Add a new post-install script to your account, which can then be used after virtual machine installation.
1495 |
1496 | The script contents will be saved to the file `/post_install` with executable attribute set and will be executed once virtual machine is installed.
1497 | The output of the script will be redirected to `/post_install.log`. Maximum script size is 48KB.
1498 |
1499 | Use this endpoint to create automation scripts for VPS setup tasks.
1500 | */
1501 | "VPS_createPostInstallScriptV1": {
1502 | params: {
1503 | /**
1504 | * Name of the script
1505 | */
1506 | name: string;
1507 | /**
1508 | * Content of the script
1509 | */
1510 | content: string;
1511 | };
1512 | response: any; // Response structure will depend on the API
1513 | };
1514 |
1515 | /**
1516 | * Attach existing public keys from your account to a specified virtual machine.
1517 |
1518 | Multiple keys can be attached to a single virtual machine.
1519 |
1520 | Use this endpoint to enable SSH key authentication for VPS instances.
1521 | */
1522 | "VPS_attachPublicKeyV1": {
1523 | params: {
1524 | /**
1525 | * Virtual Machine ID
1526 | */
1527 | virtualMachineId: number;
1528 | /**
1529 | * Public Key IDs to attach
1530 | */
1531 | ids: array;
1532 | };
1533 | response: any; // Response structure will depend on the API
1534 | };
1535 |
1536 | /**
1537 | * Delete a public key from your account.
1538 |
1539 | **Deleting public key from account does not remove it from virtual machine**
1540 |
1541 | Use this endpoint to remove unused SSH keys from account.
1542 | */
1543 | "VPS_deletePublicKeyV1": {
1544 | params: {
1545 | /**
1546 | * Public Key ID
1547 | */
1548 | publicKeyId: number;
1549 | };
1550 | response: any; // Response structure will depend on the API
1551 | };
1552 |
1553 | /**
1554 | * Retrieve public keys associated with your account.
1555 |
1556 | Use this endpoint to view available SSH keys for VPS authentication.
1557 | */
1558 | "VPS_getPublicKeysV1": {
1559 | params: {
1560 | /**
1561 | * Page number
1562 | */
1563 | page?: number;
1564 | };
1565 | response: any; // Response structure will depend on the API
1566 | };
1567 |
1568 | /**
1569 | * Add a new public key to your account.
1570 |
1571 | Use this endpoint to register SSH keys for VPS authentication.
1572 | */
1573 | "VPS_createPublicKeyV1": {
1574 | params: {
1575 | /**
1576 | * name parameter
1577 | */
1578 | name: string;
1579 | /**
1580 | * key parameter
1581 | */
1582 | key: string;
1583 | };
1584 | response: any; // Response structure will depend on the API
1585 | };
1586 |
1587 | /**
1588 | * Retrieve detailed information about a specific OS template for virtual machines.
1589 |
1590 | Use this endpoint to view specific template specifications before deployment.
1591 | */
1592 | "VPS_getTemplateDetailsV1": {
1593 | params: {
1594 | /**
1595 | * Template ID
1596 | */
1597 | templateId: number;
1598 | };
1599 | response: any; // Response structure will depend on the API
1600 | };
1601 |
1602 | /**
1603 | * Retrieve available OS templates for virtual machines.
1604 |
1605 | Use this endpoint to view operating system options before creating or recreating VPS instances.
1606 | */
1607 | "VPS_getTemplatesV1": {
1608 | params: {
1609 |
1610 | };
1611 | response: any; // Response structure will depend on the API
1612 | };
1613 |
1614 | /**
1615 | * Retrieve detailed information about a specific action performed on a specified virtual machine.
1616 |
1617 | Use this endpoint to monitor specific VPS operation status and details.
1618 | */
1619 | "VPS_getActionDetailsV1": {
1620 | params: {
1621 | /**
1622 | * Virtual Machine ID
1623 | */
1624 | virtualMachineId: number;
1625 | /**
1626 | * Action ID
1627 | */
1628 | actionId: number;
1629 | };
1630 | response: any; // Response structure will depend on the API
1631 | };
1632 |
1633 | /**
1634 | * Retrieve actions performed on a specified virtual machine.
1635 |
1636 | Actions are operations or events that have been executed on the virtual machine, such as starting, stopping, or modifying
1637 | the machine. This endpoint allows you to view the history of these actions, providing details about each action,
1638 | such as the action name, timestamp, and status.
1639 |
1640 | Use this endpoint to view VPS operation history and troubleshoot issues.
1641 | */
1642 | "VPS_getActionsV1": {
1643 | params: {
1644 | /**
1645 | * Virtual Machine ID
1646 | */
1647 | virtualMachineId: number;
1648 | /**
1649 | * Page number
1650 | */
1651 | page?: number;
1652 | };
1653 | response: any; // Response structure will depend on the API
1654 | };
1655 |
1656 | /**
1657 | * Retrieve public keys attached to a specified virtual machine.
1658 |
1659 | Use this endpoint to view SSH keys configured for specific VPS instances.
1660 | */
1661 | "VPS_getAttachedPublicKeysV1": {
1662 | params: {
1663 | /**
1664 | * Virtual Machine ID
1665 | */
1666 | virtualMachineId: number;
1667 | /**
1668 | * Page number
1669 | */
1670 | page?: number;
1671 | };
1672 | response: any; // Response structure will depend on the API
1673 | };
1674 |
1675 | /**
1676 | * Retrieve backups for a specified virtual machine.
1677 |
1678 | Use this endpoint to view available backup points for VPS data recovery.
1679 | */
1680 | "VPS_getBackupsV1": {
1681 | params: {
1682 | /**
1683 | * Virtual Machine ID
1684 | */
1685 | virtualMachineId: number;
1686 | /**
1687 | * Page number
1688 | */
1689 | page?: number;
1690 | };
1691 | response: any; // Response structure will depend on the API
1692 | };
1693 |
1694 | /**
1695 | * Restore a backup for a specified virtual machine.
1696 |
1697 | The system will then initiate the restore process, which may take some time depending on the size of the backup.
1698 |
1699 | **All data on the virtual machine will be overwritten with the data from the backup.**
1700 |
1701 | Use this endpoint to recover VPS data from backup points.
1702 | */
1703 | "VPS_restoreBackupV1": {
1704 | params: {
1705 | /**
1706 | * Virtual Machine ID
1707 | */
1708 | virtualMachineId: number;
1709 | /**
1710 | * Backup ID
1711 | */
1712 | backupId: number;
1713 | };
1714 | response: any; // Response structure will depend on the API
1715 | };
1716 |
1717 | /**
1718 | * Set hostname for a specified virtual machine.
1719 |
1720 | Changing hostname does not update PTR record automatically.
1721 | If you want your virtual machine to be reachable by a hostname,
1722 | you need to point your domain A/AAAA records to virtual machine IP as well.
1723 |
1724 | Use this endpoint to configure custom hostnames for VPS instances.
1725 | */
1726 | "VPS_setHostnameV1": {
1727 | params: {
1728 | /**
1729 | * Virtual Machine ID
1730 | */
1731 | virtualMachineId: number;
1732 | /**
1733 | * hostname parameter
1734 | */
1735 | hostname: string;
1736 | };
1737 | response: any; // Response structure will depend on the API
1738 | };
1739 |
1740 | /**
1741 | * Reset hostname and PTR record of a specified virtual machine to default value.
1742 |
1743 | Use this endpoint to restore default hostname configuration for VPS instances.
1744 | */
1745 | "VPS_resetHostnameV1": {
1746 | params: {
1747 | /**
1748 | * Virtual Machine ID
1749 | */
1750 | virtualMachineId: number;
1751 | };
1752 | response: any; // Response structure will depend on the API
1753 | };
1754 |
1755 | /**
1756 | * Retrieve detailed information about a specified virtual machine.
1757 |
1758 | Use this endpoint to view comprehensive VPS configuration and status.
1759 | */
1760 | "VPS_getVirtualMachineDetailsV1": {
1761 | params: {
1762 | /**
1763 | * Virtual Machine ID
1764 | */
1765 | virtualMachineId: number;
1766 | };
1767 | response: any; // Response structure will depend on the API
1768 | };
1769 |
1770 | /**
1771 | * Retrieve all available virtual machines.
1772 |
1773 | Use this endpoint to view available VPS instances.
1774 | */
1775 | "VPS_getVirtualMachinesV1": {
1776 | params: {
1777 |
1778 | };
1779 | response: any; // Response structure will depend on the API
1780 | };
1781 |
1782 | /**
1783 | * Purchase and setup a new virtual machine.
1784 |
1785 | If virtual machine setup fails for any reason, login to [hPanel](https://hpanel.hostinger.com/) and complete the setup manually.
1786 |
1787 | If no payment method is provided, your default payment method will be used automatically.
1788 |
1789 | Use this endpoint to create new VPS instances.
1790 | */
1791 | "VPS_purchaseNewVirtualMachineV1": {
1792 | params: {
1793 | /**
1794 | * Catalog price item ID
1795 | */
1796 | item_id: string;
1797 | /**
1798 | * Payment method ID, default will be used if not provided
1799 | */
1800 | payment_method_id?: number;
1801 | /**
1802 | * setup parameter
1803 | */
1804 | setup: string;
1805 | /**
1806 | * Discount coupon codes
1807 | */
1808 | coupons?: array;
1809 | };
1810 | response: any; // Response structure will depend on the API
1811 | };
1812 |
1813 | /**
1814 | * Retrieve scan metrics for the [Monarx](https://www.monarx.com/) malware scanner installed on a specified virtual machine.
1815 |
1816 | The scan metrics provide detailed information about malware scans performed by Monarx, including number of scans,
1817 | detected threats, and other relevant statistics. This information is useful for monitoring security status of the
1818 | virtual machine and assessing effectiveness of the malware scanner.
1819 |
1820 | Use this endpoint to monitor VPS security scan results and threat detection.
1821 | */
1822 | "VPS_getScanMetricsV1": {
1823 | params: {
1824 | /**
1825 | * Virtual Machine ID
1826 | */
1827 | virtualMachineId: number;
1828 | };
1829 | response: any; // Response structure will depend on the API
1830 | };
1831 |
1832 | /**
1833 | * Install the Monarx malware scanner on a specified virtual machine.
1834 |
1835 | [Monarx](https://www.monarx.com/) is a security tool designed to detect and prevent malware infections on virtual machines.
1836 | By installing Monarx, users can enhance the security of their virtual machines, ensuring that they are protected against malicious software.
1837 |
1838 | Use this endpoint to enable malware protection on VPS instances.
1839 | */
1840 | "VPS_installMonarxV1": {
1841 | params: {
1842 | /**
1843 | * Virtual Machine ID
1844 | */
1845 | virtualMachineId: number;
1846 | };
1847 | response: any; // Response structure will depend on the API
1848 | };
1849 |
1850 | /**
1851 | * Uninstall the Monarx malware scanner on a specified virtual machine.
1852 |
1853 | If Monarx is not installed, the request will still be processed without any effect.
1854 |
1855 | Use this endpoint to remove malware scanner from VPS instances.
1856 | */
1857 | "VPS_uninstallMonarxV1": {
1858 | params: {
1859 | /**
1860 | * Virtual Machine ID
1861 | */
1862 | virtualMachineId: number;
1863 | };
1864 | response: any; // Response structure will depend on the API
1865 | };
1866 |
1867 | /**
1868 | * Retrieve historical metrics for a specified virtual machine.
1869 |
1870 | It includes the following metrics:
1871 | - CPU usage
1872 | - Memory usage
1873 | - Disk usage
1874 | - Network usage
1875 | - Uptime
1876 |
1877 | Use this endpoint to monitor VPS performance and resource utilization over time.
1878 | */
1879 | "VPS_getMetricsV1": {
1880 | params: {
1881 | /**
1882 | * Virtual Machine ID
1883 | */
1884 | virtualMachineId: number;
1885 | /**
1886 | * date_from parameter
1887 | */
1888 | date_from: string;
1889 | /**
1890 | * date_to parameter
1891 | */
1892 | date_to: string;
1893 | };
1894 | response: any; // Response structure will depend on the API
1895 | };
1896 |
1897 | /**
1898 | * Set nameservers for a specified virtual machine.
1899 |
1900 | Be aware, that improper nameserver configuration can lead to the virtual machine being unable to resolve domain names.
1901 |
1902 | Use this endpoint to configure custom DNS resolvers for VPS instances.
1903 | */
1904 | "VPS_setNameserversV1": {
1905 | params: {
1906 | /**
1907 | * Virtual Machine ID
1908 | */
1909 | virtualMachineId: number;
1910 | /**
1911 | * ns1 parameter
1912 | */
1913 | ns1: string;
1914 | /**
1915 | * ns2 parameter
1916 | */
1917 | ns2?: string;
1918 | /**
1919 | * ns3 parameter
1920 | */
1921 | ns3?: string;
1922 | };
1923 | response: any; // Response structure will depend on the API
1924 | };
1925 |
1926 | /**
1927 | * Create or update a PTR (Pointer) record for a specified virtual machine.
1928 |
1929 | Use this endpoint to configure reverse DNS lookup for VPS IP addresses.
1930 | */
1931 | "VPS_createPTRRecordV1": {
1932 | params: {
1933 | /**
1934 | * Virtual Machine ID
1935 | */
1936 | virtualMachineId: number;
1937 | /**
1938 | * IP Address ID
1939 | */
1940 | ipAddressId: number;
1941 | /**
1942 | * Pointer record domain
1943 | */
1944 | domain: string;
1945 | };
1946 | response: any; // Response structure will depend on the API
1947 | };
1948 |
1949 | /**
1950 | * Delete a PTR (Pointer) record for a specified virtual machine.
1951 |
1952 | Once deleted, reverse DNS lookups to the virtual machine's IP address will no longer return the previously configured hostname.
1953 |
1954 | Use this endpoint to remove reverse DNS configuration from VPS instances.
1955 | */
1956 | "VPS_deletePTRRecordV1": {
1957 | params: {
1958 | /**
1959 | * Virtual Machine ID
1960 | */
1961 | virtualMachineId: number;
1962 | /**
1963 | * IP Address ID
1964 | */
1965 | ipAddressId: number;
1966 | };
1967 | response: any; // Response structure will depend on the API
1968 | };
1969 |
1970 | /**
1971 | * Set panel password for a specified virtual machine.
1972 |
1973 | If virtual machine does not use panel OS, the request will still be processed without any effect.
1974 | Requirements for password are same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
1975 |
1976 | Use this endpoint to configure control panel access credentials for VPS instances.
1977 | */
1978 | "VPS_setPanelPasswordV1": {
1979 | params: {
1980 | /**
1981 | * Virtual Machine ID
1982 | */
1983 | virtualMachineId: number;
1984 | /**
1985 | * Panel password for the virtual machine
1986 | */
1987 | password: string;
1988 | };
1989 | response: any; // Response structure will depend on the API
1990 | };
1991 |
1992 | /**
1993 | * Initiate recovery mode for a specified virtual machine.
1994 |
1995 | Recovery mode is a special state that allows users to perform system rescue operations,
1996 | such as repairing file systems, recovering data, or troubleshooting issues that prevent the virtual machine
1997 | from booting normally.
1998 |
1999 | Virtual machine will boot recovery disk image and original disk image will be mounted in `/mnt` directory.
2000 |
2001 | Use this endpoint to enable system rescue operations on VPS instances.
2002 | */
2003 | "VPS_startRecoveryModeV1": {
2004 | params: {
2005 | /**
2006 | * Virtual Machine ID
2007 | */
2008 | virtualMachineId: number;
2009 | /**
2010 | * Temporary root password for recovery mode
2011 | */
2012 | root_password: string;
2013 | };
2014 | response: any; // Response structure will depend on the API
2015 | };
2016 |
2017 | /**
2018 | * Stop recovery mode for a specified virtual machine.
2019 |
2020 | If virtual machine is not in recovery mode, this operation will fail.
2021 |
2022 | Use this endpoint to exit system rescue mode and return VPS to normal operation.
2023 | */
2024 | "VPS_stopRecoveryModeV1": {
2025 | params: {
2026 | /**
2027 | * Virtual Machine ID
2028 | */
2029 | virtualMachineId: number;
2030 | };
2031 | response: any; // Response structure will depend on the API
2032 | };
2033 |
2034 | /**
2035 | * Recreate a virtual machine from scratch.
2036 |
2037 | The recreation process involves reinstalling the operating system and resetting the virtual machine to its initial state.
2038 | Snapshots, if there are any, will be deleted.
2039 |
2040 | ## Password Requirements
2041 | Password will be checked against leaked password databases.
2042 | Requirements for the password are:
2043 | - At least 8 characters long
2044 | - At least one uppercase letter
2045 | - At least one lowercase letter
2046 | - At least one number
2047 | - Is not leaked publicly
2048 |
2049 | **This operation is irreversible and will result in the loss of all data stored on the virtual machine!**
2050 |
2051 | Use this endpoint to completely rebuild VPS instances with fresh OS installation.
2052 | */
2053 | "VPS_recreateVirtualMachineV1": {
2054 | params: {
2055 | /**
2056 | * Virtual Machine ID
2057 | */
2058 | virtualMachineId: number;
2059 | /**
2060 | * Template ID
2061 | */
2062 | template_id: number;
2063 | /**
2064 | * Root password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.
2065 | */
2066 | password?: string;
2067 | /**
2068 | * 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.
2069 | */
2070 | panel_password?: string;
2071 | /**
2072 | * Post-install script to execute after virtual machine was recreated
2073 | */
2074 | post_install_script_id?: number;
2075 | };
2076 | response: any; // Response structure will depend on the API
2077 | };
2078 |
2079 | /**
2080 | * Restart a specified virtual machine by fully stopping and starting it.
2081 |
2082 | If the virtual machine was stopped, it will be started.
2083 |
2084 | Use this endpoint to reboot VPS instances.
2085 | */
2086 | "VPS_restartVirtualMachineV1": {
2087 | params: {
2088 | /**
2089 | * Virtual Machine ID
2090 | */
2091 | virtualMachineId: number;
2092 | };
2093 | response: any; // Response structure will depend on the API
2094 | };
2095 |
2096 | /**
2097 | * Set root password for a specified virtual machine.
2098 |
2099 | Requirements for password are same as in the [recreate virtual machine endpoint](/#tag/vps-virtual-machine/POST/api/vps/v1/virtual-machines/{virtualMachineId}/recreate).
2100 |
2101 | Use this endpoint to update administrator credentials for VPS instances.
2102 | */
2103 | "VPS_setRootPasswordV1": {
2104 | params: {
2105 | /**
2106 | * Virtual Machine ID
2107 | */
2108 | virtualMachineId: number;
2109 | /**
2110 | * Root password for the virtual machine
2111 | */
2112 | password: string;
2113 | };
2114 | response: any; // Response structure will depend on the API
2115 | };
2116 |
2117 | /**
2118 | * Setup newly purchased virtual machine with `initial` state.
2119 |
2120 | Use this endpoint to configure and initialize purchased VPS instances.
2121 | */
2122 | "VPS_setupPurchasedVirtualMachineV1": {
2123 | params: {
2124 | /**
2125 | * Virtual Machine ID
2126 | */
2127 | virtualMachineId: number;
2128 | /**
2129 | * Template ID
2130 | */
2131 | template_id: number;
2132 | /**
2133 | * Data center ID
2134 | */
2135 | data_center_id: number;
2136 | /**
2137 | * Post-install script ID
2138 | */
2139 | post_install_script_id?: number;
2140 | /**
2141 | * Password for the virtual machine. If not provided, random password will be generated. Password will not be shown in the response.
2142 | */
2143 | password?: string;
2144 | /**
2145 | * Override default hostname of the virtual machine
2146 | */
2147 | hostname?: string;
2148 | /**
2149 | * Install Monarx malware scanner (if supported)
2150 | */
2151 | install_monarx?: boolean;
2152 | /**
2153 | * Enable weekly backup schedule
2154 | */
2155 | enable_backups?: boolean;
2156 | /**
2157 | * Name server 1
2158 | */
2159 | ns1?: string;
2160 | /**
2161 | * Name server 2
2162 | */
2163 | ns2?: string;
2164 | /**
2165 | * Use SSH key
2166 | */
2167 | public_key?: object;
2168 | };
2169 | response: any; // Response structure will depend on the API
2170 | };
2171 |
2172 | /**
2173 | * Retrieve snapshot for a specified virtual machine.
2174 |
2175 | Use this endpoint to view current VPS snapshot information.
2176 | */
2177 | "VPS_getSnapshotV1": {
2178 | params: {
2179 | /**
2180 | * Virtual Machine ID
2181 | */
2182 | virtualMachineId: number;
2183 | };
2184 | response: any; // Response structure will depend on the API
2185 | };
2186 |
2187 | /**
2188 | * Create a snapshot of a specified virtual machine.
2189 |
2190 | A snapshot captures the state and data of the virtual machine at a specific point in time,
2191 | allowing users to restore the virtual machine to that state if needed.
2192 | This operation is useful for backup purposes, system recovery,
2193 | and testing changes without affecting the current state of the virtual machine.
2194 |
2195 | **Creating new snapshot will overwrite the existing snapshot!**
2196 |
2197 | Use this endpoint to capture VPS state for backup and recovery purposes.
2198 | */
2199 | "VPS_createSnapshotV1": {
2200 | params: {
2201 | /**
2202 | * Virtual Machine ID
2203 | */
2204 | virtualMachineId: number;
2205 | };
2206 | response: any; // Response structure will depend on the API
2207 | };
2208 |
2209 | /**
2210 | * Delete a snapshot of a specified virtual machine.
2211 |
2212 | Use this endpoint to remove VPS snapshots.
2213 | */
2214 | "VPS_deleteSnapshotV1": {
2215 | params: {
2216 | /**
2217 | * Virtual Machine ID
2218 | */
2219 | virtualMachineId: number;
2220 | };
2221 | response: any; // Response structure will depend on the API
2222 | };
2223 |
2224 | /**
2225 | * Restore a specified virtual machine to a previous state using a snapshot.
2226 |
2227 | Restoring from a snapshot allows users to revert the virtual machine to that state, which is useful for system recovery, undoing changes, or testing.
2228 |
2229 | Use this endpoint to revert VPS instances to previous saved states.
2230 | */
2231 | "VPS_restoreSnapshotV1": {
2232 | params: {
2233 | /**
2234 | * Virtual Machine ID
2235 | */
2236 | virtualMachineId: number;
2237 | };
2238 | response: any; // Response structure will depend on the API
2239 | };
2240 |
2241 | /**
2242 | * Start a specified virtual machine.
2243 |
2244 | If the virtual machine is already running, the request will still be processed without any effect.
2245 |
2246 | Use this endpoint to power on stopped VPS instances.
2247 | */
2248 | "VPS_startVirtualMachineV1": {
2249 | params: {
2250 | /**
2251 | * Virtual Machine ID
2252 | */
2253 | virtualMachineId: number;
2254 | };
2255 | response: any; // Response structure will depend on the API
2256 | };
2257 |
2258 | /**
2259 | * Stop a specified virtual machine.
2260 |
2261 | If the virtual machine is already stopped, the request will still be processed without any effect.
2262 |
2263 | Use this endpoint to power off running VPS instances.
2264 | */
2265 | "VPS_stopVirtualMachineV1": {
2266 | params: {
2267 | /**
2268 | * Virtual Machine ID
2269 | */
2270 | virtualMachineId: number;
2271 | };
2272 | response: any; // Response structure will depend on the API
2273 | };
2274 | }
2275 |
```