Add new page

This method allows you to create a new page within your knowledge base.

URL

/api/v2/knowledge/add_page

Access

Only account tokens are permitted to access this method.

Supported Parameters

  • kb - the ID of the knowledge base you wish to add a page to (required)
  • path - the path to the parent page you wish to insert the page into (optional, will insert at the root if blank and parent_id is blank)
  • parent_id - the ID of the page to place the new page within (optional)
  • title - the title for your new page (required)
  • content - the raw content for your new page (required)
  • permalink - the permalink for the new page (optional, will be generated from the title if not included). This must only include letters, numbers and hyphens.

Returned Data

Details about your newly created page with a 201 Created status will be returned if the page was created successfully. If the page is not created successfully, you will receive an array of errors with a 422 Unprocessable Entity status.

Example JSON

{
  "id": 15,
  "title": "New API Page",
  "permalink": "api-page",
  "full_permalink": "api-page",
  "position": 1,
  "content": "My new content :)",
  "user": null,
  "created_at": "2012-01-26T11:30:46+00:00",
  "updated_at": "2012-01-26T11:30:46+00:00"
}

Proudly powered by Katapult. Running on 100% renewable energy.