GitHub’s official command line tool
{
"openapi": "3.0.0",
"info": {
"title": "Outline API",
"description": "# Introduction\n\nThe Outline API is structured in an RPC style. It enables you to\nprogramatically interact with all aspects of Outline’s data – in fact, the\nmain application is built on exactly the same API.\n\nThe API structure is available as an\n[openapi specification](https://github.com/outline/openapi) if that’s your\njam – it can be used to generate clients for most programming languages.\n\n# Making requests\n\nOutline’s API follows simple RPC style conventions where each API endpoint is\na method on `https://app.getoutline.com/api/method`. Both `GET` and `POST`\nmethods are supported but it’s recommended that you make all call using POST.\nOnly HTTPS is supported and all response payloads are JSON.\n\nWhen making `POST` requests, request parameters are parsed depending on\nContent-Type header. To make a call using JSON payload, you must pass\nContent-Type: application/json header, here’s an example using CURL:\n\n```\ncurl https://app.getoutline.com/api/documents.info \\\n-X 'POST' \\\n-H 'authorization: Bearer MY_API_KEY' \\\n-H 'content-type: application/json' \\\n-H 'accept: application/json' \\\n-d '{\"id\": \"outline-api-NTpezNwhUP\"}'\n```\n\nOr, with JavaScript:\n\n```javascript\nconst response = await fetch(\"https://app.getoutline.com/api/documents.info\", {\n method: \"POST\",\n headers: {\n Accept: \"application/json\",\n \"Content-Type\": \"application/json\",\n Authorization: \"Bearer MY_API_KEY\"\n }\n})\n\nconst body = await response.json();\nconst document = body.data;\n```\n\n# Authentication\n\nTo access API endpoints, you must provide a valid API key. You can create new\nAPI keys in your [account settings](https://app.getoutline.com/settings). Be\ncareful when handling your keys as they give access to all of your documents,\nyou should treat them like passwords and they should never be committed to\nsource control.\n\nTo authenticate with API, you can supply the API key as a header\n(`Authorization: Bearer YOUR_API_KEY`) or as part of the payload using `token`\nparameter. Header based authentication is highly recommended so that your keys\ndon’t accidentally leak into logs.\n\nSome API endpoints allow unauthenticated requests for public resources and\nthey can be called without an API key.\n\n# Errors\n\nAll successful API requests will be returned with a 200 or 201 status code\nand `ok: true` in the response payload. If there’s an error while making the\nrequest, the appropriate status code is returned with the error message:\n\n```\n{\n \"ok\": false,\n \"error\": \"Not Found\"\n}\n```\n\n# Pagination\n\nMost top-level API resources have support for \"list\" API methods. For instance,\nyou can list users, documents, and collections. These list methods share\ncommon parameters, taking both `limit` and `offset`.\n\nResponses will echo these parameters in the root `pagination` key, and also\ninclude a `nextPath` key which can be used as a handy shortcut to fetch the\nnext page of results. For example:\n\n```\n{\n ok: true,\n status: 200,\n data: […],\n pagination: {\n limit: 25,\n offset: 0,\n nextPath: \"/api/documents.list?limit=25&offset=25\"\n }\n}\n```\n\n# Policies\n\nMany API resources have associated \"policies\", these objects describe the\ncurrent API keys authorized actions related to an individual resource. It\nshould be noted that the policy \"id\" is identical to the resource it is\nrelated to, policies themselves do not have unique identifiers.\n\nFor most usecases of the API, policies can be safely ignored. Calling\nunauthorized methods will result in the appropriate response code – these are\nused in the main Outline UI to adjust which elements are visible.\n",
"version": "0.1.0",
"contact": { "email": "[email protected]" }
},
"servers": [
{ "url": "https://app.getoutline.com/api", "description": "Production" }
],
"security": [{ "http": [] }],
"tags": [
{
"name": "Attachments",
"description": "`Attachments` represent a file uploaded to cloud storage. They are created\nbefore the upload happens from the client and store all the meta information\nsuch as file type, size, and location.\n"
},
{
"name": "Auth",
"description": "`Auth` represents the current API Keys authentication details. It can be\nused to check that a token is still valid and load the IDs for the current\nuser and team.\n"
},
{
"name": "Collections",
"description": "`Collections` represent grouping of documents in the knowledge base, they\noffer a way to structure information in a nested hierarchy and a level\nat which read and write permissions can be granted to individual users or\ngroups of users.\n"
},
{
"name": "Comments",
"description": "`Comments` represent a comment either on a selection of text in a document\nor on the document itself.\n"
},
{
"name": "Documents",
"description": "`Documents` are what everything else revolves around. A document represents\na single page of information and always returns the latest version of the\ncontent. Documents are stored in [Markdown](https://spec.commonmark.org/)\nformatting.\n"
},
{
"name": "Events",
"description": "`Events` represent an artifact of an action. Whether it is creating a user,\nediting a document, changing permissions, or any other action – an event\nis created that can be used as an audit trail or activity stream.\n"
},
{
"name": "FileOperations",
"description": "`FileOperations` represent background jobs for importing or exporting files.\nYou can query the file operation to find the state of progress and any\nresulting output.\n"
},
{
"name": "Groups",
"description": "`Groups` represent a list of users that logically belong together, for\nexample there might be groups for each department in your organization.\nGroups can be granted access to collections with read or write permissions.\n"
},
{
"name": "Revisions",
"description": "`Revisions` represent a snapshop of a document at a point in time. They\nare used to keep tracking of editing and collaboration history – a document\ncan also be restored to a previous revision if neccessary.\n"
},
{
"name": "Shares",
"description": "`Shares` represent authorization to view a document without being a member\nof the team. Shares are created in order to give access to documents publicly.\nEach user that shares a document will have a unique share object.\n"
},
{
"name": "Users",
"description": "`Users` represent an individual with access to the knowledge base. Users\ncan be created automatically when signing in with SSO or when a user is\ninvited via email.\n"
},
{
"name": "Views",
"description": "`Views` represent a compressed record of an individual users views of a\ndocument. Individual views are not recorded but a first, last and total\nis kept per user.\n"
}
],
"paths": {
"/attachments.create": {
"post": {
"tags": ["Attachments"],
"summary": "Create an attachment",
"description": "Creating an attachment object creates a database record and returns the inputs needed to generate a signed url and upload the file from the client to cloud storage.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "image.png"
},
"documentId": {
"type": "string",
"description": "Identifier for the associated document, if any.",
"format": "uuid"
},
"contentType": {
"type": "string",
"example": "image/png"
},
"size": {
"type": "number",
"description": "Size of the file attachment in bytes."
}
},
"required": ["name", "contentType", "size"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"maxUploadSize": {
"type": "number"
},
"uploadUrl": {
"type": "string",
"format": "uri"
},
"form": { "type": "object" },
"attachment": {
"$ref": "#/components/schemas/Attachment"
}
}
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/attachments.redirect": {
"post": {
"tags": ["Attachments"],
"summary": "Retrieve an attachment",
"description": "Load an attachment from where it is stored based on the id. If the attachment is private then a temporary, signed url with embedded credentials is generated on demand.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the attachment.",
"format": "uuid"
}
},
"required": ["id"]
}
}
}
},
"responses": {
"302": { "description": "The url for the attachment" }
}
}
},
"/attachments.delete": {
"post": {
"tags": ["Attachments"],
"summary": "Delete an attachment",
"description": "Deleting an attachment is permanant. It will not delete references or links to the attachment that may exist in your documents.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for the attachment."
}
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/auth.info": {
"post": {
"tags": ["Auth"],
"summary": "Retrieve auth",
"description": "Retrieve authentication details for the current API key",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Auth"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" }
}
}
},
"/auth.config": {
"post": {
"tags": ["Auth"],
"summary": "Retrieve auth config",
"description": "Retrieve authentication options",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Acme Inc"
},
"hostname": {
"type": "string",
"example": "acme-inc.getoutline.com"
},
"services": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "slack"
},
"name": {
"type": "string",
"example": "Slack"
},
"authUrl": {
"type": "string",
"example": "https://acme-inc.getoutline.com/auth/slack"
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"/collections.info": {
"post": {
"tags": ["Collections"],
"summary": "Retrieve a collection",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the collection.",
"format": "uuid"
}
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Collection"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.documents": {
"post": {
"tags": ["Collections"],
"summary": "Retrieve a collections document structure",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the collection.",
"format": "uuid"
}
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NavigationNode"
},
"example": []
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.list": {
"post": {
"tags": ["Collections"],
"summary": "List all collections",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Pagination"
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Collection"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/collections.create": {
"post": {
"tags": ["Collections"],
"summary": "Create a collection",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Human Resources"
},
"description": {
"type": "string",
"example": ""
},
"permission": {
"$ref": "#/components/schemas/Permission"
},
"color": {
"type": "string",
"example": "#123123"
},
"private": {
"type": "boolean",
"example": false
}
},
"required": ["name"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Collection"
},
"policies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Policy"
}
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/collections.update": {
"post": {
"tags": ["Collections"],
"summary": "Update a collection",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"name": {
"type": "string",
"example": "Human Resources"
},
"permission": {
"$ref": "#/components/schemas/Permission"
},
"description": {
"type": "string",
"example": ""
},
"color": {
"type": "string",
"example": "#123123"
}
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Collection"
},
"policies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Policy"
}
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.add_user": {
"post": {
"tags": ["Collections"],
"summary": "Add a collection user",
"description": "This method allows you to add a user membership to the specified collection.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"userId": {
"type": "string",
"format": "uuid"
},
"permission": {
"$ref": "#/components/schemas/Permission"
}
},
"required": ["id", "userId"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
},
"memberships": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Membership"
}
}
}
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.remove_user": {
"post": {
"tags": ["Collections"],
"summary": "Remove a collection user",
"description": "This method allows you to remove a user from the specified collection.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier for the collection",
"format": "uuid"
},
"userId": {
"type": "string",
"format": "uuid"
}
},
"required": ["id", "userId"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.memberships": {
"post": {
"tags": ["Collections"],
"summary": "List all collection memberships",
"description": "This method allows you to list a collections individual memberships. It's important to note that memberships returned from this endpoint do not include group memberships.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier for the collection",
"format": "uuid"
},
"query": {
"type": "string",
"description": "Filter memberships by user names",
"example": "jenny"
},
"permission": {
"$ref": "#/components/schemas/Permission"
}
},
"required": ["id"]
}
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"$ref": "#/components/schemas/User"
}
},
"memberships": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Membership"
}
}
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/collections.add_group": {
"post": {
"tags": ["Collections"],
"summary": "Add a group to a collection",
"description": "This method allows you to give all members in a group access to a collection.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"groupId": {
"type": "string",
"format": "uuid"
},
"permission": {
"$ref": "#/components/schemas/Permission"
}
},
"required": ["id", "groupId"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"collectionGroupMemberships": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CollectionGroupMembership"
}
}
}
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.remove_group": {
"post": {
"tags": ["Collections"],
"summary": "Remove a collection group",
"description": "This method allows you to revoke all members in a group access to a collection. Note that members of the group may still retain access through other groups or individual memberships.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier for the collection",
"format": "uuid"
},
"groupId": {
"type": "string",
"format": "uuid"
}
},
"required": ["id", "groupId"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.group_memberships": {
"post": {
"tags": ["Collections"],
"summary": "List all collection group members",
"description": "This method allows you to list a collections group memberships. This is the list of groups that have been given access to the collection.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Identifier for the collection",
"format": "uuid"
},
"query": {
"type": "string",
"description": "Filter memberships by group names",
"example": "developers"
},
"permission": {
"$ref": "#/components/schemas/Permission"
}
},
"required": ["id"]
}
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"groups": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Group"
}
},
"collectionGroupMemberships": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CollectionGroupMembership"
}
}
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
},
"400": { "$ref": "#/components/responses/Validation" },
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/collections.delete": {
"post": {
"tags": ["Collections"],
"summary": "Delete a collection",
"description": "Delete a collection and all of its documents. This action can’t be undone so please be careful.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" }
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.export": {
"post": {
"tags": ["Collections"],
"summary": "Export a collection",
"description": "Triggers a bulk export of the collection in markdown format and their attachments. If documents are nested then they will be nested in folders inside the zip file. The endpoint returns a `FileOperation` that can be queried to track the progress of the export and get the url for the final file.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": ["outline-markdown", "json", "html"]
},
"id": { "type": "string", "format": "uuid" }
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"fileOperation": {
"$ref": "#/components/schemas/FileOperation"
}
}
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/collections.export_all": {
"post": {
"tags": ["Collections"],
"summary": "Export all collections",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"format": {
"type": "string",
"enum": ["outline-markdown", "json", "html"]
}
}
}
}
}
},
"description": "Triggers a bulk export of all documents in and their attachments. The endpoint returns a `FileOperation` that can be queried through the fileOperations endpoint to track the progress of the export and get the url for the final file.",
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "object",
"properties": {
"fileOperation": {
"$ref": "#/components/schemas/FileOperation"
}
}
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/comments.create": {
"post": {
"tags": ["Comments"],
"summary": "Create a comment",
"description": "Create a comment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"documentId": {
"type": "string",
"format": "uuid"
},
"parentCommentId": {
"type": "string",
"format": "uuid"
},
"data": { "type": "object" }
},
"required": ["documentId", "data"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Comment"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/comments.update": {
"post": {
"tags": ["Comments"],
"summary": "Update a comment",
"description": "Update a comment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"data": { "type": "object" }
},
"required": ["id", "data"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Comment"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/comments.delete": {
"post": {
"tags": ["Comments"],
"summary": "Delete a comment",
"description": "Delete a comment",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": { "type": "string", "format": "uuid" }
},
"required": ["id"]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/comments.list": {
"post": {
"tags": ["Comments"],
"summary": "List all comments",
"description": "This method will list all comments matching the given properties.",
"requestBody": {
"content": {
"application/json": {
"schema": {
"allOf": [
{
"$ref": "#/components/schemas/Pagination"
},
{ "$ref": "#/components/schemas/Sorting" },
{
"type": "object",
"properties": {
"documentId": {
"type": "string",
"format": "uuid",
"description": "Filter to a specific document"
},
"collectionId": {
"type": "string",
"format": "uuid",
"description": "Filter to a specific collection"
}
}
}
]
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Document"
}
},
"policies": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Policy"
}
},
"pagination": {
"$ref": "#/components/schemas/Pagination"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" }
}
}
},
"/documents.info": {
"post": {
"tags": ["Documents"],
"summary": "Retrieve a document",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the document. Either the UUID or the urlId is acceptable."
},
"shareId": {
"type": "string",
"format": "uuid",
"description": "Unique identifier for a document share, a shareId may be used in place of a document UUID"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Document"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/documents.import": {
"post": {
"tags": ["Documents"],
"summary": "Import a file as a document",
"description": "This method allows you to create a new document by importing an existing file. By default a document is set to the collection root. If you want to create a nested/child document, you should pass parentDocumentId to set the parent document.",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"file": {
"type": "object",
"description": "Only plain text, markdown, docx, and html format are supported."
},
"collectionId": {
"type": "string",
"format": "uuid"
},
"parentDocumentId": {
"type": "string",
"format": "uuid"
},
"template": { "type": "boolean" },
"publish": { "type": "boolean" }
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Document"
}
}
}
}
}
},
"401": { "$ref": "#/components/responses/Unauthenticated" },
"403": { "$ref": "#/components/responses/Unauthorized" },
"404": { "$ref": "#/components/responses/NotFound" }
}
}
},
"/documents.export": {
"post": {
"tags": ["Documents"],
"summary": "Export a document as markdown",
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier for the document. Either the UUID or the urlId is acceptable."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "The document content in Markdown formatting"
}
}
<!-- [TRUNCATED AT 50KB] -->