---
title: "Import website from archive"
method: POST
path: "/api/agency-hosting/v1/websites/{website_uid}/files/import-archive"
tags: ["Agency Hosting: Files"]
---

# Import website from archive

`POST /api/agency-hosting/v1/websites/{website_uid}/files/import-archive`

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

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

## Path parameters

- `website_uid` string, required

## Request body

- AgencyHostingV1FilesImportArchiveRequest — Import a website from an already-uploaded archive
  - `archive_name` string, required — Archive filename (e.g., archive.zip). The file must already be uploaded to the website's .h5g/ directory.

## Response `200`

Success empty response

- CommonSuccessEmptyResource
  - `message` string

## Other responses

- `401` — Unauthenticated response
- `422` — Validation error response
- `500` — Error response

## Changes

- **2026-08-13** `5a5a54ce5eb4` — 1 info
  - api operation id `agency-hosting_importAgencyPlanWebsiteFromArchiveV1` removed and replaced with `agency-hosting_importWebsiteFromArchiveV1`
- **2026-07-14** `516829646d3c` — 1 info
  - endpoint added
- **2026-06-09** `d05574986eb1` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/hostinger/apis/hostinger-api/changes/api/agency-hosting/v1/websites/:website_uid/files/import-archive/post.md)

---

[API](https://skmtc.dev/hostinger/apis/hostinger-api.md) · [All operations](https://skmtc.dev/hostinger/apis/hostinger-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hostinger/hostinger-api/revisions/260abb16cd9b/schema)
