---
title: "Import documents into a new collection"
method: POST
path: "/collections.import"
tags: ["Collections"]
---

# Import documents into a new collection

`POST /collections.import`

## Request

- Base URL: `https://app.getoutline.com/api`
- URL: `https://app.getoutline.com/api/collections.import`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `https://app.getoutline.com/oauth/authorize`
    - Token URL: `https://app.getoutline.com/oauth/token` scopes: `read`, `write`

Import a file that was previously uploaded through `attachments.create` and create a new collection from its contents. The endpoint returns a `FileOperation` that can be queried to track the progress of the import.

## Request body

- object
  - `attachmentId` string, uuid, required: Identifier for the attachment that contains the file to import.
  - `format` 'outline-markdown' | 'json': The format of the file being imported.
  - `permission` 'read' | 'read_write'

## Response `200`

OK

- object
  - `data` object
    - `fileOperation` FileOperation
      - `id` string, uuid: Unique identifier for the object.
      - `type` 'import' | 'export': The type of file operation.
      - `format` string: The file format of the resulting file.
      - `name` string: The name of the file operation, derived from the collection name, document title, or file name.
      - `state` 'creating' | 'uploading' | 'complete' | 'error' | 'expired': The state of the file operation.
      - `error` string, nullable: An error message if the file operation failed.
      - `size` string: The size of the resulting file in bytes. Returned as a string as the value may exceed the safe integer range.
      - `collectionId` string, uuid, nullable: Identifier for the associated collection, if the file operation is scoped to a single collection.
      - `documentId` string, uuid, nullable: Identifier for the associated document, if the file operation is scoped to a single document.
      - `user` User
        - `id` string, uuid: Unique identifier for the object.
        - `name` string: The name of this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if necessary.
        - `avatarUrl` string, uri: The URL for the image associated with this user, it will be displayed in the application UI and email notifications.
        - `color` string: A color representing the user, used in the UI for avatars without an image.
        - `email` string, email: The email associated with this user, it is migrated from Slack or Google Workspace when the SSO connection is made but can be changed if necessary.
        - `role` 'admin' | 'member' | 'viewer' | 'guest'
        - `isSuspended` boolean: Whether this user has been suspended.
        - `lastActiveAt` string, date-time, nullable: The last time this user made an API request, this value is updated at most every 5 minutes.
        - `timezone` string, nullable: The timezone this user has registered.
        - `createdAt` string, date-time: The date and time that this user first signed in or was invited as a guest.
        - `updatedAt` string, date-time: The date and time that this user was last updated.
        - `deletedAt` string, date-time, nullable: The date and time that this user was deleted, if applicable.
        - `invitedBy` User (recursive)
      - `createdAt` string, date-time: The date and time that this object was created
      - `updatedAt` string, date-time: The date and time that this object was last changed

## Other responses

- `400`: The request failed one or more validations.
- `401`: The API key is missing or otherwise invalid.
- `403`: The current API key is not authorized to perform this action.
- `404`: The specified resource was not found.
- `429`: The request was rate limited.

## Changes

- **2026-09-05** `6287bce7caad`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/defaulr/apis/outline-api/changes/collections.import/post.md)

---

[API](https://skmtc.dev/defaulr/apis/outline-api.md) - [All operations](https://skmtc.dev/defaulr/apis/outline-api/llms.txt) - [OpenAPI document](https://skmtc.dev/defaulr/apis/outline-api/revisions/5ddf01ffba84?raw)
