Documents

Duplicate a document

Changed on

This method allows you to duplicate an existing document and optionally all of its child documents.

post/documents.duplicate

Request

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

Unique identifier for the document. Either the UUID or the urlId is acceptable.

titlestring

New title for the duplicated document

recursiveboolean

Whether child documents should also be duplicated

publishboolean

Whether the new document should be published

collectionIdstring uuid

Identifier for the collection the document should be copied to

parentDocumentIdstring uuid

Identifier for the parent document the document should be copied to

Response

OK

Example response

{
  "data": {
    "documents": [
      {
        "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/documents/items/url deprecated

    • warning

      the request property's maxLength was set to 100