Collections

Import documents into a new collection

Changed on

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.

post/collections.import

Request

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

Request body

attachmentIdstring 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

OK

Example response

{
  "data": {
    "fileOperation": {
      "type": "export",
      "format": "outline-markdown",
      "state": "complete",
      "size": "2048",
      "user": {
        "name": "Jane Doe"
      }
    }
  }
}

Changes