hostinger-api-mcp 1.43.1 → 1.45.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/types.d.ts CHANGED
@@ -306,6 +306,55 @@ If this is the only domain on the website, unlinking leaves the website without
306
306
  response: any; // Response structure will depend on the API
307
307
  };
308
308
 
309
+ /**
310
+ * Generate a file browser upload URL with authentication credentials for uploading files
311
+ to an Agency Plan website's file storage.
312
+
313
+ Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
314
+ website's file storage via the TUS resumable upload protocol (TUS 1.0.0). Send
315
+ `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request below.
316
+
317
+ 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers
318
+ `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`.
319
+ 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or
320
+ `PATCH` requests with an `upload-offset` header tracking progress) until complete.
321
+
322
+ `relative_file_path` is the destination path inside the website's file storage, e.g.
323
+ `app.zip`.
324
+
325
+ Instead of a TUS client, plain `curl` also works:
326
+ ```
327
+ FILE=app.zip
328
+ SIZE=$(stat -f%z "$FILE") # stat -c%s on Linux
329
+
330
+ curl -i -X POST "{url}/${FILE}?override=true" \
331
+ -H "X-Auth: {auth_key}" \
332
+ -H "X-Auth-Rest: {rest_auth_key}" \
333
+ -H "Tus-Resumable: 1.0.0" \
334
+ -H "Upload-Length: ${SIZE}" \
335
+ -H "Upload-Offset: 0"
336
+ # -> 201 Created
337
+
338
+ curl -i -X PATCH "{url}/${FILE}?override=true" \
339
+ -H "X-Auth: {auth_key}" \
340
+ -H "X-Auth-Rest: {rest_auth_key}" \
341
+ -H "Tus-Resumable: 1.0.0" \
342
+ -H "Content-Type: application/offset+octet-stream" \
343
+ -H "Upload-Offset: 0" \
344
+ --data-binary "@${FILE}"
345
+ # -> 204 No Content, Upload-Offset response header equals SIZE when done
346
+ ```
347
+ */
348
+ "agency-hosting_generateUploadURLV1": {
349
+ params: {
350
+ /**
351
+ * Agency Plan website UID
352
+ */
353
+ website_uid: string;
354
+ };
355
+ response: any; // Response structure will depend on the API
356
+ };
357
+
309
358
  /**
310
359
  * Imports an Agency Plan website from an already-uploaded archive.
311
360
 
@@ -823,6 +872,51 @@ resources are removed in the background.
823
872
  response: any; // Response structure will depend on the API
824
873
  };
825
874
 
875
+ /**
876
+ * Retrieve a paginated list of Agency Plan websites (H5G, Builder, and Horizons) accessible to
877
+ the authenticated client.
878
+
879
+ This endpoint returns websites from your hosting accounts as well as
880
+ websites from other client hosting accounts that have shared access
881
+ with you.
882
+
883
+ The response shape differs per platform — see the `platform` field on each item.
884
+
885
+ Use `website_types` to list only websites of a given detected type, e.g. only
886
+ WordPress websites (`website_types=wordpress`) or only Node.js websites
887
+ (`website_types=nodejs`). Combine with `order_ids`, `states`, or `domain` for more
888
+ targeted results.
889
+ */
890
+ "agency-hosting_listAgencyPlanWebsitesV1": {
891
+ params: {
892
+ /**
893
+ * Page number
894
+ */
895
+ page?: number;
896
+ /**
897
+ * Number of items per page
898
+ */
899
+ per_page?: number;
900
+ /**
901
+ * Filter by order IDs. Accepts a comma-separated list.
902
+ */
903
+ order_ids?: array;
904
+ /**
905
+ * Filter by website state. Accepts a comma-separated list.
906
+ */
907
+ states?: array;
908
+ /**
909
+ * Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list.
910
+ */
911
+ website_types?: array;
912
+ /**
913
+ * Filter by domain name (case-insensitive substring match)
914
+ */
915
+ domain?: string;
916
+ };
917
+ response: any; // Response structure will depend on the API
918
+ };
919
+
826
920
  /**
827
921
  * Lists active and recently completed asynchronous processes for an Agency Plan website.
828
922
 
@@ -2611,7 +2705,7 @@ Use the domain and is_assigned filters to find databases assigned to a specific
2611
2705
  */
2612
2706
  per_page?: number;
2613
2707
  /**
2614
- * Filter by domain name (exact match)
2708
+ * Filter by domain name (case-insensitive substring match)
2615
2709
  */
2616
2710
  domain?: string;
2617
2711
  /**
@@ -2977,6 +3071,59 @@ Skip this verification when using Hostinger's free subdomains (*.hostingersite.c
2977
3071
  response: any; // Response structure will depend on the API
2978
3072
  };
2979
3073
 
3074
+ /**
3075
+ * Generate a file browser upload URL with authentication credentials
3076
+ for uploading files directly to a website's file storage.
3077
+
3078
+ Returns `url`, `auth_key` and `rest_auth_key`. Use these to upload a file to the
3079
+ website's `public_html` directory via the TUS resumable upload protocol (TUS 1.0.0).
3080
+ Send `X-Auth: {auth_key}` and `X-Auth-Rest: {rest_auth_key}` headers on every request
3081
+ below.
3082
+
3083
+ 1. Create the upload: `POST` to `{url}/{relative_file_path}?override=true` with headers
3084
+ `upload-length: {file size in bytes}` and `upload-offset: 0`. Expect `201 Created`.
3085
+ 2. Upload the file: send the file bytes to the same location (any TUS 1.0.0 client, or
3086
+ `PATCH` requests with an `upload-offset` header tracking progress) until complete.
3087
+
3088
+ `relative_file_path` is the destination path inside `public_html`, e.g. `app.zip`.
3089
+
3090
+ Instead of a TUS client, plain `curl` also works:
3091
+ ```
3092
+ FILE=app.zip
3093
+ SIZE=$(stat -f%z "$FILE") # stat -c%s on Linux
3094
+
3095
+ curl -i -X POST "{url}/${FILE}?override=true" \
3096
+ -H "X-Auth: {auth_key}" \
3097
+ -H "X-Auth-Rest: {rest_auth_key}" \
3098
+ -H "Tus-Resumable: 1.0.0" \
3099
+ -H "Upload-Length: ${SIZE}" \
3100
+ -H "Upload-Offset: 0"
3101
+ # -> 201 Created
3102
+
3103
+ curl -i -X PATCH "{url}/${FILE}?override=true" \
3104
+ -H "X-Auth: {auth_key}" \
3105
+ -H "X-Auth-Rest: {rest_auth_key}" \
3106
+ -H "Tus-Resumable: 1.0.0" \
3107
+ -H "Content-Type: application/offset+octet-stream" \
3108
+ -H "Upload-Offset: 0" \
3109
+ --data-binary "@${FILE}"
3110
+ # -> 204 No Content, Upload-Offset response header equals SIZE when done
3111
+ ```
3112
+ */
3113
+ "hosting_generateUploadURLV1": {
3114
+ params: {
3115
+ /**
3116
+ * Account username
3117
+ */
3118
+ username: string;
3119
+ /**
3120
+ * Website domain
3121
+ */
3122
+ domain: string;
3123
+ };
3124
+ response: any; // Response structure will depend on the API
3125
+ };
3126
+
2980
3127
  /**
2981
3128
  * List files and directories under a website's document root.
2982
3129
 
@@ -3082,9 +3229,79 @@ Use the `uuid` from a build to poll its output via the `Get Node.js Build Logs`
3082
3229
  response: any; // Response structure will depend on the API
3083
3230
  };
3084
3231
 
3232
+ /**
3233
+ * Start a Node.js build process using files already present on the website's file storage.
3234
+
3235
+ WARNING: on success this overwrites the website's existing contents and cannot be
3236
+ undone — verify this is intended before calling this endpoint.
3237
+
3238
+ The `source_type` must be `archive` and `source_options.archive_path` must point to an
3239
+ existing archive file on the server (relative to the website document root).
3240
+ Use the `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
3241
+
3242
+ To auto-detect build settings from an archive before starting, first call the
3243
+ `Get Node.js Build Settings from Archive` endpoint. To upload an archive and start
3244
+ a build in one step, use the `Create Node.js Build from Archive` endpoint instead.
3245
+
3246
+ The returned build `uuid` can be used to poll progress and retrieve logs via
3247
+ the `Get Node.js Build Logs` endpoint.
3248
+ */
3249
+ "hosting_startNode_jsBuildV1": {
3250
+ params: {
3251
+ /**
3252
+ * username parameter
3253
+ */
3254
+ username: string;
3255
+ /**
3256
+ * Domain name
3257
+ */
3258
+ domain: string;
3259
+ /**
3260
+ * Node.js version
3261
+ */
3262
+ node_version: number;
3263
+ /**
3264
+ * Node.js application type
3265
+ */
3266
+ app_type: string;
3267
+ /**
3268
+ * Application root directory (where package.json is located) relative to public_html
3269
+ */
3270
+ root_directory: string;
3271
+ /**
3272
+ * Build output directory relative to the root directory
3273
+ */
3274
+ output_directory: string;
3275
+ /**
3276
+ * Build script that will be ran to build the application
3277
+ */
3278
+ build_script: string;
3279
+ /**
3280
+ * The main entry point file for the application
3281
+ */
3282
+ entry_file?: string;
3283
+ /**
3284
+ * Package manager
3285
+ */
3286
+ package_manager?: string;
3287
+ /**
3288
+ * The source type of the files
3289
+ */
3290
+ source_type: string;
3291
+ /**
3292
+ * Source-specific options
3293
+ */
3294
+ source_options: object;
3295
+ };
3296
+ response: any; // Response structure will depend on the API
3297
+ };
3298
+
3085
3299
  /**
3086
3300
  * Upload a project archive, auto-detect build settings, and immediately start a Node.js build.
3087
3301
 
3302
+ WARNING: on success this overwrites the website's existing contents and cannot be
3303
+ undone — verify this is intended before calling this endpoint.
3304
+
3088
3305
  This is the recommended single-step approach for deploying a Node.js application.
3089
3306
  The archive is uploaded to the website's file storage, build settings are auto-detected
3090
3307
  from the package.json inside the archive, and the build process starts automatically.
@@ -3150,6 +3367,36 @@ the `Get Node.js Build Logs` endpoint.
3150
3367
  response: any; // Response structure will depend on the API
3151
3368
  };
3152
3369
 
3370
+ /**
3371
+ * Auto-detect Node.js build settings from a package.json inside an archive already on the server.
3372
+
3373
+ Use this before calling `Start Node.js Build` to preview what settings will be used,
3374
+ or to let the user review and override values (framework, node version, root directory,
3375
+ output directory, build script) before committing to a build.
3376
+
3377
+ The archive must already be present on the website's file storage. Use the
3378
+ `Generate Upload URL` endpoint to obtain credentials and upload the archive first.
3379
+ To upload an archive and start a build in one step without inspecting settings first,
3380
+ use the `Create Node.js Build from Archive` endpoint instead.
3381
+ */
3382
+ "hosting_getNode_jsBuildSettingsFromArchiveV1": {
3383
+ params: {
3384
+ /**
3385
+ * username parameter
3386
+ */
3387
+ username: string;
3388
+ /**
3389
+ * Domain name
3390
+ */
3391
+ domain: string;
3392
+ /**
3393
+ * The path to the archive file relative to the document root of the vhost
3394
+ */
3395
+ archive_path: string;
3396
+ };
3397
+ response: any; // Response structure will depend on the API
3398
+ };
3399
+
3153
3400
  /**
3154
3401
  * Retrieve logs from a specific Node.js build process.
3155
3402
 
@@ -3526,8 +3773,11 @@ website detected on the underlying platform (`wordpress`, `builder`,
3526
3773
  `vhost_type`, `username`, and `root_directory`, only apply to
3527
3774
  CloudLinux websites and are null for other platforms.
3528
3775
 
3529
- Use the available query parameters to filter results by username,
3530
- order ID, enabled status, or domain name for more targeted results.
3776
+ Use `website_types` to list only websites of a given detected type, e.g. only
3777
+ WordPress websites (`website_types=wordpress`) or only Node.js websites
3778
+ (`website_types=nodejs`). Combine with the other available query parameters to
3779
+ filter by username, order ID, enabled status, or domain name for more targeted
3780
+ results.
3531
3781
  */
3532
3782
  "hosting_listWebsitesV1": {
3533
3783
  params: {
@@ -3552,9 +3802,13 @@ order ID, enabled status, or domain name for more targeted results.
3552
3802
  */
3553
3803
  is_enabled?: boolean;
3554
3804
  /**
3555
- * Filter by domain name (exact match)
3805
+ * Filter by domain name (case-insensitive substring match)
3556
3806
  */
3557
3807
  domain?: string;
3808
+ /**
3809
+ * Filter by detected website type, e.g. wordpress,nodejs. Accepts a comma-separated list.
3810
+ */
3811
+ website_types?: array;
3558
3812
  };
3559
3813
  response: any; // Response structure will depend on the API
3560
3814
  };
@@ -3590,6 +3844,38 @@ websites list endpoint to see when your new website becomes available.
3590
3844
  response: any; // Response structure will depend on the API
3591
3845
  };
3592
3846
 
3847
+ /**
3848
+ * Deploy a static application from an archive file.
3849
+
3850
+ WARNING: this overwrites the website's existing contents and cannot be undone —
3851
+ verify this is intended before calling this endpoint.
3852
+
3853
+ This endpoint allows you to deploy a static application from an archive
3854
+ file that has been uploaded to the website's directory.
3855
+
3856
+ This only works for static sites (pre-built HTML/CSS/JS with no build step). For
3857
+ Node.js applications, use `Create NodeJS build from archive` instead, or
3858
+ `Start Node.js build` if the archive is already uploaded. For WordPress sites,
3859
+ use `Import WordPress website`.
3860
+ */
3861
+ "hosting_deployStaticSiteArchiveV1": {
3862
+ params: {
3863
+ /**
3864
+ * username parameter
3865
+ */
3866
+ username: string;
3867
+ /**
3868
+ * Domain name
3869
+ */
3870
+ domain: string;
3871
+ /**
3872
+ * Relative path to the archive file from website root directory
3873
+ */
3874
+ archive_path: string;
3875
+ };
3876
+ response: any; // Response structure will depend on the API
3877
+ };
3878
+
3593
3879
  /**
3594
3880
  * This endpoint permanently removes a website and all of its data. This action
3595
3881
  cannot be undone. Before calling it, make sure the user understands the
@@ -7129,6 +7415,37 @@ detected installations once the scan completes.
7129
7415
  response: any; // Response structure will depend on the API
7130
7416
  };
7131
7417
 
7418
+ /**
7419
+ * Import WordPress website to the specified domain.
7420
+
7421
+ WARNING: this overwrites the website's existing contents and cannot be undone —
7422
+ verify this is intended before calling this endpoint.
7423
+
7424
+ This endpoint allows you to import a WordPress website from archive and
7425
+ database files that have been uploaded to the website's directory.
7426
+ */
7427
+ "hosting_importWordPressWebsiteV1": {
7428
+ params: {
7429
+ /**
7430
+ * username parameter
7431
+ */
7432
+ username: string;
7433
+ /**
7434
+ * Domain name
7435
+ */
7436
+ domain: string;
7437
+ /**
7438
+ * Path to the WordPress archive file (relative to website root)
7439
+ */
7440
+ archive_path: string;
7441
+ /**
7442
+ * Path to the database SQL file (relative to website root)
7443
+ */
7444
+ sql_path: string;
7445
+ };
7446
+ response: any; // Response structure will depend on the API
7447
+ };
7448
+
7132
7449
  /**
7133
7450
  * Install WordPress on an existing website.
7134
7451
 
@@ -7211,7 +7528,7 @@ Each installation includes a `valid` flag and, when invalid, a
7211
7528
  */
7212
7529
  username?: string;
7213
7530
  /**
7214
- * Filter by domain name (exact match)
7531
+ * Filter by domain name (case-insensitive substring match)
7215
7532
  */
7216
7533
  domain?: string;
7217
7534
  /**
@@ -7521,6 +7838,34 @@ deactivation job has been queued.
7521
7838
  response: any; // Response structure will depend on the API
7522
7839
  };
7523
7840
 
7841
+ /**
7842
+ * Deploy a WordPress plugin from an already uploaded directory.
7843
+
7844
+ This endpoint allows you to deploy a WordPress plugin that has been uploaded to the website's directory.
7845
+ The plugin will be activated and made available in the WordPress admin panel.
7846
+ */
7847
+ "hosting_deployWordPressPluginV1": {
7848
+ params: {
7849
+ /**
7850
+ * username parameter
7851
+ */
7852
+ username: string;
7853
+ /**
7854
+ * Domain name
7855
+ */
7856
+ domain: string;
7857
+ /**
7858
+ * Slug of the plugin
7859
+ */
7860
+ slug: string;
7861
+ /**
7862
+ * Relative path to the plugin directory from wp-content/plugins
7863
+ */
7864
+ plugin_path: string;
7865
+ };
7866
+ response: any; // Response structure will depend on the API
7867
+ };
7868
+
7524
7869
  /**
7525
7870
  * Install one or more plugins on an existing WordPress installation.
7526
7871
 
@@ -7635,7 +7980,7 @@ domain. Optionally filter by domain to scope the check.
7635
7980
  "hosting_checkIfWooCommerceIsInstalledV1": {
7636
7981
  params: {
7637
7982
  /**
7638
- * Filter by domain name (exact match)
7983
+ * Filter by domain name (case-insensitive substring match)
7639
7984
  */
7640
7985
  domain?: string;
7641
7986
  };
@@ -7751,6 +8096,38 @@ job has been queued.
7751
8096
  response: any; // Response structure will depend on the API
7752
8097
  };
7753
8098
 
8099
+ /**
8100
+ * Deploy a WordPress theme from an already uploaded directory.
8101
+
8102
+ This endpoint allows you to deploy a WordPress theme that has been uploaded to the website's directory.
8103
+ The theme can be optionally activated after deployment.
8104
+ */
8105
+ "hosting_deployWordPressThemeV1": {
8106
+ params: {
8107
+ /**
8108
+ * username parameter
8109
+ */
8110
+ username: string;
8111
+ /**
8112
+ * Domain name
8113
+ */
8114
+ domain: string;
8115
+ /**
8116
+ * Slug of the theme
8117
+ */
8118
+ slug: string;
8119
+ /**
8120
+ * Relative path to the theme directory from wp-content/themes
8121
+ */
8122
+ theme_path: string;
8123
+ /**
8124
+ * Whether to activate the theme after deployment
8125
+ */
8126
+ is_activated?: boolean;
8127
+ };
8128
+ response: any; // Response structure will depend on the API
8129
+ };
8130
+
7754
8131
  /**
7755
8132
  * Install a theme on an existing WordPress installation.
7756
8133