{"getting-started-guide":"<h2 class=\"list-heading text-capitals mb-l\">Getting Started<\/h2>\n\n<p class=\"mb-none\">\n    This documentation covers use of the REST API. <br>\n    Examples of API usage, in a variety of programming languages, can be found in the <a href=\"https:\/\/codeberg.org\/bookstack\/api-scripts\" target=\"_blank\" rel=\"noopener noreferrer\">BookStack api-scripts repo on Codeberg<\/a>.\n\n    <br> <br>\n    Some alternative options for extension and customization can be found below:\n<\/p>\n\n<ul>\n    <li>\n        <a href=\"https:\/\/docs.fab-access.org\/settings\/webhooks\" target=\"_blank\" rel=\"noopener noreferrer\">Webhooks<\/a> -\n        HTTP POST calls upon events occurring in BookStack.\n    <\/li>\n    <li>\n        <a href=\"https:\/\/codeberg.org\/bookstack\/bookstack\/src\/branch\/development\/dev\/docs\/visual-theme-system.md\" target=\"_blank\" rel=\"noopener noreferrer\">Visual Theme System<\/a> -\n        Methods to override views, translations and icons within BookStack.\n    <\/li>\n    <li>\n        <a href=\"https:\/\/codeberg.org\/bookstack\/bookstack\/src\/branch\/development\/dev\/docs\/logical-theme-system.md\" target=\"_blank\" rel=\"noopener noreferrer\">Logical Theme System<\/a> -\n        Methods to extend back-end functionality within BookStack.\n    <\/li>\n<\/ul>\n\n<hr>\n\n<h5 id=\"authentication\" class=\"text-mono mb-m\">Authentication<\/h5>\n<p>\n    To access the API a user has to have the <em>\"Access System API\"<\/em> permission enabled on one of their assigned roles.\n    Permissions to content accessed via the API is limited by the roles & permissions assigned to the user that's used to access the API.\n<\/p>\n<p>Authentication to use the API is primarily done using API Tokens. Once the <em>\"Access System API\"<\/em> permission has been assigned to a user, a \"API Tokens\" section should be visible when editing their user profile. Choose \"Create Token\" and enter an appropriate name and expiry date, relevant for your API usage then press \"Save\". A \"Token ID\" and \"Token Secret\" will be immediately displayed. These values should be used as a header in API HTTP requests in the following format:<\/p>\n<pre><code class=\"language-css\">Authorization: Token &lt;token_id&gt;:&lt;token_secret&gt;<\/code><\/pre>\n<p>Here's an example of an authorized cURL request to list books in the system:<\/p>\n<pre><code class=\"language-shell\">curl --request GET \\\n  --url https:\/\/example.com\/api\/books \\\n  --header 'Authorization: Token C6mdvEQTGnebsmVn3sFNeeuelGEBjyQp:NOvD3VlzuSVuBPNaf1xWHmy7nIRlaj22'<\/code><\/pre>\n<p>If already logged into the system within the browser, via a user account with permission to access the API, the system will also accept an existing session meaning you can browse API endpoints directly in the browser or use the browser devtools to play with the API.<\/p>\n\n<hr>\n\n<h5 id=\"request-format\" class=\"text-mono mb-m\">Request Format<\/h5>\n\n<p>\n    For endpoints in this documentation that accept data a \"Body Parameters\" table will be available to show the parameters that are accepted in the request.\n    Any rules for the values of such parameters, such as the data-type or if they're required, will be shown alongside the parameter name.\n<\/p>\n\n<p>\n    The API can accept request data in the following <code>Content-Type<\/code> formats:\n<\/p>\n\n<ul>\n    <li>application\/json<\/li>\n    <li>application\/x-www-form-urlencoded*<\/li>\n    <li>multipart\/form-data*<\/li>\n<\/ul>\n\n<p>\n    <em>\n        * Form requests currently only work for POST requests due to how PHP handles request data.\n        If you need to use these formats for PUT or DELETE requests you can work around this limitation by\n        using a POST request and providing a \"_method\" parameter with the value equal to\n        <code>PUT<\/code> or <code>DELETE<\/code>.\n    <\/em>\n<\/p>\n\n<p>\n    <em>\n        * Form requests can accept boolean (<code>true<\/code>\/<code>false<\/code>) values via a <code>1<\/code> or <code>0<\/code>.\n    <\/em>\n<\/p>\n\n<p>\n    Regardless of format chosen, ensure you set a <code>Content-Type<\/code> header on requests so that the system can correctly parse your request data.\n    The API is primarily designed to be interfaced using JSON, since responses are always in JSON format, hence examples in this documentation will be shown as JSON.\n    Some endpoints, such as those that receive file data, may require the use of <code>multipart\/form-data<\/code>. This will be mentioned within the description for such endpoints.\n<\/p>\n\n<p>\n    Some data may be expected in a more complex nested structure such as a nested object or array.\n    These can be sent in non-JSON request formats using square brackets to denote index keys or property names.\n    Below is an example of a JSON request body data and it's equivalent x-www-form-urlencoded representation.\n<\/p>\n\n<p><strong>JSON<\/strong><\/p>\n\n<pre><code class=\"language-json\">{\n  \"name\": \"My new item\",\n  \"locked\": true,\n  \"books\": [105, 263],\n  \"tags\": [{\"name\": \"Tag Name\", \"value\": \"Tag Value\"}],\n}<\/code><\/pre>\n\n<p><strong>x-www-form-urlencoded<\/strong><\/p>\n\n<pre><code class=\"language-text\">name=My%20new%20item&locked=1&books%5B0%5D=105&books%5B1%5D=263&tags%5B0%5D%5Bname%5D=Tag%20Name&tags%5B0%5D%5Bvalue%5D=Tag%20Value<\/code><\/pre>\n\n<p><strong>x-www-form-urlencoded (Decoded for readability)<\/strong><\/p>\n\n<pre><code class=\"language-text\">name=My new item\nlocked=1\nbooks[0]=105\nbooks[1]=263\ntags[0][name]=Tag Name\ntags[0][value]=Tag Value<\/code><\/pre>\n\n<hr>\n\n<h5 id=\"listing-endpoints\" class=\"text-mono mb-m\">Listing Endpoints<\/h5>\n<p>Some endpoints will return a list of data models. These endpoints will return an array of the model data under a <code>data<\/code> property along with a numeric <code>total<\/code> property to indicate the total number of records found for the query within the system. Here's an example of a listing response:<\/p>\n<pre><code class=\"language-json\">{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"BookStack User Guide\",\n      \"slug\": \"bookstack-user-guide\",\n      \"description\": \"This is a general guide on using BookStack on a day-to-day basis.\",\n      \"created_at\": \"2019-05-05 21:48:46\",\n      \"updated_at\": \"2019-12-11 20:57:31\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"image_id\": 3\n    }\n  ],\n  \"total\": 16\n}<\/code><\/pre>\n<p>\n    There are a number of standard URL parameters that can be supplied to manipulate and page through the results returned from a listing endpoint:\n<\/p>\n<table class=\"table\">\n    <tr>\n        <th width=\"110\">Parameter<\/th>\n        <th>Details<\/th>\n        <th width=\"30%\">Examples<\/th>\n    <\/tr>\n    <tr>\n        <td>count<\/td>\n        <td>\n            Specify how many records will be returned in the response. <br>\n            (Default: 100, Max: 500)\n        <\/td>\n        <td>Limit the count to 50<br><code>?count=50<\/code><\/td>\n    <\/tr>\n    <tr>\n        <td>offset<\/td>\n        <td>\n            Specify how many records to skip over in the response. <br>\n            (Default: 0)\n        <\/td>\n        <td>Skip over the first 100 records<br><code>?offset=100<\/code><\/td>\n    <\/tr>\n    <tr>\n        <td>sort<\/td>\n        <td>\n            Specify what field is used to sort the data and the direction of the sort (Ascending or Descending).<br>\n            Value is the name of a field, A <code>+<\/code> or <code>-<\/code> prefix dictates ordering. <br>\n            Direction defaults to ascending. <br>\n            Can use most fields shown in the response.\n        <\/td>\n        <td>\n            Sort by name ascending<br><code>?sort=+name<\/code> <br> <br>\n            Sort by \"Created At\" date descending<br><code>?sort=-created_at<\/code>\n        <\/td>\n    <\/tr>\n    <tr>\n        <td>filter[&lt;field&gt;]<\/td>\n        <td>\n            Specify a filter to be applied to the query. Can use most fields shown in the response. <br>\n            By default a filter will apply a \"where equals\" query but the below operations are available using the format filter[&lt;field&gt;:&lt;operation&gt;] <br>\n            <table>\n                <tr>\n                    <td>eq<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> equals the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>ne<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> does not equal the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>gt<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> is greater than the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>lt<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> is less than the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>gte<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> is greater than or equal to the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>lte<\/td>\n                    <td>Where <code>&lt;field&gt;<\/code> is less than or equal to the filter value.<\/td>\n                <\/tr>\n                <tr>\n                    <td>like<\/td>\n                    <td>\n                        Where <code>&lt;field&gt;<\/code> is \"like\" the filter value. <br>\n                        <code>%<\/code> symbols can be used as wildcards.\n                    <\/td>\n                <\/tr>\n            <\/table>\n        <\/td>\n        <td>\n            Filter where id is 5: <br><code>?filter[id]=5<\/code><br><br>\n            Filter where id is not 5: <br><code>?filter[id:ne]=5<\/code><br><br>\n            Filter where name contains \"cat\": <br><code>?filter[name:like]=%cat%<\/code><br><br>\n            Filter where created after 2020-01-01: <br><code>?filter[created_at:gt]=2020-01-01<\/code>\n        <\/td>\n    <\/tr>\n<\/table>\n\n<hr>\n\n<h5 id=\"error-handling\" class=\"text-mono mb-m\">Error Handling<\/h5>\n<p>\n    Successful responses will return a 200 or 204 HTTP response code. Errors will return a 4xx or a 5xx HTTP response code depending on the type of error. Errors follow a standard format as shown below. The message provided may be translated depending on the configured language of the system in addition to the API users' language preference. The code provided in the JSON response will match the HTTP response code.\n<\/p>\n\n<pre><code class=\"language-json\">{\n\t\"error\": {\n\t\t\"code\": 401,\n\t\t\"message\": \"No authorization token found on the request\"\n\t}\n}\n<\/code><\/pre>\n\n<hr>\n\n<h5 id=\"rate-limits\" class=\"text-mono mb-m\">Rate Limits<\/h5>\n<p>\n    The API has built-in per-user rate-limiting to prevent potential abuse using the API.\n    By default, this is set to 180 requests per minute but this can be changed by an administrator\n    by setting an \"API_REQUESTS_PER_MIN\" .env option like so:\n<\/p>\n\n<pre><code class=\"language-bash\"># The number of API requests that can be made per minute by a single user.\nAPI_REQUESTS_PER_MIN=180<\/code><\/pre>\n\n<p>\n    When the limit is reached you will receive a 429 \"Too Many Attempts.\" error response.\n    It's generally good practice to limit requests made from your API client, where possible, to avoid\n    affecting normal use of the system caused by over-consuming system resources.\n    Keep in mind there may be other rate-limiting factors such as web-server & firewall controls.\n<\/p>\n\n<hr>\n\n<h5 id=\"content-security\" class=\"text-mono mb-m\">Content Security<\/h5>\n<p>\n    Many of the available endpoints will return content that has been provided by user input.\n    Some of this content may be provided in a certain data-format (Such as HTML or Markdown for page content).\n    Such content is not guaranteed to be safe so keep security in mind when dealing with such user-input.\n    In some cases, the system will apply some filtering to content in an attempt to prevent certain vulnerabilities, but\n    this is not assured to be a bullet-proof defence.\n<\/p>\n<p>\n    Within its own interfaces, unless disabled, the system makes use of Content Security Policy (CSP) rules to heavily negate\n    cross-site scripting vulnerabilities from user content. If displaying user content externally, it's advised you\n    also use defences such as CSP or the disabling of JavaScript completely.\n<\/p>","docs":[{"name":"docs-display","uri":"api\/docs","method":"GET","controller":"BookStack\\Api\\ApiDocsController","controller_method":"display","controller_method_kebab":"display","base_model":"docs","description":"Load the docs page for the API.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"docs-download","uri":"api\/docs\/download","method":"GET","controller":"BookStack\\Api\\ApiDocsController","controller_method":"download","controller_method_kebab":"download","base_model":"docs","description":"Download the API docs as a cleaner HTML file or as JSON with embedded HTML guidance. Provide a ?format=json query parameter to download as JSON.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"docs-json","uri":"api\/docs.json","method":"GET","controller":"BookStack\\Api\\ApiDocsController","controller_method":"json","controller_method_kebab":"json","base_model":"docs","description":"Show a JSON view of the API docs data.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"pages":[{"name":"pages-list","uri":"api\/pages","method":"GET","controller":"BookStack\\Entities\\Controllers\\PageApiController","controller_method":"list","controller_method_kebab":"list","base_model":"pages","description":"Get a listing of pages visible to the user.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 1,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"How to create page content\",\n\t\t\t\"slug\": \"how-to-create-page-content\",\n\t\t\t\"priority\": 0,\n\t\t\t\"draft\": false,\n\t\t\t\"revision_count\": 3,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:49:58.000000Z\",\n\t\t\t\"updated_at\": \"2020-07-04T15:50:58.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1,\n\t\t\t\"editor\": \"wysiwyg\",\n\t\t\t\"book_slug\": \"example-book\"\n\t\t},\n\t\t{\n\t\t\t\"id\": 2,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"How to use images\",\n\t\t\t\"slug\": \"how-to-use-images\",\n\t\t\t\"priority\": 2,\n\t\t\t\"draft\": false,\n\t\t\t\"revision_count\": 3,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:53:30.000000Z\",\n\t\t\t\"updated_at\": \"2019-06-06T12:03:04.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1,\n\t\t\t\"editor\": \"wysiwyg\",\n\t\t\t\"book_slug\": \"example-book\"\n\t\t},\n\t\t{\n\t\t\t\"id\": 3,\n\t\t\t\"book_id\": 1,\n\t\t\t\"chapter_id\": 1,\n\t\t\t\"name\": \"Drawings via draw.io\",\n\t\t\t\"slug\": \"drawings-via-drawio\",\n\t\t\t\"priority\": 3,\n\t\t\t\"draft\": false,\n\t\t\t\"revision_count\": 3,\n\t\t\t\"template\": false,\n\t\t\t\"created_at\": \"2019-05-05T21:53:49.000000Z\",\n\t\t\t\"updated_at\": \"2019-12-18T21:56:52.000000Z\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"owned_by\": 1,\n\t\t\t\"editor\": \"wysiwyg\",\n\t\t\t\"book_slug\": \"example-book\"\n\t\t}\n\t],\n\t\"total\": 322\n}"},{"name":"pages-create","uri":"api\/pages","method":"POST","controller":"BookStack\\Entities\\Controllers\\PageApiController","controller_method":"create","controller_method_kebab":"create","base_model":"pages","description":"Create a new page in the system.\nThe ID of a parent book or chapter is required to indicate where this page should be located.\nAny HTML content provided should be kept to a single-block depth of plain HTML elements to remain compatible with the BookStack front-end and editors. Any images included via base64 data URIs will be extracted and saved as gallery images against the page during upload.","body_params":{"book_id":["required_without:chapter_id","integer"],"chapter_id":["required_without:book_id","integer"],"name":["required","string","max:255"],"html":["required_without:markdown","string"],"markdown":["required_without:html","string"],"tags":["array"],"priority":["integer"],"changelog":["string","min:1","max:180"]},"model_description":null,"example_request":"{\n\t\"book_id\": 1,\n\t\"name\": \"My API Page\",\n\t\"html\": \"<p>my new API page<\/p>\",\n\t\"priority\": 15,\n\t\"tags\": [\n\t\t{\"name\": \"Category\", \"value\": \"Not Bad Content\"},\n\t\t{\"name\": \"Rating\", \"value\": \"Average\"}\n\t]\n}\n","example_response":"{\n\t\"id\": 358,\n\t\"book_id\": 1,\n\t\"chapter_id\": null,\n\t\"name\": \"My API Page\",\n\t\"slug\": \"my-api-page\",\n\t\"html\": \"<p id=\\\"bkmrk-my-new-api-page\\\">my new API page<\/p>\",\n\t\"raw_html\": \"<p id=\\\"bkmrk-my-new-api-page\\\">my new API page<\/p>\",\n\t\"priority\": 15,\n\t\"created_at\": \"2020-11-28T15:01:39.000000Z\",\n\t\"updated_at\": \"2020-11-28T15:01:39.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"draft\": false,\n\t\"markdown\": \"\",\n\t\"revision_count\": 1,\n\t\"template\": false,\n\t\"editor\": \"wysiwyg\",\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Not Bad Content\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Rating\",\n\t\t\t\"value\": \"Average\",\n\t\t\t\"order\": 1\n\t\t}\n\t]\n}"},{"name":"pages-read","uri":"api\/pages\/{id}","method":"GET","controller":"BookStack\\Entities\\Controllers\\PageApiController","controller_method":"read","controller_method_kebab":"read","base_model":"pages","description":"View the details of a single page. Pages will always have HTML content. They may have markdown content if the Markdown editor was used to last update the page.\nThe 'html' property is the fully rendered and escaped HTML content that BookStack would show on page view, with page includes handled. The 'raw_html' property is the direct database stored HTML content, which would be what BookStack shows on page edit.\nSee the \"Content Security\" section of these docs for security considerations when using the page content returned from this endpoint.\nComments for the page are provided in a tree-structure representing the hierarchy of top-level comments and replies, for both archived and active comments.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n\t\"id\": 306,\n\t\"book_id\": 1,\n\t\"chapter_id\": null,\n\t\"name\": \"A page written in markdown\",\n\t\"slug\": \"a-page-written-in-markdown\",\n\t\"html\": \"<h1 id=\\\"bkmrk-this-is-my-cool-page\\\">This is my cool page! With some included text<\/h1>\",\n\t\"raw_html\": \"<h1 id=\\\"bkmrk-this-is-my-cool-page\\\">This is my cool page! {{@1#bkmrk-a}}<\/h1>\",\n\t\"priority\": 13,\n\t\"created_at\": \"2020-02-02T21:40:38.000000Z\",\n\t\"updated_at\": \"2020-11-28T14:43:20.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"draft\": false,\n\t\"markdown\": \"# How this is built\\r\\n\\r\\nThis page is written in markdown. BookStack stores the page data in HTML.\\r\\n\\r\\nHere's a cute picture of my cat:\\r\\n\\r\\n[![yXSrubes.jpg](http:\/\/example.com\/uploads\/images\/gallery\/2020-04\/scaled-1680-\/yXSrubes.jpg)](http:\/\/example.com\/uploads\/images\/gallery\/2020-04\/yXSrubes.jpg)\",\n\t\"revision_count\": 5,\n\t\"template\": false,\n\t\"editor\": \"wysiwyg\",\n\t\"comments\": {\n\t\t\"active\": [\n\t\t\t{\n\t\t\t\t\"comment\": {\n\t\t\t\t\t\"id\": 22,\n\t\t\t\t\t\"commentable_id\": 306,\n\t\t\t\t\t\"commentable_type\": \"page\",\n\t\t\t\t\t\"html\": \"<p>Does this need revising?<\\\/p>\\n\",\n\t\t\t\t\t\"parent_id\": null,\n\t\t\t\t\t\"local_id\": 1,\n\t\t\t\t\t\"created_by\": {\n\t\t\t\t\t\t\"id\": 1,\n\t\t\t\t\t\t\"name\": \"Admin\",\n\t\t\t\t\t\t\"slug\": \"admin\"\n\t\t\t\t\t},\n\t\t\t\t\t\"updated_by\": 1,\n\t\t\t\t\t\"created_at\": \"2023-06-07T07:50:56.000000Z\",\n\t\t\t\t\t\"updated_at\": \"2023-06-07T07:50:56.000000Z\",\n\t\t\t\t\t\"content_ref\": \"\",\n\t\t\t\t\t\"archived\": false\n\t\t\t\t},\n\t\t\t\t\"depth\": 0,\n\t\t\t\t\"children\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"comment\": {\n\t\t\t\t\t\t\t\"id\": 34,\n\t\t\t\t\t\t\t\"commentable_id\": 2646,\n\t\t\t\t\t\t\t\"commentable_type\": \"page\",\n\t\t\t\t\t\t\t\"html\": \"<p>I think it's okay!<\\\/p>\\n\",\n\t\t\t\t\t\t\t\"parent_id\": 1,\n\t\t\t\t\t\t\t\"local_id\": 2,\n\t\t\t\t\t\t\t\"created_by\": {\n\t\t\t\t\t\t\t\t\"id\": 2,\n\t\t\t\t\t\t\t\t\"name\": \"Editor\",\n\t\t\t\t\t\t\t\t\"slug\": \"editor\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"updated_by\": 1,\n\t\t\t\t\t\t\t\"created_at\": \"2023-06-07T13:46:25.000000Z\",\n\t\t\t\t\t\t\t\"updated_at\": \"2023-06-07T13:46:25.000000Z\",\n\t\t\t\t\t\t\t\"content_ref\": \"\",\n\t\t\t\t\t\t\t\"archived\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"depth\": 1,\n\t\t\t\t\t\t\"children\": []\n\t\t\t\t\t}\n\t\t\t\t]\n\t\t\t}\n\t\t],\n\t\t\"archived\": [\n\t\t\t{\n\t\t\t\t\"comment\": {\n\t\t\t\t\t\"id\": 21,\n\t\t\t\t\t\"commentable_id\": 2646,\n\t\t\t\t\t\"commentable_type\": \"page\",\n\t\t\t\t\t\"html\": \"<p>The title needs to be fixed<\\\/p>\\n\",\n\t\t\t\t\t\"parent_id\": null,\n\t\t\t\t\t\"local_id\": 3,\n\t\t\t\t\t\"created_by\": {\n\t\t\t\t\t\t\"id\": 2,\n\t\t\t\t\t\t\"name\": \"Editor\",\n\t\t\t\t\t\t\"slug\": \"editor\"\n\t\t\t\t\t},\n\t\t\t\t\t\"updated_by\": 1,\n\t\t\t\t\t\"created_at\": \"2023-06-07T07:50:49.000000Z\",\n\t\t\t\t\t\"updated_at\": \"2025-10-24T08:37:22.000000Z\",\n\t\t\t\t\t\"content_ref\": \"\",\n\t\t\t\t\t\"archived\": true\n\t\t\t\t},\n\t\t\t\t\"depth\": 0,\n\t\t\t\t\"children\": []\n\t\t\t}\n\t\t]\n\t},\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Top Content\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Animal\",\n\t\t\t\"value\": \"Cat\",\n\t\t\t\"order\": 1\n\t\t}\n\t]\n}"},{"name":"pages-update","uri":"api\/pages\/{id}","method":"PUT","controller":"BookStack\\Entities\\Controllers\\PageApiController","controller_method":"update","controller_method_kebab":"update","base_model":"pages","description":"Update the details of a single page.\nSee the 'create' action for details on the provided HTML\/Markdown. Providing a 'book_id' or 'chapter_id' property will essentially move the page into that parent element if you have permissions to do so.","body_params":{"book_id":["integer"],"chapter_id":["integer"],"name":["string","min:1","max:255"],"html":["string"],"markdown":["string"],"tags":["array"],"priority":["integer"],"changelog":["string","min:1","max:180"]},"model_description":null,"example_request":"{\n\t\"chapter_id\": 1,\n\t\"name\": \"My updated API Page\",\n\t\"html\": \"<p>my new API page - Updated<\/p>\",\n\t\"priority\": 16,\n\t\"tags\": [\n\t\t{\"name\": \"Category\", \"value\": \"API Examples\"},\n\t\t{\"name\": \"Rating\", \"value\": \"Alright\"}\n\t]\n}\n","example_response":"{\n\t\"id\": 361,\n\t\"book_id\": 1,\n\t\"chapter_id\": 1,\n\t\"name\": \"My updated API Page\",\n\t\"slug\": \"my-updated-api-page\",\n\t\"html\": \"<p id=\\\"bkmrk-my-new-api-page---up\\\">my new API page - Updated<\/p>\",\n\t\"raw_html\": \"<p id=\\\"bkmrk-my-new-api-page---up\\\">my new API page - Updated<\/p>\",\n\t\"priority\": 16,\n\t\"created_at\": \"2020-11-28T15:10:54.000000Z\",\n\t\"updated_at\": \"2020-11-28T15:13:03.000000Z\",\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"owned_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"draft\": false,\n\t\"markdown\": \"\",\n\t\"revision_count\": 5,\n\t\"template\": false,\n\t\"editor\": \"wysiwyg\",\n\t\"tags\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"API Examples\",\n\t\t\t\"order\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Rating\",\n\t\t\t\"value\": \"Alright\",\n\t\t\t\"order\": 0\n\t\t}\n\t]\n}"},{"name":"pages-delete","uri":"api\/pages\/{id}","method":"DELETE","controller":"BookStack\\Entities\\Controllers\\PageApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"pages","description":"Delete a page. This will typically send the page to the recycle bin.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"pages-export-html","uri":"api\/pages\/{id}\/export\/html","method":"GET","controller":"BookStack\\Exports\\Controllers\\PageExportApiController","controller_method":"exportHtml","controller_method_kebab":"export-html","base_model":"pages","description":"Export a page as a contained HTML file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"pages-export-pdf","uri":"api\/pages\/{id}\/export\/pdf","method":"GET","controller":"BookStack\\Exports\\Controllers\\PageExportApiController","controller_method":"exportPdf","controller_method_kebab":"export-pdf","base_model":"pages","description":"Export a page as a PDF file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"pages-export-plain-text","uri":"api\/pages\/{id}\/export\/plaintext","method":"GET","controller":"BookStack\\Exports\\Controllers\\PageExportApiController","controller_method":"exportPlainText","controller_method_kebab":"export-plain-text","base_model":"pages","description":"Export a page as a plain text file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"pages-export-markdown","uri":"api\/pages\/{id}\/export\/markdown","method":"GET","controller":"BookStack\\Exports\\Controllers\\PageExportApiController","controller_method":"exportMarkdown","controller_method_kebab":"export-markdown","base_model":"pages","description":"Export a page as a markdown file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"pages-export-zip","uri":"api\/pages\/{id}\/export\/zip","method":"GET","controller":"BookStack\\Exports\\Controllers\\PageExportApiController","controller_method":"exportZip","controller_method_kebab":"export-zip","base_model":"pages","description":"Export a page as a contained ZIP file.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"chapters":[{"name":"chapters-list","uri":"api\/chapters","method":"GET","controller":"BookStack\\Entities\\Controllers\\ChapterApiController","controller_method":"list","controller_method_kebab":"list","base_model":"chapters","description":"Get a listing of chapters visible to the user.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"book_id\": 1,\n      \"name\": \"Content Creation\",\n      \"slug\": \"content-creation\",\n      \"description\": \"How to create documentation on whatever subject you need to write about.\",\n      \"priority\": 3,\n      \"created_at\": \"2019-05-05T21:49:56.000000Z\",\n      \"updated_at\": \"2019-09-28T11:24:23.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"owned_by\": 1,\n      \"book_slug\": \"example-book\"\n    },\n    {\n      \"id\": 2,\n      \"book_id\": 1,\n      \"name\": \"Managing Content\",\n      \"slug\": \"managing-content\",\n      \"description\": \"How to keep things organised and orderly in the system for easier navigation and better user experience.\",\n      \"priority\": 5,\n      \"created_at\": \"2019-05-05T21:58:07.000000Z\",\n      \"updated_at\": \"2019-10-17T15:05:34.000000Z\",\n      \"created_by\": 3,\n      \"updated_by\": 3,\n      \"owned_by\": 3,\n      \"book_slug\": \"example-book\"\n    }\n  ],\n  \"total\": 40\n}"},{"name":"chapters-create","uri":"api\/chapters","method":"POST","controller":"BookStack\\Entities\\Controllers\\ChapterApiController","controller_method":"create","controller_method_kebab":"create","base_model":"chapters","description":"Create a new chapter in the system.","body_params":{"book_id":["required","integer"],"name":["required","string","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"tags":["array"],"priority":["integer"],"default_template_id":["nullable","integer"]},"model_description":null,"example_request":"{\n  \"book_id\": 1,\n  \"name\": \"My fantastic new chapter\",\n  \"description_html\": \"<p>This is a <strong>great new chapter<\/strong> that I've created via the API<\/p>\",\n  \"priority\": 15,\n  \"default_template_id\": 25,\n  \"tags\": [\n    {\"name\": \"Category\", \"value\": \"Top Content\"},\n    {\"name\": \"Rating\", \"value\": \"Highest\"}\n  ]\n}\n","example_response":"{\n  \"id\": 668,\n  \"book_id\": 1,\n  \"slug\": \"my-fantastic-new-chapter\",\n  \"name\": \"My fantastic new chapter\",\n  \"description\": \"This is a great new chapter that I've created via the API\",\n  \"priority\": 15,\n  \"created_at\": \"2023-12-22T14:26:28.000000Z\",\n  \"updated_at\": \"2023-12-22T14:26:28.000000Z\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"owned_by\": 1,\n  \"description_html\": \"<p>This is a <strong>great new chapter<\\\/strong> that I've created via the API<\\\/p>\",\n  \"default_template_id\": 25,\n  \"book_slug\": \"example-book\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Top Content\",\n      \"order\": 0\n    },\n    {\n      \"name\": \"Rating\",\n      \"value\": \"Highest\",\n      \"order\": 0\n    }\n  ]\n}\n"},{"name":"chapters-read","uri":"api\/chapters\/{id}","method":"GET","controller":"BookStack\\Entities\\Controllers\\ChapterApiController","controller_method":"read","controller_method_kebab":"read","base_model":"chapters","description":"View the details of a single chapter.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 1,\n  \"book_id\": 1,\n  \"slug\": \"content-creation\",\n  \"name\": \"Content Creation\",\n  \"description\": \"How to create documentation on whatever subject you need to write about.\",\n  \"description_html\": \"<p>How to create <strong>documentation<\/strong> on whatever subject you need to write about.<\/p>\",\n  \"default_template_id\": 25,\n  \"priority\": 3,\n  \"created_at\": \"2019-05-05T21:49:56.000000Z\",\n  \"updated_at\": \"2019-09-28T11:24:23.000000Z\",\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"owned_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"book_slug\": \"example-book\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Guide\",\n      \"order\": 0\n    }\n  ],\n  \"pages\": [\n    {\n      \"id\": 1,\n      \"book_id\": 1,\n      \"chapter_id\": 1,\n      \"name\": \"How to create page content\",\n      \"slug\": \"how-to-create-page-content\",\n      \"priority\": 0,\n      \"created_at\": \"2019-05-05T21:49:58.000000Z\",\n      \"updated_at\": \"2019-08-26T14:32:59.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"owned_by\": 1,\n      \"draft\": false,\n      \"revision_count\": 2,\n      \"template\": false,\n      \"editor\": \"wysiwyg\",\n      \"book_slug\": \"example-book\"\n    },\n    {\n      \"id\": 7,\n      \"book_id\": 1,\n      \"chapter_id\": 1,\n      \"name\": \"Good book structure\",\n      \"slug\": \"good-book-structure\",\n      \"priority\": 1,\n      \"created_at\": \"2019-05-05T22:01:55.000000Z\",\n      \"updated_at\": \"2019-06-06T12:03:04.000000Z\",\n      \"created_by\": 3,\n      \"updated_by\": 3,\n      \"owned_by\": 1,\n      \"draft\": false,\n      \"revision_count\": 1,\n      \"template\": false,\n      \"editor\": \"wysiwyg\",\n      \"book_slug\": \"example-book\"\n    }\n  ]\n}"},{"name":"chapters-update","uri":"api\/chapters\/{id}","method":"PUT","controller":"BookStack\\Entities\\Controllers\\ChapterApiController","controller_method":"update","controller_method_kebab":"update","base_model":"chapters","description":"Update the details of a single chapter. Providing a 'book_id' property will essentially move the chapter into that parent element if you have permissions to do so.","body_params":{"book_id":["integer"],"name":["string","min:1","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"tags":["array"],"priority":["integer"],"default_template_id":["nullable","integer"]},"model_description":null,"example_request":"{\n  \"book_id\": 1,\n  \"name\": \"My fantastic updated chapter\",\n  \"description_html\": \"<p>This is an <strong>updated chapter<\/strong> that I've altered via the API<\/p>\",\n  \"priority\": 16,\n  \"default_template_id\": 2428,\n  \"tags\": [\n    {\"name\": \"Category\", \"value\": \"Kinda Good Content\"},\n    {\"name\": \"Rating\", \"value\": \"Medium\"}\n  ]\n}\n","example_response":"{\n  \"id\": 668,\n  \"book_id\": 1,\n  \"slug\": \"my-fantastic-updated-chapter\",\n  \"name\": \"My fantastic updated chapter\",\n  \"description\": \"This is an updated chapter that I've altered via the API\",\n  \"priority\": 16,\n  \"created_at\": \"2023-12-22T14:26:28.000000Z\",\n  \"updated_at\": \"2023-12-22T14:27:59.000000Z\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"owned_by\": 1,\n  \"description_html\": \"<p>This is an <strong>updated chapter<\\\/strong> that I've altered via the API<\\\/p>\",\n  \"default_template_id\": 2428,\n  \"book_slug\": \"example-book\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Kinda Good Content\",\n      \"order\": 0\n    },\n    {\n      \"name\": \"Rating\",\n      \"value\": \"Medium\",\n      \"order\": 0\n    }\n  ]\n}\n"},{"name":"chapters-delete","uri":"api\/chapters\/{id}","method":"DELETE","controller":"BookStack\\Entities\\Controllers\\ChapterApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"chapters","description":"Delete a chapter. This will typically send the chapter to the recycle bin.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"chapters-export-html","uri":"api\/chapters\/{id}\/export\/html","method":"GET","controller":"BookStack\\Exports\\Controllers\\ChapterExportApiController","controller_method":"exportHtml","controller_method_kebab":"export-html","base_model":"chapters","description":"Export a chapter as a contained HTML file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"chapters-export-pdf","uri":"api\/chapters\/{id}\/export\/pdf","method":"GET","controller":"BookStack\\Exports\\Controllers\\ChapterExportApiController","controller_method":"exportPdf","controller_method_kebab":"export-pdf","base_model":"chapters","description":"Export a chapter as a PDF file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"chapters-export-plain-text","uri":"api\/chapters\/{id}\/export\/plaintext","method":"GET","controller":"BookStack\\Exports\\Controllers\\ChapterExportApiController","controller_method":"exportPlainText","controller_method_kebab":"export-plain-text","base_model":"chapters","description":"Export a chapter as a plain text file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"chapters-export-markdown","uri":"api\/chapters\/{id}\/export\/markdown","method":"GET","controller":"BookStack\\Exports\\Controllers\\ChapterExportApiController","controller_method":"exportMarkdown","controller_method_kebab":"export-markdown","base_model":"chapters","description":"Export a chapter as a markdown file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"chapters-export-zip","uri":"api\/chapters\/{id}\/export\/zip","method":"GET","controller":"BookStack\\Exports\\Controllers\\ChapterExportApiController","controller_method":"exportZip","controller_method_kebab":"export-zip","base_model":"chapters","description":"Export a chapter as a contained ZIP file.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"books":[{"name":"books-list","uri":"api\/books","method":"GET","controller":"BookStack\\Entities\\Controllers\\BookApiController","controller_method":"list","controller_method_kebab":"list","base_model":"books","description":"Get a listing of books visible to the user.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"BookStack User Guide\",\n      \"slug\": \"bookstack-user-guide\",\n      \"description\": \"This is a general guide on using BookStack on a day-to-day basis.\",\n      \"created_at\": \"2019-05-05T21:48:46.000000Z\",\n      \"updated_at\": \"2019-12-11T20:57:31.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"owned_by\": 1,\n      \"cover\": null\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Inventore inventore quia voluptatem.\",\n      \"slug\": \"inventore-inventore-quia-voluptatem\",\n      \"description\": \"Veniam nihil voluptas enim laborum corporis quos sint. Ab rerum voluptas ut iste voluptas magni quibusdam ut. Amet omnis enim voluptate neque facilis.\",\n      \"created_at\": \"2019-05-05T22:10:14.000000Z\",\n      \"updated_at\": \"2019-12-11T20:57:23.000000Z\",\n      \"created_by\": 4,\n      \"updated_by\": 3,\n      \"owned_by\": 3,\n      \"cover\": {\n        \"id\": 11,\n        \"name\": \"cat_banner.jpg\",\n        \"url\": \"https:\/\/example.com\/uploads\/images\/cover_book\/2021-10\/cat-banner.jpg\"\n      }\n    }\n  ],\n  \"total\": 14\n}"},{"name":"books-create","uri":"api\/books","method":"POST","controller":"BookStack\\Entities\\Controllers\\BookApiController","controller_method":"create","controller_method_kebab":"create","base_model":"books","description":"Create a new book in the system. The cover image of a book can be set by sending a file via an 'image' property within a 'multipart\/form-data' request. If the 'image' property is null then the book cover image will be removed. ","body_params":{"name":["required","string","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"tags":["array"],"image":["nullable","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"],"default_template_id":["nullable","integer"]},"model_description":null,"example_request":"{\n  \"name\": \"My own book\",\n  \"description_html\": \"<p>This is <strong>my<\/strong> own little book created via the API<\/p>\",\n  \"default_template_id\": 2427,\n  \"tags\": [\n    {\"name\": \"Category\", \"value\": \"Top Content\"},\n    {\"name\": \"Rating\", \"value\": \"Highest\"}\n  ]\n}","example_response":"{\n  \"id\": 226,\n  \"name\": \"My own book\",\n  \"slug\": \"my-own-book\",\n  \"description\": \"This is my own little book created via the API\",\n  \"created_at\": \"2023-12-22T14:22:28.000000Z\",\n  \"updated_at\": \"2023-12-22T14:22:28.000000Z\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"owned_by\": 1,\n  \"default_template_id\": 2427,\n  \"description_html\": \"<p>This is <strong>my<\\\/strong> own little book created via the API<\\\/p>\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Top Content\",\n      \"order\": 0\n    },\n    {\n      \"name\": \"Rating\",\n      \"value\": \"Highest\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": null\n}"},{"name":"books-read","uri":"api\/books\/{id}","method":"GET","controller":"BookStack\\Entities\\Controllers\\BookApiController","controller_method":"read","controller_method_kebab":"read","base_model":"books","description":"View the details of a single book. The response data will contain a 'content' property listing the chapter and pages directly within, in the same structure as you'd see within the BookStack interface when viewing a book. Top-level contents will have a 'type' property to distinguish between pages and chapters.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 16,\n  \"name\": \"My own book\",\n  \"slug\": \"my-own-book\",\n  \"description\": \"This is my own little book\",\n  \"description_html\": \"<p>This is my own <em>little<\/em> book<\/p>\",\n  \"created_at\": \"2020-01-12T14:09:59.000000Z\",\n  \"updated_at\": \"2020-01-12T14:11:51.000000Z\",\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"owned_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"default_template_id\": null,\n  \"contents\": [\n    {\n      \"id\": 50,\n      \"name\": \"Bridge Structures\",\n      \"slug\": \"bridge-structures\",\n      \"book_id\": 16,\n      \"created_at\": \"2021-12-19T15:22:11.000000Z\",\n      \"updated_at\": \"2021-12-21T19:42:29.000000Z\",\n      \"url\": \"https:\/\/example.com\/books\/my-own-book\/chapter\/bridge-structures\",\n      \"type\": \"chapter\",\n      \"pages\": [\n        {\n          \"id\": 42,\n          \"name\": \"Building Bridges\",\n          \"slug\": \"building-bridges\",\n          \"book_id\": 16,\n          \"chapter_id\": 50,\n          \"draft\": false,\n          \"template\": false,\n          \"created_at\": \"2021-12-19T15:22:11.000000Z\",\n          \"updated_at\": \"2022-09-29T13:44:15.000000Z\",\n          \"url\": \"https:\/\/example.com\/books\/my-own-book\/page\/building-bridges\"\n        }\n      ]\n    },\n    {\n      \"id\": 43,\n      \"name\": \"Cool Animals\",\n      \"slug\": \"cool-animals\",\n      \"book_id\": 16,\n      \"chapter_id\": null,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2021-12-19T18:22:11.000000Z\",\n      \"updated_at\": \"2022-07-29T13:44:15.000000Z\",\n      \"url\": \"https:\/\/example.com\/books\/my-own-book\/page\/cool-animals\",\n      \"type\": \"page\"\n    }\n  ],\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Guide\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": {\n    \"id\": 452,\n    \"name\": \"sjovall_m117hUWMu40.jpg\",\n    \"url\": \"https:\/\/example.com\/uploads\/images\/cover_book\/2020-01\/sjovall_m117hUWMu40.jpg\",\n    \"created_at\": \"2020-01-12T14:11:51.000000Z\",\n    \"updated_at\": \"2020-01-12T14:11:51.000000Z\",\n    \"created_by\": 1,\n    \"updated_by\": 1,\n    \"path\": \"\/uploads\/images\/cover_book\/2020-01\/sjovall_m117hUWMu40.jpg\",\n    \"type\": \"cover_book\",\n    \"uploaded_to\": 16\n  },\n  \"shelves\": [\n    {\n      \"id\": 1,\n      \"name\": \"Great reads\",\n      \"slug\": \"great-reads\"\n    },\n    {\n      \"id\": 5,\n      \"name\": \"Personal Books\",\n      \"slug\": \"personal-books\"\n    }\n  ]\n}"},{"name":"books-update","uri":"api\/books\/{id}","method":"PUT","controller":"BookStack\\Entities\\Controllers\\BookApiController","controller_method":"update","controller_method_kebab":"update","base_model":"books","description":"Update the details of a single book. The cover image of a book can be set by sending a file via an 'image' property within a 'multipart\/form-data' request. If the 'image' property is null then the book cover image will be removed. ","body_params":{"name":["string","min:1","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"tags":["array"],"image":["nullable","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"],"default_template_id":["nullable","integer"]},"model_description":null,"example_request":"{\n  \"name\": \"My updated book\",\n  \"description_html\": \"<p>This is my book with <em>updated<\/em> details<\/p>\",\n  \"default_template_id\": 2427,\n  \"tags\": [\n    {\"name\": \"Subject\", \"value\": \"Updates\"}\n  ]\n}","example_response":"{\n  \"id\": 226,\n  \"name\": \"My updated book\",\n  \"slug\": \"my-updated-book\",\n  \"description\": \"This is my book with updated details\",\n  \"created_at\": \"2023-12-22T14:22:28.000000Z\",\n  \"updated_at\": \"2023-12-22T14:24:07.000000Z\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"owned_by\": 1,\n  \"default_template_id\": 2427,\n  \"description_html\": \"<p>This is my book with <em>updated<\\\/em> details<\\\/p>\",\n  \"tags\": [\n    {\n      \"name\": \"Subject\",\n      \"value\": \"Updates\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": null\n}"},{"name":"books-delete","uri":"api\/books\/{id}","method":"DELETE","controller":"BookStack\\Entities\\Controllers\\BookApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"books","description":"Delete a single book. This will typically send the book to the recycle bin. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"books-export-html","uri":"api\/books\/{id}\/export\/html","method":"GET","controller":"BookStack\\Exports\\Controllers\\BookExportApiController","controller_method":"exportHtml","controller_method_kebab":"export-html","base_model":"books","description":"Export a book as a contained HTML file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"books-export-pdf","uri":"api\/books\/{id}\/export\/pdf","method":"GET","controller":"BookStack\\Exports\\Controllers\\BookExportApiController","controller_method":"exportPdf","controller_method_kebab":"export-pdf","base_model":"books","description":"Export a book as a PDF file. ","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"books-export-plain-text","uri":"api\/books\/{id}\/export\/plaintext","method":"GET","controller":"BookStack\\Exports\\Controllers\\BookExportApiController","controller_method":"exportPlainText","controller_method_kebab":"export-plain-text","base_model":"books","description":"Export a book as a plain text file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"books-export-markdown","uri":"api\/books\/{id}\/export\/markdown","method":"GET","controller":"BookStack\\Exports\\Controllers\\BookExportApiController","controller_method":"exportMarkdown","controller_method_kebab":"export-markdown","base_model":"books","description":"Export a book as a markdown file.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"books-export-zip","uri":"api\/books\/{id}\/export\/zip","method":"GET","controller":"BookStack\\Exports\\Controllers\\BookExportApiController","controller_method":"exportZip","controller_method_kebab":"export-zip","base_model":"books","description":"Export a book as a contained ZIP export file.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"shelves":[{"name":"shelves-list","uri":"api\/shelves","method":"GET","controller":"BookStack\\Entities\\Controllers\\BookshelfApiController","controller_method":"list","controller_method_kebab":"list","base_model":"shelves","description":"Get a listing of shelves visible to the user.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 8,\n      \"name\": \"Qui qui aspernatur autem molestiae libero necessitatibus molestias.\",\n      \"slug\": \"qui-qui-aspernatur-autem-molestiae-libero-necessitatibus-molestias\",\n      \"description\": \"Enim dolor ut quia error dolores est. Aut distinctio consequuntur non nisi nostrum. Labore cupiditate error labore aliquid provident impedit voluptatibus. Quaerat impedit excepturi eius qui eius voluptatem reiciendis.\",\n      \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n      \"updated_at\": \"2020-04-10T13:00:45.000000Z\",\n      \"created_by\": 4,\n      \"updated_by\": 1,\n      \"owned_by\": 1,\n      \"cover\": {\n        \"id\": 4,\n        \"name\": \"shelf.jpg\",\n        \"url\": \"https:\/\/example.com\/uploads\/images\/cover_bookshelf\/2024-12\/shelf.jpg\"\n      }\n    },\n    {\n      \"id\": 9,\n      \"name\": \"Ipsum aut inventore fuga libero non facilis.\",\n      \"slug\": \"ipsum-aut-inventore-fuga-libero-non-facilis\",\n      \"description\": \"Labore culpa modi perspiciatis harum sit. Maxime non et nam est. Quae ut laboriosam repellendus sunt quisquam. Velit at est perspiciatis nesciunt adipisci nobis illo. Sed possimus odit optio officiis nisi voluptates officiis dolor.\",\n      \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n      \"updated_at\": \"2020-04-10T13:00:58.000000Z\",\n      \"created_by\": 4,\n      \"updated_by\": 1,\n      \"owned_by\": 1,\n      \"cover\": null\n    },\n    {\n      \"id\": 10,\n      \"name\": \"Omnis reiciendis aut molestias sint accusantium.\",\n      \"slug\": \"omnis-reiciendis-aut-molestias-sint-accusantium\",\n      \"description\": \"Qui ea occaecati alias est dolores voluptatem doloribus. Ad reiciendis corporis vero nostrum omnis et. Non doloribus ut eaque ut quos dolores.\",\n      \"created_at\": \"2019-05-05T22:10:16.000000Z\",\n      \"updated_at\": \"2020-04-10T13:00:53.000000Z\",\n      \"created_by\": 4,\n      \"updated_by\": 1,\n      \"owned_by\": 4,\n      \"cover\": null\n    }\n  ],\n  \"total\": 3\n}"},{"name":"shelves-create","uri":"api\/shelves","method":"POST","controller":"BookStack\\Entities\\Controllers\\BookshelfApiController","controller_method":"create","controller_method_kebab":"create","base_model":"shelves","description":"Create a new shelf in the system. An array of books IDs can be provided in the request. These will be added to the shelf in the same order as provided. The cover image of a shelf can be set by sending a file via an 'image' property within a 'multipart\/form-data' request. If the 'image' property is null then the shelf cover image will be removed. ","body_params":{"name":["required","string","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"books":["array"],"tags":["array"],"image":["nullable","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"]},"model_description":null,"example_request":"{\n  \"name\": \"My shelf\",\n  \"description_html\": \"<p>This is <strong>my shelf<\/strong> with some books<\/p>\",\n  \"books\": [5,1,3],\n  \"tags\": [\n    {\"name\": \"Category\", \"value\": \"Learning\"}\n  ]\n}","example_response":"{\n  \"id\": 20,\n  \"name\": \"My shelf\",\n  \"slug\": \"my-shelf\",\n  \"description\": \"This is my shelf with some books\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"created_at\": \"2023-12-22T14:33:52.000000Z\",\n  \"updated_at\": \"2023-12-22T14:33:52.000000Z\",\n  \"owned_by\": 1,\n  \"description_html\": \"<p>This is <strong>my shelf<\\\/strong> with some books<\\\/p>\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Learning\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": null\n}"},{"name":"shelves-read","uri":"api\/shelves\/{id}","method":"GET","controller":"BookStack\\Entities\\Controllers\\BookshelfApiController","controller_method":"read","controller_method_kebab":"read","base_model":"shelves","description":"View the details of a single shelf.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 14,\n  \"name\": \"My shelf\",\n  \"slug\": \"my-shelf\",\n  \"description\": \"This is my shelf with some books\",\n  \"description_html\": \"<p>This is my shelf with some books<\/p>\",\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"owned_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"created_at\": \"2020-04-10T13:24:09.000000Z\",\n  \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Guide\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": {\n    \"id\": 501,\n    \"name\": \"anafrancisconi_Sp04AfFCPNM.jpg\",\n    \"url\": \"http:\/\/bookstack.local\/uploads\/images\/cover_book\/2020-04\/anafrancisconi_Sp04AfFCPNM.jpg\",\n    \"created_at\": \"2020-04-10T13:31:04.000000Z\",\n    \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n    \"created_by\": 1,\n    \"updated_by\": 1,\n    \"path\": \"\/uploads\/images\/cover_book\/2020-04\/anafrancisconi_Sp04AfFCPNM.jpg\",\n    \"type\": \"cover_book\",\n    \"uploaded_to\": 14\n  },\n  \"books\": [\n    {\n      \"id\": 5,\n      \"name\": \"Sint explicabo alias sunt.\",\n      \"slug\": \"jbsQrzuaXe\",\n      \"description\": \"Hic forum est.\",\n      \"created_at\": \"2020-04-10T13:31:04.000000Z\",\n      \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"owned_by\": 1\n    },\n    {\n      \"id\": 1,\n      \"name\": \"BookStack User Guide\",\n      \"slug\": \"bookstack-user-guide\",\n      \"description\": \"The Bookstack User Guide Book.\",\n      \"created_at\": \"2020-04-10T15:30:32.000000Z\",\n      \"updated_at\": \"2020-04-13T09:01:04.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 2,\n      \"owned_by\": 1\n    },\n    {\n      \"id\": 3,\n      \"name\": \"Molestiae doloribus sint velit suscipit dolorem.\",\n      \"slug\": \"H99QxALaoG\",\n      \"description\": \"Lorem ipsum dolor sit amet, consectetur adipiscing elit.\",\n      \"created_at\": \"2020-04-10T13:31:04.000000Z\",\n      \"updated_at\": \"2020-04-10T13:31:04.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"owned_by\": 1\n    }\n  ]\n}"},{"name":"shelves-update","uri":"api\/shelves\/{id}","method":"PUT","controller":"BookStack\\Entities\\Controllers\\BookshelfApiController","controller_method":"update","controller_method_kebab":"update","base_model":"shelves","description":"Update the details of a single shelf. An array of books IDs can be provided in the request. These will be added to the shelf in the same order as provided and overwrite any existing book assignments. The cover image of a shelf can be set by sending a file via an 'image' property within a 'multipart\/form-data' request. If the 'image' property is null then the shelf cover image will be removed. ","body_params":{"name":["string","min:1","max:255"],"description":["string","max:1900"],"description_html":["string","max:2000"],"books":["array"],"tags":["array"],"image":["nullable","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"]},"model_description":null,"example_request":"{\n  \"name\": \"My updated shelf\",\n  \"description_html\": \"<p>This is my <em>updated shelf<\/em> with some books<\/p>\",\n  \"books\": [5,1,3]\n}","example_response":"{\n  \"id\": 20,\n  \"name\": \"My updated shelf\",\n  \"slug\": \"my-updated-shelf\",\n  \"description\": \"This is my updated shelf with some books\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"created_at\": \"2023-12-22T14:33:52.000000Z\",\n  \"updated_at\": \"2023-12-22T14:35:00.000000Z\",\n  \"owned_by\": 1,\n  \"description_html\": \"<p>This is my <em>updated shelf<\\\/em> with some books<\\\/p>\",\n  \"tags\": [\n    {\n      \"name\": \"Category\",\n      \"value\": \"Learning\",\n      \"order\": 0\n    }\n  ],\n  \"cover\": null\n}"},{"name":"shelves-delete","uri":"api\/shelves\/{id}","method":"DELETE","controller":"BookStack\\Entities\\Controllers\\BookshelfApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"shelves","description":"Delete a single shelf. This will typically send the shelf to the recycle bin. ","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"attachments":[{"name":"attachments-list","uri":"api\/attachments","method":"GET","controller":"BookStack\\Uploads\\Controllers\\AttachmentApiController","controller_method":"list","controller_method_kebab":"list","base_model":"attachments","description":"Get a listing of attachments visible to the user. The external property indicates whether the attachment is simply a link. A false value for the external property would indicate a file upload.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 3,\n      \"name\": \"datasheet.pdf\",\n      \"extension\": \"pdf\",\n      \"uploaded_to\": 8,\n      \"external\": false,\n      \"order\": 1,\n      \"created_at\": \"2021-10-11T06:18:49.000000Z\",\n      \"updated_at\": \"2021-10-20T06:31:10.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1\n    },\n    {\n      \"id\": 4,\n      \"name\": \"Cat reference\",\n      \"extension\": \"\",\n      \"uploaded_to\": 9,\n      \"external\": true,\n      \"order\": 1,\n      \"created_at\": \"2021-10-20T06:30:11.000000Z\",\n      \"updated_at\": \"2021-10-20T06:30:11.000000Z\",\n      \"created_by\": 1,\n      \"updated_by\": 1\n    }\n  ],\n  \"total\": 2\n}"},{"name":"attachments-create","uri":"api\/attachments","method":"POST","controller":"BookStack\\Uploads\\Controllers\\AttachmentApiController","controller_method":"create","controller_method_kebab":"create","base_model":"attachments","description":"Create a new attachment in the system. An uploaded_to value must be provided containing an ID of the page that this upload will be related to.\nIf you're uploading a file, the POST data should be provided via a multipart\/form-data type request instead of JSON. ","body_params":{"name":["required","string","min:1","max:255"],"uploaded_to":["required","integer","exists:entities,id,type,\"page\""],"file":["required_without:link","file","max:50000"],"link":["required_without:file","string","min:1","max:2000","safe_url"]},"model_description":null,"example_request":"{\n  \"name\": \"My uploaded attachment\",\n  \"uploaded_to\": 8,\n  \"link\": \"https:\/\/link.example.com\"\n}","example_response":"{\n  \"id\": 5,\n  \"name\": \"My uploaded attachment\",\n  \"extension\": \"\",\n  \"uploaded_to\": 8,\n  \"external\": true,\n  \"order\": 2,\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n  \"updated_at\": \"2021-10-20T06:35:46.000000Z\"\n}"},{"name":"attachments-read","uri":"api\/attachments\/{id}","method":"GET","controller":"BookStack\\Uploads\\Controllers\\AttachmentApiController","controller_method":"read","controller_method_kebab":"read","base_model":"attachments","description":"Get the details and content of a single attachment of the given ID. The attachment link or file content is provided via a 'content' property. For files the content will be base64 encoded. ","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 5,\n  \"name\": \"My link attachment\",\n  \"extension\": \"\",\n  \"uploaded_to\": 4,\n  \"external\": true,\n  \"order\": 2,\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n  \"updated_at\": \"2021-10-20T06:37:11.000000Z\",\n  \"links\": {\n    \"html\": \"<a target=\\\"_blank\\\" href=\\\"https:\/\/bookstack.local\/attachments\/5\\\">My updated attachment<\/a>\",\n    \"markdown\": \"[My updated attachment](https:\/\/bookstack.local\/attachments\/5)\"\n  },\n  \"content\": \"https:\/\/link.example.com\/updated\"\n}"},{"name":"attachments-update","uri":"api\/attachments\/{id}","method":"PUT","controller":"BookStack\\Uploads\\Controllers\\AttachmentApiController","controller_method":"update","controller_method_kebab":"update","base_model":"attachments","description":"Update the details of a single attachment. As per the create endpoint, if a file is being provided as the attachment content, the request should be formatted as a multipart\/form-data request instead of JSON. ","body_params":{"name":["string","min:1","max:255"],"uploaded_to":["integer","exists:entities,id,type,\"page\""],"file":["file","max:50000"],"link":["string","min:1","max:2000","safe_url"]},"model_description":null,"example_request":"{\n  \"name\": \"My updated attachment\",\n  \"uploaded_to\": 4,\n  \"link\": \"https:\/\/link.example.com\/updated\"\n}","example_response":"{\n  \"id\": 5,\n  \"name\": \"My updated attachment\",\n  \"extension\": \"\",\n  \"uploaded_to\": 4,\n  \"external\": true,\n  \"order\": 2,\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"created_at\": \"2021-10-20T06:35:46.000000Z\",\n  \"updated_at\": \"2021-10-20T06:37:11.000000Z\"\n}"},{"name":"attachments-delete","uri":"api\/attachments\/{id}","method":"DELETE","controller":"BookStack\\Uploads\\Controllers\\AttachmentApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"attachments","description":"Delete an attachment of the given ID. ","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"audit-log":[{"name":"audit-log-list","uri":"api\/audit-log","method":"GET","controller":"BookStack\\Activity\\Controllers\\AuditLogApiController","controller_method":"list","controller_method_kebab":"list","base_model":"audit-log","description":"Get a listing of audit log events in the system. The loggable relation fields currently only relates to core content types (page, book, bookshelf, chapter) but this may be used more in the future across other types. Requires permission to manage both users and system settings.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"type\": \"bookshelf_create\",\n      \"detail\": \"\",\n      \"user_id\": 1,\n      \"loggable_id\": 1,\n      \"loggable_type\": \"bookshelf\",\n      \"ip\": \"124.4.x.x\",\n      \"created_at\": \"2021-09-29T12:32:02.000000Z\",\n      \"user\": {\n        \"id\": 1,\n        \"name\": \"Admins\",\n        \"slug\": \"admins\"\n      }\n    },\n    {\n      \"id\": 2,\n      \"type\": \"auth_login\",\n      \"detail\": \"standard; (1) Admin\",\n      \"user_id\": 1,\n      \"loggable_id\": null,\n      \"loggable_type\": null,\n      \"ip\": \"127.0.x.x\",\n      \"created_at\": \"2021-09-29T12:32:04.000000Z\",\n      \"user\": {\n        \"id\": 1,\n        \"name\": \"Admins\",\n        \"slug\": \"admins\"\n      }\n    },\n    {\n      \"id\": 3,\n      \"type\": \"bookshelf_update\",\n      \"detail\": \"\",\n      \"user_id\": 1,\n      \"loggable_id\": 1,\n      \"loggable_type\": \"bookshelf\",\n      \"ip\": \"127.0.x.x\",\n      \"created_at\": \"2021-09-29T12:32:07.000000Z\",\n      \"user\": {\n        \"id\": 1,\n        \"name\": \"Admins\",\n        \"slug\": \"admins\"\n      }\n    },\n    {\n      \"id\": 4,\n      \"type\": \"page_create\",\n      \"detail\": \"\",\n      \"user_id\": 1,\n      \"loggable_id\": 1,\n      \"loggable_type\": \"page\",\n      \"ip\": \"127.0.x.x\",\n      \"created_at\": \"2021-09-29T12:32:13.000000Z\",\n      \"user\": {\n        \"id\": 1,\n        \"name\": \"Admins\",\n        \"slug\": \"admins\"\n      }\n    },\n    {\n      \"id\": 5,\n      \"type\": \"page_update\",\n      \"detail\": \"\",\n      \"user_id\": 1,\n      \"loggable_id\": 1,\n      \"loggable_type\": \"page\",\n      \"ip\": \"127.0.x.x\",\n      \"created_at\": \"2021-09-29T12:37:27.000000Z\",\n      \"user\": {\n        \"id\": 1,\n        \"name\": \"Admins\",\n        \"slug\": \"admins\"\n      }\n    }\n  ],\n  \"total\": 6088\n}"}],"comments":[{"name":"comments-list","uri":"api\/comments","method":"GET","controller":"BookStack\\Activity\\Controllers\\CommentApiController","controller_method":"list","controller_method_kebab":"list","base_model":"comments","description":"Get a listing of comments visible to the user.","body_params":null,"model_description":"The comment data model has a 'local_id' property, which is a unique integer ID scoped to the page which the comment is on. The 'parent_id' is used for replies and refers to the 'local_id' of the parent comment on the same page, not the main globally unique 'id'.\nIf you want to get all comments for a page in a tree-like structure, as reflected in the UI, then that is provided on pages-read API responses.","example_request":null,"example_response":"{\n\t\"data\": [\n\t\t{\n\t\t\t\"id\": 1,\n\t\t\t\"commentable_id\": 2607,\n\t\t\t\"commentable_type\": \"page\",\n\t\t\t\"parent_id\": null,\n\t\t\t\"local_id\": 1,\n\t\t\t\"content_ref\": \"\",\n\t\t\t\"created_by\": 1,\n\t\t\t\"updated_by\": 1,\n\t\t\t\"created_at\": \"2022-04-20T08:43:27.000000Z\",\n\t\t\t\"updated_at\": \"2022-04-20T08:43:27.000000Z\"\n\t\t},\n\t\t{\n\t\t\t\"id\": 18,\n\t\t\t\"commentable_id\": 2607,\n\t\t\t\"commentable_type\": \"page\",\n\t\t\t\"parent_id\": 1,\n\t\t\t\"local_id\": 2,\n\t\t\t\"content_ref\": \"\",\n\t\t\t\"created_by\": 3,\n\t\t\t\"updated_by\": 3,\n\t\t\t\"created_at\": \"2022-11-15T08:12:35.000000Z\",\n\t\t\t\"updated_at\": \"2022-11-15T08:12:35.000000Z\"\n\t\t}\n\t],\n\t\"total\": 88\n}"},{"name":"comments-create","uri":"api\/comments","method":"POST","controller":"BookStack\\Activity\\Controllers\\CommentApiController","controller_method":"create","controller_method_kebab":"create","base_model":"comments","description":"Create a new comment on a page. If commenting as a reply to an existing comment, the 'reply_to' parameter should be provided, set to the 'local_id' of the comment being replied to.","body_params":{"page_id":["required","integer"],"reply_to":["nullable","integer"],"html":["required","string"],"content_ref":["string"]},"model_description":"The comment data model has a 'local_id' property, which is a unique integer ID scoped to the page which the comment is on. The 'parent_id' is used for replies and refers to the 'local_id' of the parent comment on the same page, not the main globally unique 'id'.\nIf you want to get all comments for a page in a tree-like structure, as reflected in the UI, then that is provided on pages-read API responses.","example_request":"{\n\t\"page_id\": 2646,\n\t\"html\": \"<p>Can the title be updated?<\/p>\",\n\t\"content_ref\": \"bkmrk-page-title:7341676876991010:3-14\"\n}","example_response":"{\n\t\"id\": 167,\n\t\"commentable_id\": 2646,\n\t\"commentable_type\": \"page\",\n\t\"parent_id\": null,\n\t\"local_id\": 29,\n\t\"created_by\": 1,\n\t\"updated_by\": 1,\n\t\"created_at\": \"2025-10-24T14:05:41.000000Z\",\n\t\"updated_at\": \"2025-10-24T14:05:41.000000Z\",\n\t\"content_ref\": \"bkmrk-page-title:7341676876991010:3-14\",\n\t\"archived\": false\n}"},{"name":"comments-read","uri":"api\/comments\/{id}","method":"GET","controller":"BookStack\\Activity\\Controllers\\CommentApiController","controller_method":"read","controller_method_kebab":"read","base_model":"comments","description":"Read the details of a single comment, along with its direct replies.","body_params":null,"model_description":"The comment data model has a 'local_id' property, which is a unique integer ID scoped to the page which the comment is on. The 'parent_id' is used for replies and refers to the 'local_id' of the parent comment on the same page, not the main globally unique 'id'.\nIf you want to get all comments for a page in a tree-like structure, as reflected in the UI, then that is provided on pages-read API responses.","example_request":null,"example_response":"{\n\t\"id\": 22,\n\t\"commentable_id\": 2646,\n\t\"commentable_type\": \"page\",\n\t\"html\": \"<p>This page looks great!<\\\/p>\\n\",\n\t\"parent_id\": null,\n\t\"local_id\": 2,\n\t\"created_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"updated_by\": {\n\t\t\"id\": 1,\n\t\t\"name\": \"Admin\",\n\t\t\"slug\": \"admin\"\n\t},\n\t\"created_at\": \"2023-06-07T07:50:56.000000Z\",\n\t\"updated_at\": \"2023-06-07T07:50:56.000000Z\",\n\t\"content_ref\": \"\",\n\t\"archived\": false,\n\t\"replies\": [\n\t\t{\n\t\t\t\"id\": 34,\n\t\t\t\"commentable_id\": 2646,\n\t\t\t\"commentable_type\": \"page\",\n\t\t\t\"html\": \"<p>Thanks for the comment!<\\\/p>\\n\",\n\t\t\t\"parent_id\": 2,\n\t\t\t\"local_id\": 10,\n\t\t\t\"created_by\": 2,\n\t\t\t\"updated_by\": 2,\n\t\t\t\"created_at\": \"2023-06-07T13:46:25.000000Z\",\n\t\t\t\"updated_at\": \"2023-06-07T13:46:25.000000Z\",\n\t\t\t\"content_ref\": \"\",\n\t\t\t\"archived\": false\n\t\t}\n\t]\n}"},{"name":"comments-update","uri":"api\/comments\/{id}","method":"PUT","controller":"BookStack\\Activity\\Controllers\\CommentApiController","controller_method":"update","controller_method_kebab":"update","base_model":"comments","description":"Update the content or archived status of an existing comment.\nOnly provide a new archived status if needing to actively change the archive state. Only top-level comments (non-replies) can be archived or unarchived.","body_params":{"html":["string"],"archived":["boolean"]},"model_description":"The comment data model has a 'local_id' property, which is a unique integer ID scoped to the page which the comment is on. The 'parent_id' is used for replies and refers to the 'local_id' of the parent comment on the same page, not the main globally unique 'id'.\nIf you want to get all comments for a page in a tree-like structure, as reflected in the UI, then that is provided on pages-read API responses.","example_request":"{\n\t\"html\": \"<p>Can this comment be updated??????<\/p>\",\n\t\"archived\": true\n}","example_response":"{\n\t\"id\": 167,\n\t\"commentable_id\": 2646,\n\t\"commentable_type\": \"page\",\n\t\"parent_id\": null,\n\t\"local_id\": 29,\n\t\"created_by\": 1,\n\t\"updated_by\": 1,\n\t\"created_at\": \"2025-10-24T14:05:41.000000Z\",\n\t\"updated_at\": \"2025-10-24T14:09:56.000000Z\",\n\t\"content_ref\": \"bkmrk-page-title:7341676876991010:3-14\",\n\t\"archived\": true\n}"},{"name":"comments-delete","uri":"api\/comments\/{id}","method":"DELETE","controller":"BookStack\\Activity\\Controllers\\CommentApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"comments","description":"Delete a single comment from the system.","body_params":null,"model_description":"The comment data model has a 'local_id' property, which is a unique integer ID scoped to the page which the comment is on. The 'parent_id' is used for replies and refers to the 'local_id' of the parent comment on the same page, not the main globally unique 'id'.\nIf you want to get all comments for a page in a tree-like structure, as reflected in the UI, then that is provided on pages-read API responses.","example_request":null,"example_response":null}],"content-permissions":[{"name":"content-permissions-read","uri":"api\/content-permissions\/{contentType}\/{contentId}","method":"GET","controller":"BookStack\\Permissions\\ContentPermissionApiController","controller_method":"read","controller_method_kebab":"read","base_model":"content-permissions","description":"Read the configured content-level permissions for the item of the given type and ID.\n'contentType' should be one of: page, book, chapter, bookshelf. 'contentId' should be the relevant ID of that item type you'd like to handle permissions for.\nThe permissions shown are those that override the default for just the specified item, they do not show the full evaluated permission for a role, nor do they reflect permissions inherited from other items in the hierarchy. Fallback permission values may be `null` when inheriting is active.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"owner\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"role_permissions\": [\n    {\n      \"role_id\": 2,\n      \"view\": true,\n      \"create\": false,\n      \"update\": true,\n      \"delete\": false,\n      \"role\": {\n        \"id\": 2,\n        \"display_name\": \"Editor\"\n      }\n    },\n    {\n      \"role_id\": 10,\n      \"view\": true,\n      \"create\": true,\n      \"update\": false,\n      \"delete\": false,\n      \"role\": {\n        \"id\": 10,\n        \"display_name\": \"Wizards of the west\"\n      }\n    }\n  ],\n  \"fallback_permissions\": {\n    \"inheriting\": false,\n    \"view\": true,\n    \"create\": false,\n    \"update\": false,\n    \"delete\": false\n  }\n}"},{"name":"content-permissions-update","uri":"api\/content-permissions\/{contentType}\/{contentId}","method":"PUT","controller":"BookStack\\Permissions\\ContentPermissionApiController","controller_method":"update","controller_method_kebab":"update","base_model":"content-permissions","description":"Update the configured content-level permission overrides for the item of the given type and ID. 'contentType' should be one of: page, book, chapter, bookshelf.\n'contentId' should be the relevant ID of that item type you'd like to handle permissions for. Providing an empty `role_permissions` array will remove any existing configured role permissions, so you may want to fetch existing permissions beforehand if just adding\/removing a single item. You should completely omit the `owner_id`, `role_permissions` and\/or the `fallback_permissions` properties from your request data if you don't wish to update details within those categories.","body_params":{"owner_id":["int"],"role_permissions":["array"],"role_permissions.*.role_id":["required","int","exists:roles,id"],"role_permissions.*.view":["required","boolean"],"role_permissions.*.create":["required","boolean"],"role_permissions.*.update":["required","boolean"],"role_permissions.*.delete":["required","boolean"],"fallback_permissions":["nullable"],"fallback_permissions.inheriting":["required_with:fallback_permissions","boolean"],"fallback_permissions.view":["required_if:fallback_permissions.inheriting,false","boolean"],"fallback_permissions.create":["required_if:fallback_permissions.inheriting,false","boolean"],"fallback_permissions.update":["required_if:fallback_permissions.inheriting,false","boolean"],"fallback_permissions.delete":["required_if:fallback_permissions.inheriting,false","boolean"]},"model_description":null,"example_request":"{\n  \"owner_id\": 1,\n  \"role_permissions\": [\n    {\n      \"role_id\": 2,\n      \"view\": true,\n      \"create\": true,\n      \"update\": true,\n      \"delete\": false\n    },\n    {\n      \"role_id\": 3,\n      \"view\": false,\n      \"create\": false,\n      \"update\": false,\n      \"delete\": false\n    }\n  ],\n  \"fallback_permissions\": {\n    \"inheriting\": false,\n    \"view\": true,\n    \"create\": true,\n    \"update\": false,\n    \"delete\": false\n  }\n}","example_response":"{\n  \"owner\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"role_permissions\": [\n    {\n      \"role_id\": 2,\n      \"view\": true,\n      \"create\": true,\n      \"update\": true,\n      \"delete\": false,\n      \"role\": {\n        \"id\": 2,\n        \"display_name\": \"Editor\"\n      }\n    },\n    {\n      \"role_id\": 3,\n      \"view\": false,\n      \"create\": false,\n      \"update\": false,\n      \"delete\": false,\n      \"role\": {\n        \"id\": 3,\n        \"display_name\": \"Viewer\"\n      }\n    }\n  ],\n  \"fallback_permissions\": {\n    \"inheriting\": false,\n    \"view\": true,\n    \"create\": true,\n    \"update\": false,\n    \"delete\": false\n  }\n}"}],"image-gallery":[{"name":"image-gallery-list","uri":"api\/image-gallery","method":"GET","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"list","controller_method_kebab":"list","base_model":"image-gallery","description":"Get a listing of images in the system. Includes gallery (page content) images and drawings. Requires visibility of the page they're originally uploaded to.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"My cat scribbles\",\n      \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-02\\\/scribbles.jpg\",\n      \"path\": \"\\\/uploads\\\/images\\\/gallery\\\/2023-02\\\/scribbles.jpg\",\n      \"type\": \"gallery\",\n      \"uploaded_to\": 1,\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"created_at\": \"2023-02-12T16:34:57.000000Z\",\n      \"updated_at\": \"2023-02-12T16:34:57.000000Z\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Drawing-1.png\",\n      \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/drawio\\\/2023-02\\\/drawing-1.png\",\n      \"path\": \"\\\/uploads\\\/images\\\/drawio\\\/2023-02\\\/drawing-1.png\",\n      \"type\": \"drawio\",\n      \"uploaded_to\": 2,\n      \"created_by\": 2,\n      \"updated_by\": 2,\n      \"created_at\": \"2023-02-12T16:39:19.000000Z\",\n      \"updated_at\": \"2023-02-12T16:39:19.000000Z\"\n    },\n    {\n      \"id\": 8,\n      \"name\": \"beans.jpg\",\n      \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-02\\\/beans.jpg\",\n      \"path\": \"\\\/uploads\\\/images\\\/gallery\\\/2023-02\\\/beans.jpg\",\n      \"type\": \"gallery\",\n      \"uploaded_to\": 6,\n      \"created_by\": 1,\n      \"updated_by\": 1,\n      \"created_at\": \"2023-02-15T19:37:44.000000Z\",\n      \"updated_at\": \"2023-02-15T19:37:44.000000Z\"\n    }\n  ],\n  \"total\": 3\n}"},{"name":"image-gallery-create","uri":"api\/image-gallery","method":"POST","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"create","controller_method_kebab":"create","base_model":"image-gallery","description":"Create a new image in the system.\nSince \"image\" is expected to be a file, this needs to be a 'multipart\/form-data' type request. The provided \"uploaded_to\" should be an existing page ID in the system.\nIf the \"name\" parameter is omitted, the filename of the provided image file will be used instead. The \"type\" parameter should be 'gallery' for page content images, and 'drawio' should only be used when the file is a PNG file with diagrams.net image data embedded within.","body_params":{"type":["required","string","in:gallery,drawio"],"uploaded_to":["required","integer"],"image":["required","file","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"],"name":["string","max:180"]},"model_description":null,"example_request":null,"example_response":"{\n  \"name\": \"cute-cat-image.png\",\n  \"path\": \"\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"type\": \"gallery\",\n  \"uploaded_to\": 1,\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_at\": \"2023-03-15T16:32:09.000000Z\",\n  \"created_at\": \"2023-03-15T16:32:09.000000Z\",\n  \"id\": 618,\n  \"thumbs\": {\n    \"gallery\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/thumbs-150-150\\\/cute-cat-image.png\",\n    \"display\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\"\n  },\n  \"content\": {\n    \"html\": \"<a href=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\\\" target=\\\"_blank\\\"><img src=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\\\" alt=\\\"cute-cat-image.png\\\"><\\\/a>\",\n    \"markdown\": \"![cute-cat-image.png](https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png)\"\n  }\n}"},{"name":"image-gallery-read-data-for-url","uri":"api\/image-gallery\/url\/data","method":"GET","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"readDataForUrl","controller_method_kebab":"read-data-for-url","base_model":"image-gallery","description":"Read the image file data for a single image in the system, using the provided URL to identify the image instead of its ID, which is provided as a \"URL\" query parameter. The returned response will be a stream of image data instead of a JSON response.","body_params":{"url":["required","string","url"]},"model_description":null,"example_request":"GET \/api\/image-gallery\/url\/data?url=https%3A%2F%2Fbookstack.example.com%2Fuploads%2Fimages%2Fgallery%2F2025-10%2Fmy-image.png\n","example_response":null},{"name":"image-gallery-read","uri":"api\/image-gallery\/{id}","method":"GET","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"read","controller_method_kebab":"read","base_model":"image-gallery","description":"View the details of a single image. The \"thumbs\" response property contains links to scaled variants that BookStack may use in its UI. The \"content\" response property provides HTML and Markdown content, in the format that BookStack would typically use by default to add the image in page content, as a convenience. Actual image file data is not provided but can be fetched via the \"url\" response property or by using the \"read-data\" endpoint.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 618,\n  \"name\": \"cute-cat-image.png\",\n  \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"created_at\": \"2023-03-15T16:32:09.000000Z\",\n  \"updated_at\": \"2023-03-15T16:32:09.000000Z\",\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"path\": \"\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"type\": \"gallery\",\n  \"uploaded_to\": 1,\n  \"thumbs\": {\n    \"gallery\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/thumbs-150-150\\\/cute-cat-image.png\",\n    \"display\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\"\n  },\n  \"content\": {\n    \"html\": \"<a href=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\\\" target=\\\"_blank\\\"><img src=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\\\" alt=\\\"cute-cat-image.png\\\"><\\\/a>\",\n    \"markdown\": \"![cute-cat-image.png](https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png)\"\n  }\n}"},{"name":"image-gallery-read-data","uri":"api\/image-gallery\/{id}\/data","method":"GET","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"readData","controller_method_kebab":"read-data","base_model":"image-gallery","description":"Read the image file data for a single image in the system. The returned response will be a stream of image data instead of a JSON response.","body_params":null,"model_description":null,"example_request":null,"example_response":null},{"name":"image-gallery-update","uri":"api\/image-gallery\/{id}","method":"PUT","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"update","controller_method_kebab":"update","base_model":"image-gallery","description":"Update the details of an existing image in the system. Since \"image\" is expected to be a file, this needs to be a 'multipart\/form-data' type request if providing a new image file. Updated image files should be of the same file type as the original image.","body_params":{"name":["string","max:180"],"image":["file","image_extension","mimes:jpeg,png,gif,webp,avif","max:50000"]},"model_description":null,"example_request":"{\n  \"name\": \"My updated image name\"\n}","example_response":"{\n  \"id\": 618,\n  \"name\": \"My updated image name\",\n  \"url\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"created_at\": \"2023-03-15T16:32:09.000000Z\",\n  \"updated_at\": \"2023-03-15T18:31:14.000000Z\",\n  \"created_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"updated_by\": {\n    \"id\": 1,\n    \"name\": \"Admin\",\n    \"slug\": \"admin\"\n  },\n  \"path\": \"\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\",\n  \"type\": \"gallery\",\n  \"uploaded_to\": 1,\n  \"thumbs\": {\n    \"gallery\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/thumbs-150-150\\\/cute-cat-image.png\",\n    \"display\": \"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\"\n  },\n  \"content\": {\n    \"html\": \"<a href=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/cute-cat-image.png\\\" target=\\\"_blank\\\"><img src=\\\"https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png\\\" alt=\\\"My updated image name\\\"><\\\/a>\",\n    \"markdown\": \"![My updated image name](https:\\\/\\\/bookstack.example.com\\\/uploads\\\/images\\\/gallery\\\/2023-03\\\/scaled-1680-\\\/cute-cat-image.png)\"\n  }\n}"},{"name":"image-gallery-delete","uri":"api\/image-gallery\/{id}","method":"DELETE","controller":"BookStack\\Uploads\\Controllers\\ImageGalleryApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"image-gallery","description":"Delete an image from the system. Will also delete thumbnails for the image. Does not check or handle image usage so this could leave pages with broken image references.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"imports":[{"name":"imports-list","uri":"api\/imports","method":"GET","controller":"BookStack\\Exports\\Controllers\\ImportApiController","controller_method":"list","controller_method_kebab":"list","base_model":"imports","description":"List existing ZIP imports visible to the user. Requires permission to import content.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 25,\n      \"name\": \"IT Department\",\n      \"size\": 618462,\n      \"type\": \"book\",\n      \"created_by\": 1,\n      \"created_at\": \"2024-12-20T18:40:38.000000Z\",\n      \"updated_at\": \"2024-12-20T18:40:38.000000Z\"\n    },\n    {\n      \"id\": 27,\n      \"name\": \"Clients\",\n      \"size\": 15364,\n      \"type\": \"chapter\",\n      \"created_by\": 1,\n      \"created_at\": \"2025-03-20T12:41:44.000000Z\",\n      \"updated_at\": \"2025-03-20T12:41:44.000000Z\"\n    }\n  ],\n  \"total\": 2\n}"},{"name":"imports-create","uri":"api\/imports","method":"POST","controller":"BookStack\\Exports\\Controllers\\ImportApiController","controller_method":"create","controller_method_kebab":"create","base_model":"imports","description":"Start a new import from a ZIP file. This does not actually run the import since that is performed via the \"run\" endpoint. This uploads, validates and stores the ZIP file so it's ready to be imported.\nThis \"file\" parameter must be a BookStack-compatible ZIP file, and this must be sent via a 'multipart\/form-data' type request.\nRequires permission to import content.","body_params":{"file":["required","file","max:50000"]},"model_description":null,"example_request":null,"example_response":"{\n  \"type\": \"chapter\",\n  \"name\": \"Pension Providers\",\n  \"created_by\": 1,\n  \"size\": 2757,\n  \"path\": \"uploads\\\/files\\\/imports\\\/ghnxmS3u9QxLWu82.zip\",\n  \"updated_at\": \"2025-07-18T14:50:27.000000Z\",\n  \"created_at\": \"2025-07-18T14:50:27.000000Z\",\n  \"id\": 31\n}"},{"name":"imports-read","uri":"api\/imports\/{id}","method":"GET","controller":"BookStack\\Exports\\Controllers\\ImportApiController","controller_method":"read","controller_method_kebab":"read","base_model":"imports","description":"Read details of a pending ZIP import. The \"details\" property contains high-level metadata regarding the ZIP import content, and the structure of this will change depending on import \"type\". Requires permission to import content.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 25,\n  \"name\": \"IT Department\",\n  \"path\": \"uploads\\\/files\\\/imports\\\/7YOpZ6sGIEbYdRFL.zip\",\n  \"size\": 618462,\n  \"type\": \"book\",\n  \"created_by\": 1,\n  \"created_at\": \"2024-12-20T18:40:38.000000Z\",\n  \"updated_at\": \"2024-12-20T18:40:38.000000Z\",\n  \"details\": {\n    \"id\": 4,\n    \"name\": \"IT Department\",\n    \"chapters\": [\n      {\n        \"id\": 3,\n        \"name\": \"Server Systems\",\n        \"priority\": 1,\n        \"pages\": [\n          {\n            \"id\": 22,\n            \"name\": \"prod-aws-stonehawk\",\n            \"priority\": 0,\n            \"attachments\": [],\n            \"images\": [],\n            \"tags\": []\n          }\n        ],\n        \"tags\": []\n      }\n    ],\n    \"pages\": [\n      {\n        \"id\": 23,\n        \"name\": \"Member Onboarding Guide\",\n        \"priority\": 0,\n        \"attachments\": [],\n        \"images\": [],\n        \"tags\": []\n      },\n      {\n        \"id\": 25,\n        \"name\": \"IT Holiday Party Event\",\n        \"priority\": 2,\n        \"attachments\": [],\n        \"images\": [],\n        \"tags\": []\n      }\n    ],\n    \"tags\": []\n  }\n}"},{"name":"imports-run","uri":"api\/imports\/{id}","method":"POST","controller":"BookStack\\Exports\\Controllers\\ImportApiController","controller_method":"run","controller_method_kebab":"run","base_model":"imports","description":"Run the import process for an uploaded ZIP import. The \"parent_id\" and \"parent_type\" parameters are required when the import type is \"chapter\" or \"page\". On success, this endpoint returns the imported item. Requires permission to import content.","body_params":{"parent_type":["string","in:book,chapter"],"parent_id":["int"]},"model_description":null,"example_request":"{\n  \"parent_type\": \"book\",\n  \"parent_id\": 28\n}","example_response":"{\n  \"id\": 1067,\n  \"book_id\": 28,\n  \"slug\": \"pension-providers\",\n  \"name\": \"Pension Providers\",\n  \"description\": \"Details on the various pension providers that are available\",\n  \"priority\": 7,\n  \"created_at\": \"2025-07-18T14:53:35.000000Z\",\n  \"updated_at\": \"2025-07-18T14:53:36.000000Z\",\n  \"created_by\": 1,\n  \"updated_by\": 1,\n  \"owned_by\": 1,\n  \"default_template_id\": null\n}"},{"name":"imports-delete","uri":"api\/imports\/{id}","method":"DELETE","controller":"BookStack\\Exports\\Controllers\\ImportApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"imports","description":"Delete a pending ZIP import from the system. Requires permission to import content.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"recycle-bin":[{"name":"recycle-bin-list","uri":"api\/recycle-bin","method":"GET","controller":"BookStack\\Entities\\Controllers\\RecycleBinApiController","controller_method":"list","controller_method_kebab":"list","base_model":"recycle-bin","description":"Get a top-level listing of the items in the recycle bin. The \"deletable\" property will reflect the main item deleted. For books and chapters, counts of child pages\/chapters will be loaded within this \"deletable\" data. For chapters & pages, the parent item will be loaded within this \"deletable\" data. Requires permission to manage both system settings and permissions.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 18,\n      \"deleted_by\": 1,\n      \"created_at\": \"2022-04-20T12:57:46.000000Z\",\n      \"updated_at\": \"2022-04-20T12:57:46.000000Z\",\n      \"deletable_type\": \"page\",\n      \"deletable_id\": 2582,\n      \"deletable\": {\n        \"id\": 2582,\n        \"book_id\": 25,\n        \"chapter_id\": null,\n        \"name\": \"A Wonderful Page\",\n        \"slug\": \"a-wonderful-page\",\n        \"priority\": 9,\n        \"created_at\": \"2022-02-08T00:44:45.000000Z\",\n        \"updated_at\": \"2022-04-20T12:57:46.000000Z\",\n        \"created_by\": 1,\n        \"updated_by\": 1,\n        \"draft\": false,\n        \"revision_count\": 1,\n        \"template\": false,\n        \"owned_by\": 1,\n        \"editor\": \"wysiwyg\",\n        \"book_slug\": \"a-great-book\",\n        \"parent\": {\n          \"id\": 25,\n          \"name\": \"A Great Book\",\n          \"slug\": \"a-great-book\",\n          \"description\": \"\",\n          \"created_at\": \"2022-01-24T16:14:28.000000Z\",\n          \"updated_at\": \"2022-03-06T15:14:50.000000Z\",\n          \"created_by\": 1,\n          \"updated_by\": 1,\n          \"owned_by\": 1,\n          \"type\": \"book\"\n        }\n      }\n    },\n    {\n      \"id\": 19,\n      \"deleted_by\": 1,\n      \"created_at\": \"2022-04-25T16:07:46.000000Z\",\n      \"updated_at\": \"2022-04-25T16:07:46.000000Z\",\n      \"deletable_type\": \"book\",\n      \"deletable_id\": 13,\n      \"deletable\": {\n        \"id\": 13,\n        \"name\": \"A Big Book!\",\n        \"slug\": \"a-big-book\",\n        \"description\": \"This is a very large book with loads of cool stuff in it!\",\n        \"created_at\": \"2021-11-08T11:26:43.000000Z\",\n        \"updated_at\": \"2022-04-25T16:07:47.000000Z\",\n        \"created_by\": 27,\n        \"updated_by\": 1,\n        \"owned_by\": 1,\n        \"pages_count\": 208,\n        \"chapters_count\": 50\n      }\n    }\n  ],\n  \"total\": 2\n}"},{"name":"recycle-bin-restore","uri":"api\/recycle-bin\/{deletionId}","method":"PUT","controller":"BookStack\\Entities\\Controllers\\RecycleBinApiController","controller_method":"restore","controller_method_kebab":"restore","base_model":"recycle-bin","description":"Restore a single deletion from the recycle bin. Requires permission to manage both system settings and permissions.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"restore_count\": 2\n}"},{"name":"recycle-bin-destroy","uri":"api\/recycle-bin\/{deletionId}","method":"DELETE","controller":"BookStack\\Entities\\Controllers\\RecycleBinApiController","controller_method":"destroy","controller_method_kebab":"destroy","base_model":"recycle-bin","description":"Remove a single deletion from the recycle bin. Use this endpoint carefully as it will entirely remove the underlying deleted items from the system. Requires permission to manage both system settings and permissions.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"delete_count\": 2\n}"}],"roles":[{"name":"roles-list","uri":"api\/roles","method":"GET","controller":"BookStack\\Users\\Controllers\\RoleApiController","controller_method":"list","controller_method_kebab":"list","base_model":"roles","description":"Get a listing of roles in the system. Requires permission to manage roles.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"display_name\": \"Admin\",\n      \"description\": \"Administrator of the whole application\",\n      \"created_at\": \"2021-09-29T16:29:19.000000Z\",\n      \"updated_at\": \"2022-11-03T13:26:18.000000Z\",\n      \"system_name\": \"admin\",\n      \"external_auth_id\": \"wizards\",\n      \"mfa_enforced\": true,\n      \"users_count\": 11,\n      \"permissions_count\": 54\n    },\n    {\n      \"id\": 2,\n      \"display_name\": \"Editor\",\n      \"description\": \"User can edit Books, Chapters & Pages\",\n      \"created_at\": \"2021-09-29T16:29:19.000000Z\",\n      \"updated_at\": \"2022-12-01T02:32:57.000000Z\",\n      \"system_name\": \"\",\n      \"external_auth_id\": \"\",\n      \"mfa_enforced\": false,\n      \"users_count\": 17,\n      \"permissions_count\": 49\n    },\n    {\n      \"id\": 3,\n      \"display_name\": \"Public\",\n      \"description\": \"The role given to public visitors if allowed\",\n      \"created_at\": \"2021-09-29T16:29:19.000000Z\",\n      \"updated_at\": \"2022-09-02T12:32:12.000000Z\",\n      \"system_name\": \"public\",\n      \"external_auth_id\": \"\",\n      \"mfa_enforced\": false,\n      \"users_count\": 1,\n      \"permissions_count\": 2\n    }\n  ],\n  \"total\": 3\n}"},{"name":"roles-create","uri":"api\/roles","method":"POST","controller":"BookStack\\Users\\Controllers\\RoleApiController","controller_method":"create","controller_method_kebab":"create","base_model":"roles","description":"Create a new role in the system. Permissions should be provided as an array of permission name strings. Requires permission to manage roles.","body_params":{"display_name":["required","string","min:3","max:180"],"description":["string","max:180"],"mfa_enforced":["boolean"],"external_auth_id":["string","max:180"],"permissions":["array"],"permissions.*":["string"]},"model_description":null,"example_request":"{\n  \"display_name\": \"Book Maintainer\",\n  \"description\": \"People who maintain books\",\n  \"mfa_enforced\": true,\n  \"permissions\": [\n    \"book-view-all\",\n    \"book-update-all\",\n    \"book-delete-all\",\n    \"restrictions-manage-all\"\n  ]\n}","example_response":"{\n  \"display_name\": \"Book Maintainer\",\n  \"description\": \"People who maintain books\",\n  \"mfa_enforced\": true,\n  \"updated_at\": \"2023-02-19T15:38:40.000000Z\",\n  \"created_at\": \"2023-02-19T15:38:40.000000Z\",\n  \"id\": 26,\n  \"permissions\": [\n    \"book-delete-all\",\n    \"book-update-all\",\n    \"book-view-all\",\n    \"restrictions-manage-all\"\n  ],\n  \"users\": []\n}"},{"name":"roles-read","uri":"api\/roles\/{id}","method":"GET","controller":"BookStack\\Users\\Controllers\\RoleApiController","controller_method":"read","controller_method_kebab":"read","base_model":"roles","description":"View the details of a single role. Provides the permissions and a high-level list of the users assigned. Requires permission to manage roles.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 26,\n  \"display_name\": \"Book Maintainer\",\n  \"description\": \"People who maintain books\",\n  \"created_at\": \"2023-02-19T15:38:40.000000Z\",\n  \"updated_at\": \"2023-02-19T15:38:40.000000Z\",\n  \"system_name\": \"\",\n  \"external_auth_id\": \"\",\n  \"mfa_enforced\": true,\n  \"permissions\": [\n    \"book-delete-all\",\n    \"book-update-all\",\n    \"book-view-all\",\n    \"restrictions-manage-all\"\n  ],\n  \"users\": [\n    {\n      \"id\": 11,\n      \"name\": \"Barry Scott\",\n      \"slug\": \"barry-scott\"\n    }\n  ]\n}"},{"name":"roles-update","uri":"api\/roles\/{id}","method":"PUT","controller":"BookStack\\Users\\Controllers\\RoleApiController","controller_method":"update","controller_method_kebab":"update","base_model":"roles","description":"Update an existing role in the system. Permissions should be provided as an array of permission name strings. An empty \"permissions\" array would clear granted permissions. In many cases, where permissions are changed, you'll want to fetch the existing permissions and then modify before providing in your update request. Requires permission to manage roles.","body_params":{"display_name":["string","min:3","max:180"],"description":["string","max:180"],"mfa_enforced":["boolean"],"external_auth_id":["string","max:180"],"permissions":["array"],"permissions.*":["string"]},"model_description":null,"example_request":"{\n  \"display_name\": \"Book & Shelf Maintainers\",\n  \"description\": \"All those who maintain books & shelves\",\n  \"mfa_enforced\": false,\n  \"permissions\": [\n    \"book-view-all\",\n    \"book-update-all\",\n    \"book-delete-all\",\n    \"bookshelf-view-all\",\n    \"bookshelf-update-all\",\n    \"bookshelf-delete-all\",\n    \"restrictions-manage-all\"\n  ]\n}","example_response":"{\n  \"id\": 26,\n  \"display_name\": \"Book & Shelf Maintainers\",\n  \"description\": \"All those who maintain books & shelves\",\n  \"created_at\": \"2023-02-19T15:38:40.000000Z\",\n  \"updated_at\": \"2023-02-19T15:49:13.000000Z\",\n  \"system_name\": \"\",\n  \"external_auth_id\": \"\",\n  \"mfa_enforced\": false,\n  \"permissions\": [\n    \"book-delete-all\",\n    \"book-update-all\",\n    \"book-view-all\",\n    \"bookshelf-delete-all\",\n    \"bookshelf-update-all\",\n    \"bookshelf-view-all\",\n    \"restrictions-manage-all\"\n  ],\n  \"users\": [\n    {\n      \"id\": 11,\n      \"name\": \"Barry Scott\",\n      \"slug\": \"barry-scott\"\n    }\n  ]\n}"},{"name":"roles-delete","uri":"api\/roles\/{id}","method":"DELETE","controller":"BookStack\\Users\\Controllers\\RoleApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"roles","description":"Delete a role from the system. Requires permission to manage roles.","body_params":null,"model_description":null,"example_request":null,"example_response":null}],"search":[{"name":"search-all","uri":"api\/search","method":"GET","controller":"BookStack\\Search\\SearchApiController","controller_method":"all","controller_method_kebab":"all","base_model":"search","description":"Run a search query against all main content types (shelves, books, chapters & pages) in the system. Takes the same input as the main search bar within the BookStack interface as a 'query' parameter. See https:\/\/www.bookstackapp.com\/docs\/user\/searching\/ for a full list of search term options. Results contain a 'type' property to distinguish between: bookshelf, book, chapter & page.\nThe paging parameters and response format emulates a standard listing endpoint but standard sorting and filtering cannot be done on this endpoint.","body_params":{"query":["required"],"page":["integer","min:1"],"count":["integer","min:1","max:100"]},"model_description":null,"example_request":"GET \/api\/search?query=cats+{created_by:me}&page=1&count=2\n","example_response":"{\n  \"data\": [\n    {\n      \"id\": 84,\n      \"book_id\": 1,\n      \"slug\": \"a-chapter-for-cats\",\n      \"name\": \"A chapter for cats\",\n      \"created_at\": \"2021-11-14T15:57:35.000000Z\",\n      \"updated_at\": \"2021-11-14T15:57:35.000000Z\",\n      \"type\": \"chapter\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/chapter\/a-chapter-for-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"A chapter for <strong>cats<\/strong>\",\n        \"content\": \"...once a bunch of <strong>cats<\/strong> named tony...behaviour of <strong>cats<\/strong> is unsuitable\"\n      },\n      \"tags\": []\n    },\n    {\n      \"name\": \"The hows and whys of cats\",\n      \"id\": 396,\n      \"slug\": \"the-hows-and-whys-of-cats\",\n      \"book_id\": 1,\n      \"chapter_id\": 75,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2021-05-15T16:28:10.000000Z\",\n      \"updated_at\": \"2021-11-14T15:56:49.000000Z\",\n      \"type\": \"page\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/page\/the-hows-and-whys-of-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"chapter\": {\n        \"id\": 75,\n        \"name\": \"A chapter for cats\",\n        \"slug\": \"a-chapter-for-cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"The hows and whys of <strong>cats<\/strong>\",\n        \"content\": \"...people ask why <strong>cats<\/strong>? but there are...the reason that <strong>cats<\/strong> are fast are due to...\"\n      },\n      \"tags\": [\n        {\n          \"name\": \"Animal\",\n          \"value\": \"Cat\",\n          \"order\": 0\n        },\n        {\n          \"name\": \"Category\",\n          \"value\": \"Top Content\",\n          \"order\": 0\n        }\n      ]\n    },\n    {\n      \"name\": \"How advanced are cats?\",\n      \"id\": 362,\n      \"slug\": \"how-advanced-are-cats\",\n      \"book_id\": 13,\n      \"chapter_id\": 73,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2020-11-29T21:55:07.000000Z\",\n      \"updated_at\": \"2021-11-14T16:02:39.000000Z\",\n      \"type\": \"page\",\n      \"url\": \"https:\/\/example.com\/books\/big-cats\/page\/how-advanced-are-cats\",\n      \"book\": {\n        \"id\": 13,\n        \"name\": \"Big Cats\",\n        \"slug\": \"big-cats\"\n      },\n      \"chapter\": {\n        \"id\": 73,\n        \"name\": \"A chapter for bigger cats\",\n        \"slug\": \"a-chapter-for-bigger-cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"How advanced are <strong>cats<\/strong>?\",\n        \"content\": \"<strong>cats<\/strong> are some of the most advanced animals in the world.\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"total\": 3\n}\n"},{"name":"search-book","uri":"api\/search\/book\/{id}","method":"GET","controller":"BookStack\\Search\\SearchApiController","controller_method":"book","controller_method_kebab":"book","base_model":"search","description":"Run a search query against the contents of a single book, searching its pages and chapters. Takes the same input as the 'all' endpoint, and the same input as the search box shown within a book in the BookStack interface.\nOnly pages and chapters are searched, since those are what a book contains. A {type:...} term in the query can narrow that further but cannot widen it.","body_params":{"query":["required"],"page":["integer","min:1"],"count":["integer","min:1","max:100"]},"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 84,\n      \"book_id\": 1,\n      \"slug\": \"a-chapter-for-cats\",\n      \"name\": \"A chapter for cats\",\n      \"created_at\": \"2021-11-14T15:57:35.000000Z\",\n      \"updated_at\": \"2021-11-14T15:57:35.000000Z\",\n      \"type\": \"chapter\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/chapter\/a-chapter-for-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"A chapter for <strong>cats<\/strong>\",\n        \"content\": \"...once a bunch of <strong>cats<\/strong> named tony...behaviour of <strong>cats<\/strong> is unsuitable\"\n      },\n      \"tags\": []\n    },\n    {\n      \"name\": \"The hows and whys of cats\",\n      \"id\": 396,\n      \"slug\": \"the-hows-and-whys-of-cats\",\n      \"book_id\": 1,\n      \"chapter_id\": 75,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2021-05-15T16:28:10.000000Z\",\n      \"updated_at\": \"2021-11-14T15:56:49.000000Z\",\n      \"type\": \"page\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/page\/the-hows-and-whys-of-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"chapter\": {\n        \"id\": 75,\n        \"name\": \"A chapter for cats\",\n        \"slug\": \"a-chapter-for-cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"The hows and whys of <strong>cats<\/strong>\",\n        \"content\": \"...people ask why <strong>cats<\/strong>? but there are...the reason that <strong>cats<\/strong> are fast are due to...\"\n      },\n      \"tags\": [\n        {\n          \"name\": \"Animal\",\n          \"value\": \"Cat\",\n          \"order\": 0\n        },\n        {\n          \"name\": \"Category\",\n          \"value\": \"Top Content\",\n          \"order\": 0\n        }\n      ]\n    }\n  ],\n  \"total\": 2\n}\n"},{"name":"search-chapter","uri":"api\/search\/chapter\/{id}","method":"GET","controller":"BookStack\\Search\\SearchApiController","controller_method":"chapter","controller_method_kebab":"chapter","base_model":"search","description":"Run a search query against the contents of a single chapter. Takes the same input as the 'all' endpoint, and the same input as the search box shown within a chapter in the BookStack interface.\nOnly pages are searched, since those are what a chapter contains.","body_params":{"query":["required"],"page":["integer","min:1"],"count":["integer","min:1","max:100"]},"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"name\": \"The hows and whys of cats\",\n      \"id\": 396,\n      \"slug\": \"the-hows-and-whys-of-cats\",\n      \"book_id\": 1,\n      \"chapter_id\": 75,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2021-05-15T16:28:10.000000Z\",\n      \"updated_at\": \"2021-11-14T15:56:49.000000Z\",\n      \"type\": \"page\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/page\/the-hows-and-whys-of-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"chapter\": {\n        \"id\": 75,\n        \"name\": \"A chapter for cats\",\n        \"slug\": \"a-chapter-for-cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"The hows and whys of <strong>cats<\/strong>\",\n        \"content\": \"...people ask why <strong>cats<\/strong>? but there are...the reason that <strong>cats<\/strong> are fast are due to...\"\n      },\n      \"tags\": [\n        {\n          \"name\": \"Animal\",\n          \"value\": \"Cat\",\n          \"order\": 0\n        },\n        {\n          \"name\": \"Category\",\n          \"value\": \"Top Content\",\n          \"order\": 0\n        }\n      ]\n    },\n    {\n      \"name\": \"How advanced are cats?\",\n      \"id\": 362,\n      \"slug\": \"how-advanced-are-cats\",\n      \"book_id\": 1,\n      \"chapter_id\": 75,\n      \"draft\": false,\n      \"template\": false,\n      \"created_at\": \"2020-11-29T21:55:07.000000Z\",\n      \"updated_at\": \"2021-11-14T16:02:39.000000Z\",\n      \"type\": \"page\",\n      \"url\": \"https:\/\/example.com\/books\/cats\/page\/how-advanced-are-cats\",\n      \"book\": {\n        \"id\": 1,\n        \"name\": \"Cats\",\n        \"slug\": \"cats\"\n      },\n      \"chapter\": {\n        \"id\": 75,\n        \"name\": \"A chapter for cats\",\n        \"slug\": \"a-chapter-for-cats\"\n      },\n      \"preview_html\": {\n        \"name\": \"How advanced are <strong>cats<\/strong>?\",\n        \"content\": \"<strong>cats<\/strong> are some of the most advanced animals in the world.\"\n      },\n      \"tags\": []\n    }\n  ],\n  \"total\": 2\n}\n"}],"system":[{"name":"system-read","uri":"api\/system","method":"GET","controller":"BookStack\\App\\SystemApiController","controller_method":"read","controller_method_kebab":"read","base_model":"system","description":"Read details regarding the BookStack instance. Some details may be null where not set, like the app logo for example.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"version\": \"v25.02.4\",\n  \"instance_id\": \"1234abcd-cc12-7808-af0a-264cb0cbd611\",\n  \"app_name\": \"My BookStack Instance\",\n  \"app_logo\": \"https:\/\/docs.example.com\/uploads\/images\/system\/2025-05\/cat-icon.png\",\n  \"base_url\": \"https:\/\/docs.example.com\"\n}"}],"tags":[{"name":"tags-list-names","uri":"api\/tags\/names","method":"GET","controller":"BookStack\\Activity\\Controllers\\TagApiController","controller_method":"listNames","controller_method_kebab":"list-names","base_model":"tags","description":"Get a list of tag names used in the system. Only the name field can be used in filters.","body_params":null,"model_description":"Endpoints to query data about tags in the system. You'll only see results based on tags applied to content you have access to. There are no general create\/update\/delete endpoints here since tags do not exist by themselves, they are managed via the items they are assigned to.","example_request":null,"example_response":"{\n\t\"data\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"values\": 8,\n\t\t\t\"usages\": 184,\n\t\t\t\"page_count\": 3,\n\t\t\t\"chapter_count\": 8,\n\t\t\t\"book_count\": 171,\n\t\t\t\"shelf_count\": 2\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Review Due\",\n\t\t\t\"values\": 2,\n\t\t\t\"usages\": 2,\n\t\t\t\"page_count\": 1,\n\t\t\t\"chapter_count\": 0,\n\t\t\t\"book_count\": 1,\n\t\t\t\"shelf_count\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Type\",\n\t\t\t\"values\": 2,\n\t\t\t\"usages\": 2,\n\t\t\t\"page_count\": 0,\n\t\t\t\"chapter_count\": 1,\n\t\t\t\"book_count\": 1,\n\t\t\t\"shelf_count\": 0\n\t\t}\n\t],\n\t\"total\": 3\n}"},{"name":"tags-list-values","uri":"api\/tags\/values-for-name","method":"GET","controller":"BookStack\\Activity\\Controllers\\TagApiController","controller_method":"listValues","controller_method_kebab":"list-values","base_model":"tags","description":"Get a list of tag values, which have been set for the given tag name, which must be provided as a query parameter on the request. Only the value field can be used in filters.","body_params":{"name":["required","string"]},"model_description":"Endpoints to query data about tags in the system. You'll only see results based on tags applied to content you have access to. There are no general create\/update\/delete endpoints here since tags do not exist by themselves, they are managed via the items they are assigned to.","example_request":"GET \/api\/tags\/values-for-name?name=Category\n","example_response":"{\n\t\"data\": [\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Cool Stuff\",\n\t\t\t\"usages\": 3,\n\t\t\t\"page_count\": 1,\n\t\t\t\"chapter_count\": 0,\n\t\t\t\"book_count\": 2,\n\t\t\t\"shelf_count\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Top Content\",\n\t\t\t\"usages\": 168,\n\t\t\t\"page_count\": 0,\n\t\t\t\"chapter_count\": 3,\n\t\t\t\"book_count\": 165,\n\t\t\t\"shelf_count\": 0\n\t\t},\n\t\t{\n\t\t\t\"name\": \"Category\",\n\t\t\t\"value\": \"Learning\",\n\t\t\t\"usages\": 2,\n\t\t\t\"page_count\": 0,\n\t\t\t\"chapter_count\": 0,\n\t\t\t\"book_count\": 0,\n\t\t\t\"shelf_count\": 2\n\t\t}\n\t],\n\t\"total\": 3\n}"}],"users":[{"name":"users-list","uri":"api\/users","method":"GET","controller":"BookStack\\Users\\Controllers\\UserApiController","controller_method":"list","controller_method_kebab":"list","base_model":"users","description":"Get a listing of users in the system. Requires permission to manage users.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"data\": [\n    {\n      \"id\": 1,\n      \"name\": \"Dan Brown\",\n      \"email\": \"dannyb@example.com\",\n      \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n      \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n      \"external_auth_id\": \"abc123456\",\n      \"slug\": \"dan-brown\",\n      \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n      \"profile_url\": \"https:\/\/docs.example.com\/user\/dan-brown\",\n      \"edit_url\": \"https:\/\/docs.example.com\/settings\/users\/1\",\n      \"avatar_url\": \"https:\/\/docs.example.com\/uploads\/images\/user\/2021-10\/thumbs-50-50\/profile-2021.jpg\"\n    },\n    {\n      \"id\": 2,\n      \"name\": \"Benny\",\n      \"email\": \"benny@example.com\",\n      \"created_at\": \"2020-01-15T04:43:11.000000Z\",\n      \"updated_at\": \"2021-11-18T17:10:58.000000Z\",\n      \"external_auth_id\": \"\",\n      \"slug\": \"benny\",\n      \"last_activity_at\": \"2022-01-31T20:39:24.000000Z\",\n      \"profile_url\": \"https:\/\/docs.example.com\/user\/benny\",\n      \"edit_url\": \"https:\/\/docs.example.com\/settings\/users\/2\",\n      \"avatar_url\": \"https:\/\/docs.example.com\/uploads\/images\/user\/2021-11\/thumbs-50-50\/guest.jpg\"\n    }\n  ],\n  \"total\": 28\n}"},{"name":"users-create","uri":"api\/users","method":"POST","controller":"BookStack\\Users\\Controllers\\UserApiController","controller_method":"create","controller_method_kebab":"create","base_model":"users","description":"Create a new user in the system. Requires permission to manage users.","body_params":{"name":["required","string","min:1","max:100"],"email":["required","string","email","min:2","unique:users,email,NULL,id"],"external_auth_id":["string"],"language":["string","max:15","alpha_dash"],"password":["string","min:8"],"roles":["array"],"roles.*":["integer"],"send_invite":["boolean"]},"model_description":null,"example_request":"{\n  \"name\": \"Dan Brown\",\n  \"email\": \"dannyb@example.com\",\n  \"roles\": [1],\n  \"language\": \"fr\",\n  \"send_invite\": true\n}","example_response":"{\n  \"id\": 1,\n  \"name\": \"Dan Brown\",\n  \"email\": \"dannyb@example.com\",\n  \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"external_auth_id\": \"abc123456\",\n  \"slug\": \"dan-brown\",\n  \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"profile_url\": \"https:\/\/docs.example.com\/user\/dan-brown\",\n  \"edit_url\": \"https:\/\/docs.example.com\/settings\/users\/1\",\n  \"avatar_url\": \"https:\/\/docs.example.com\/uploads\/images\/user\/2021-10\/thumbs-50-50\/profile-2021.jpg\",\n  \"roles\": [\n    {\n      \"id\": 1,\n      \"display_name\": \"Admin\"\n    }\n  ]\n}"},{"name":"users-read","uri":"api\/users\/{id}","method":"GET","controller":"BookStack\\Users\\Controllers\\UserApiController","controller_method":"read","controller_method_kebab":"read","base_model":"users","description":"View the details of a single user. Requires permission to manage users.","body_params":null,"model_description":null,"example_request":null,"example_response":"{\n  \"id\": 1,\n  \"name\": \"Dan Brown\",\n  \"email\": \"dannyb@example.com\",\n  \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"external_auth_id\": \"abc123456\",\n  \"slug\": \"dan-brown\",\n  \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"profile_url\": \"https:\/\/docs.example.com\/user\/dan-brown\",\n  \"edit_url\": \"https:\/\/docs.example.com\/settings\/users\/1\",\n  \"avatar_url\": \"https:\/\/docs.example.com\/uploads\/images\/user\/2021-10\/thumbs-50-50\/profile-2021.jpg\",\n  \"roles\": [\n    {\n      \"id\": 1,\n      \"display_name\": \"Admin\"\n    }\n  ]\n}"},{"name":"users-update","uri":"api\/users\/{id}","method":"PUT","controller":"BookStack\\Users\\Controllers\\UserApiController","controller_method":"update","controller_method_kebab":"update","base_model":"users","description":"Update an existing user in the system. Requires permission to manage users. ","body_params":{"name":["string","min:1","max:100"],"email":["string","email","min:2","unique:users,email,NULL,id"],"external_auth_id":["string"],"language":["string","max:15","alpha_dash"],"password":["string","min:8"],"roles":["array"],"roles.*":["integer"]},"model_description":null,"example_request":"{\n  \"name\": \"Dan Spaggleforth\",\n  \"email\": \"dspaggles@example.com\",\n  \"roles\": [2],\n  \"language\": \"de\",\n  \"password\": \"hunter2000\"\n}","example_response":"{\n  \"id\": 1,\n  \"name\": \"Dan Spaggleforth\",\n  \"email\": \"dspaggles@example.com\",\n  \"created_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"updated_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"external_auth_id\": \"abc123456\",\n  \"slug\": \"dan-spaggleforth\",\n  \"last_activity_at\": \"2022-02-03T16:27:55.000000Z\",\n  \"profile_url\": \"https:\/\/docs.example.com\/user\/dan-spaggleforth\",\n  \"edit_url\": \"https:\/\/docs.example.com\/settings\/users\/1\",\n  \"avatar_url\": \"https:\/\/docs.example.com\/uploads\/images\/user\/2021-10\/thumbs-50-50\/profile-2021.jpg\",\n  \"roles\": [\n    {\n      \"id\": 2,\n      \"display_name\": \"Editors\"\n    }\n  ]\n}"},{"name":"users-delete","uri":"api\/users\/{id}","method":"DELETE","controller":"BookStack\\Users\\Controllers\\UserApiController","controller_method":"delete","controller_method_kebab":"delete","base_model":"users","description":"Delete a user from the system. Can optionally accept a user id via `migrate_ownership_id` to indicate who should be the new owner of their related content. Requires permission to manage users.","body_params":{"migrate_ownership_id":["integer","exists:users,id"]},"model_description":null,"example_request":"{\n  \"migrate_ownership_id\": 5\n}","example_response":null}]}