---
title: "Import issues"
method: POST
path: "/repositories/{workspace}/{repo_slug}/issues/import"
tags: ["Issue tracker"]
deprecated: true
---

# Import issues

`POST /repositories/{workspace}/{repo_slug}/issues/import`

> **Deprecated.**

A POST request to this endpoint will import the zip file given by the archive parameter into the repository. All
existing issues will be deleted and replaced by the contents of the imported zip file.

Imports are done through a multipart/form-data POST. There is one valid and required form field, with the name
"archive," which needs to be a file field:

```
$ curl -u <username> -X POST -F archive=@/path/to/file.zip https://api.bitbucket.org/2.0/repositories/<owner_username>/<repo_slug>/issues/import
```

## Response `202`

Import job accepted

- IssueJobStatus — The status of an import or export job
  - `type` string
  - `status` 'ACCEPTED' | 'STARTED' | 'RUNNING' | 'FAILURE' — The status of the import/export job
  - `phase` string — The phase of the import/export job
  - `total` integer — The total number of issues being imported/exported
  - `count` integer — The total number of issues already imported/exported
  - `pct` number — The percentage of issues already imported/exported

## Other responses

- `401` — The request wasn't authenticated properly
- `403` — When the authenticated user does not have admin permission on the repo
- `404` — No export job has begun
- `409` — Import already running

---

[API](https://skmtc.net/atlassian/apis/bitbucket-api.md) · [All operations](https://skmtc.net/atlassian/apis/bitbucket-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/atlassian/bitbucket-api/versions/8c7911c0a910/schema)
