openapi: 3.0.3 info: title: Docupilot accounts APIs ai folders API version: '1.0' description: Docupilot accounts APIs termsOfService: https://docupilot.app/terms-and-conditions/ contact: name: Team Docupilot email: support@docupilot.app tags: - name: folders paths: /dashboard/api/v2/folders/: get: operationId: list_folders summary: Get list of folders parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - name: ordering required: false in: query description: Which field to use when ordering the results. schema: type: string - in: query name: permission schema: type: string enum: - manage - read - write tags: - folders security: - OAuthAuthentication: [] - SessionAuthentication: [] - tokenAuth: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/Folder' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' post: operationId: create_folder summary: Create a folder parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true tags: - folders requestBody: content: application/json: schema: $ref: '#/components/schemas/Folder' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Folder' multipart/form-data: schema: $ref: '#/components/schemas/Folder' required: true security: - OAuthAuthentication: [] - SessionAuthentication: [] - tokenAuth: [] responses: '201': content: application/json: schema: $ref: '#/components/schemas/Folder' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' /dashboard/api/v2/folders/{folder_id}/permissions/: get: operationId: list_folder_sharing summary: Get all shared permissions for specific folder parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: folder_id schema: type: integer required: true tags: - folders security: - SessionAuthentication: [] responses: '200': content: application/json: schema: type: array items: $ref: '#/components/schemas/FolderSharing' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' post: operationId: create_folder_sharing_permission summary: Create folder sharing permission parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: folder_id schema: type: integer required: true tags: - folders requestBody: content: application/json: schema: type: array items: $ref: '#/components/schemas/FolderSharing' application/x-www-form-urlencoded: schema: type: array items: $ref: '#/components/schemas/FolderSharing' multipart/form-data: schema: type: array items: $ref: '#/components/schemas/FolderSharing' required: true security: - SessionAuthentication: [] responses: '201': content: application/json: schema: type: array items: $ref: '#/components/schemas/FolderSharing' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' /dashboard/api/v2/folders/{folder_id}/permissions/{id}/: get: operationId: get_folder_sharing summary: Get specific permission details for given folder parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: folder_id schema: type: integer required: true - in: path name: id schema: type: integer description: A unique integer value identifying this folder sharing setting. required: true tags: - folders security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/FolderSharing' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' patch: operationId: update_folder_sharing_permission_content summary: Update folder content partially parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: folder_id schema: type: integer required: true - in: path name: id schema: type: integer description: A unique integer value identifying this folder sharing setting. required: true tags: - folders requestBody: content: application/json: schema: $ref: '#/components/schemas/PatchedUpdateFolderSharing' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/PatchedUpdateFolderSharing' multipart/form-data: schema: $ref: '#/components/schemas/PatchedUpdateFolderSharing' security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/FolderSharing' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' delete: operationId: revoke_folder_sharing_permission summary: Revoke folder sharing permission parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: folder_id schema: type: integer required: true - in: path name: id schema: type: integer description: A unique integer value identifying this folder sharing setting. required: true tags: - folders security: - SessionAuthentication: [] responses: '204': description: No response body '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' /dashboard/api/v2/folders/{id}/: put: operationId: update_folder summary: Updates a folder parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: id schema: type: integer description: A unique integer value identifying this folder. required: true tags: - folders requestBody: content: application/json: schema: $ref: '#/components/schemas/Folder' application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/Folder' multipart/form-data: schema: $ref: '#/components/schemas/Folder' required: true security: - OAuthAuthentication: [] - SessionAuthentication: [] - tokenAuth: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/Folder' description: '' '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' delete: operationId: delete_folder description: This operation moves all templates under this folder to home directory. summary: Delete a folder. parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: path name: id schema: type: integer description: A unique integer value identifying this folder. required: true tags: - folders security: - OAuthAuthentication: [] - SessionAuthentication: [] - tokenAuth: [] responses: '204': description: No response body '400': content: application/json: schema: $ref: '#/components/schemas/ValidationError' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' '404': content: application/json: schema: $ref: '#/components/schemas/NotFoundError' description: '' /dashboard/api/v2/folders/count/: get: operationId: get_user_created_folder_count summary: Get the count of folders created by the user. parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true - in: query name: owner_id schema: type: string description: Owner Id of resource required: true tags: - folders security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/FolderCount' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' /dashboard/api/v2/folders/sharing_status/: get: operationId: folders_sharing_status_retrieve parameters: - in: header name: X-Workspace schema: type: string description: Workspace unique_key required: true tags: - folders security: - SessionAuthentication: [] responses: '200': content: application/json: schema: $ref: '#/components/schemas/SharingInfoFolder' description: '' '401': content: application/json: schema: $ref: '#/components/schemas/UnauthenticatedError' description: '' '403': content: application/json: schema: $ref: '#/components/schemas/ForbiddenError' description: '' components: schemas: UnauthenticatedError: type: object properties: detail: type: string required: - detail description: '' FolderCount: type: object properties: folders_count: type: integer required: - folders_count description: '' Folder: type: object description: '' properties: id: type: integer readOnly: true name: type: string maxLength: 50 created_time: type: string format: date-time readOnly: true nullable: true updated_time: type: string format: date-time readOnly: true nullable: true created_by: type: integer readOnly: true updated_by: type: integer readOnly: true nullable: true required: - created_by - created_time - id - name - updated_by - updated_time ValidationError: type: object properties: errors: type: object additionalProperties: type: array items: type: string non_field_errors: type: array items: type: string required: - errors - non_field_errors description: '' SharingInfoFolder: type: object properties: id: type: integer readOnly: true is_shared: type: boolean readOnly: true required: - id - is_shared description: '' ForbiddenError: type: object properties: detail: type: string required: - detail description: '' NotFoundError: type: object properties: detail: type: string required: - detail description: '' FolderSharing: type: object description: '' properties: id: type: integer readOnly: true permission: enum: - read - write - manage type: string user: type: integer required: - id - user PatchedUpdateFolderSharing: type: object description: '' properties: id: type: integer readOnly: true permission: enum: - read - write - manage type: string user: type: integer readOnly: true securitySchemes: OAuthAuthentication: type: http scheme: bearer description: OAuth2 Bearer Token Authentication SessionAuthentication: type: apiKey in: cookie name: sessionid description: browser based login takes care of this externalDocs: description: Help docs on how to use API url: https://help.docupilot.app/developers/api-overview