---
title: "Import kDrive"
method: POST
path: "/2/drive/{drive_id}/imports/kdrive"
tags: ["Drive > Files > External import"]
---

# Import kDrive

`POST /2/drive/{drive_id}/imports/kdrive`

Import the content of a kDrive

## Path parameters

- `drive_id` integer, required

## Request body

- object
  - `application_drive_id` string, required — Id of the kDrive containing the content to import
  - `directory_id` integer, required — Destination directory identifier
  - `source_path` string — Path of the folder to import, if different from the root

## Response `200`

OK

- object
  - `result` 'success' | 'error' | 'asynchronous', required — Result of the HTTP request
  - `data` 91ac10ffExternalImport[]
    - `id` integer, required — External import identifier
    - `application` 'dropbox' | 'kdrive' | 'kdrive_sharelink' | 'onedrive', required — Service from which the import originates.<note><strong>dropbox</strong>: Import from Dropbox.</note><note><strong>kdrive</strong>: Import from another kDrive.</note><note><strong>kdrive_sharelink</strong>: Import from a kDrive sharelink.</note><note><strong>onedrive</strong>: Import from Microsoft OneDrive.</note>
    - `account_name` string, required — Account imported
    - `status` 'canceled' | 'canceling' | 'done' | 'failed' | 'in_progress' | 'queued' | 'waiting', required — External import status.<note><strong>canceled</strong>: External import was canceled.</note><note><strong>canceling</strong>: External import is being canceled.</note><note><strong>done</strong>: External import is finished.</note><note><strong>failed</strong>: External import failed.</note><note><strong>in_progress</strong>: External import is currently in progress.</note><note><strong>queued</strong>: External import is waiting for a process to handle it.</note><note><strong>waiting</strong>: External import has not started yet.</note>
    - `error_code` string — Give an error code if the failed reason is known.
    - `path` string, required — Import path destination
    - `directory_id` integer, nullable, required — Import directory identifier destination (if was not deleted)
    - `has_shared_files` string, required — Import application has shared files
    - `created_at` integer, required — Timestamp `External Import` was created at
    - `updated_at` integer, required — Timestamp `External Import` was updated at
    - `count_success_files` integer, required — Number of successfully imported files
    - `count_failed_files` integer, required — Number of failed imported files

## Other responses

- `400` — Bad Request
- `403` — Forbidden
- `422` — Unprocessable Entity
- `503` — Service Unavailable

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/667aae28fec6/schema)
