Collections

Create a collection

Changed on

Create a new collection with the specified name, description, icon, color, and permission settings. Collections are used to organize documents.

post/collections.create

Request

  • Base URL
    https://app.getoutline.com/api
  • URL
    https://app.getoutline.com/api/collections.create
  • 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

namestring required
descriptionstring

A brief description of the collection, markdown supported. Only one of description or data may be provided.

dataobject

The collection description as a rich-text ProseMirror JSON document. Only one of description or data may be provided.

permission'read' | 'read_write'
iconstring

A string that represents an icon in the outline-icons package or an emoji

colorstring

A hex color code for the collection icon

sharingboolean

Whether public sharing of documents is allowed

Example request

{
  "name": "Human Resources",
  "description": "HR documentation is confidential and should be handled with care.",
  "color": "#123123"
}

Response

OK

Example response

{
  "data": {
    "urlId": "hDYep1TPAM",
    "name": "Human Resources",
    "index": "P",
    "color": "#123123",
    "archivedBy": {
      "name": "Jane Doe"
    }
  },
  "policies": [
    {
      "abilities": {
        "read": true,
        "update": true,
        "delete": false
      }
    }
  ]
}

Changes

    • info

      added the optional property / to the response with the status

    • warning

      the request property's maxLength was set to 100000

    • warning

      the request property's maxLength was set to 100