Templates

Create a template

Changed on

Create a new template that can be used as a starting point for new documents. Templates can optionally be scoped to a specific collection.

post/templates.create

Request

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

Optionally provide a specific UUID for the template.

titlestring

The title of the template. Required when publishing.

dataobject

The body of the template as a Prosemirror document. Required when publishing.

iconstring nullable

An emoji to use as the template icon.

colorstring nullable

The color of the template icon in hex format.

collectionIdstring uuid

Identifier for the collection to which the template belongs.

publishboolean

Whether the template is available to other members. Set to false to create a draft that is only visible to its creator.

Response

OK

Example response

{
  "data": {
    "createdBy": {
      "name": "Jane Doe"
    },
    "updatedBy": {
      "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

      added the new optional request property

    • info

      the request property became optional

    • info

      the request property became optional

    • info

      the request property's minLength was decreased from 1 to 0