Documents

Add a new document

Add a new data object to the given <strong>{parentId}</strong>. <br> The <strong>{parentId}</strong> must be an ID of a folder or another data object. See the full description of request fields with the schema <strong>DocumentAdd</strong>

post/pimcore-studio/api/documents/add/{parentId}

Request

  • Base URL: / (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /pimcore-studio/api/documents/add/{parentId}
  • Auth: none declared

Path parameters

parentIdinteger required
Example:83

ParentId of the document

Request body

keystring required

Key

typestring required

Type

titlestring nullable required

Title

navigationNamestring nullable required

Navigation name

docTypeIdstring nullable required

Document type ID

templatestring nullable required

Document template

translationsSourceIdinteger nullable required

Id of the base document for new translation

languagestring nullable required

Document language when adding a translation

inheritanceSourceIdinteger nullable required

Id of the base document for content

Example request

{
  "key": "my_new_document",
  "type": "page",
  "title": "Some page title",
  "navigationName": "Some navigation name",
  "docTypeId": "page",
  "template": "default",
  "translationsSourceId": 33,
  "language": "en",
  "inheritanceSourceId": 33
}

Response

ID of added document

idinteger required

ID of created document element

Example response

{
  "id": 66
}

Changes

No recorded changes to this operation across all 2 revisions of this API.