Documents

Create a document

Changed on

This method allows you to create or publish a new document. By default a document is set to the collection root. If you want to create a nested/child document, you should pass parentDocumentId to set the parent document.

post/documents.create

Request

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

idstring uuid

Optional identifier for the document

titlestring
textstring

The body of the document in markdown

iconstring

Icon displayed alongside the document title

colorstring nullable

Color for the document icon (hex format)

collectionIdstring nullable

Identifier for the collection. Required to publish unless parentDocumentId is provided. Pass the literal string personal to create the document in the authenticated user's personal collection.

parentDocumentIdstring uuid nullable

Identifier for the parent document. Required to publish unless collectionId is provided

templateIdstring uuid
publishboolean

Whether this document should be immediately published and made visible to other workspace members.

fullWidthboolean

Whether the document should be displayed in full width

createdAtstring date-time

Optionally set the created date in the past

Example request

{
  "title": "Welcome to Acme Inc"
}

Response

OK

Example response

{
  "data": {
    "title": "Welcome to Acme Inc",
    "icon": "🎉",
    "text": "…",
    "urlId": "hDYep1TPAM",
    "createdBy": {
      "name": "Jane Doe"
    },
    "updatedBy": {
      "name": "Jane Doe"
    },
    "deletedBy": {
      "name": "Jane Doe"
    }
  },
  "policies": [
    {
      "abilities": {
        "read": true,
        "update": true,
        "delete": false
      }
    }
  ]
}

Changes

    • info

      added the optional property / to the response with the status

    • info

      response property data/url deprecated

    • info

      the request property format was generalized from uuid to no format