openapi: 3.1.0 info: title: Adonis Web Kit API version: 0.9.0 description: | ## Welcome to the Adonis Web Kit API An AdonisJS 7 starter API with global RBAC, N:N tenant workspaces, file management, health checks, and a React/Inertia web application. ### Key Features - **Access JWTs**: Short-lived signed bearer tokens for API requests - **Opaque Refresh Tokens**: Rotated on every use and persisted only as HMAC hashes - **Global RBAC**: Roles, direct permissions, inheritance, and cache invalidation - **Tenant Workspaces**: Verified active-tenant context, personal workspace onboarding, and workspace creation - **File Management**: Tenant-scoped upload, listing, and owner-aware deletion across multiple storage drivers - **Account Lifecycle**: Email verification, single-use password reset, and anonymized self-deletion - **Health Monitoring**: Public readiness and dependency checks ## Authentication 1. **Login**: POST to `/api/v1/sessions/sign-in` with your credentials 2. **Get Tokens**: Extract `access_token` and `refresh_token` from `auth` 3. **Use Access Token**: Include `Authorization: Bearer ` 4. **Rotate Tokens**: POST the opaque refresh token to `/api/v1/sessions/refresh` ### Token Management - **API Access Token Lifetime**: 15 minutes - **Web Cookie Lifetime**: 1 hour - **Refresh Token Lifetime**: 3 days - **Access Token Format**: JWT with `token_use=access` - **Refresh Token Format**: Opaque random value; it is not a JWT ## API Conventions ### Request Format - **Content-Type**: `application/json` for all requests (except file uploads) - **Pagination**: Use `?page=1&per_page=10` query parameters - **Sorting**: Use `?sort_by=field&order=asc` or `?sort_by=field&order=desc` - **Searching**: Use `?search=term` for text search ### Response Format - **Success**: HTTP 2xx with JSON body - **Errors**: HTTP 4xx/5xx with standardized error format - **Timestamps**: ISO 8601 format - **Database Fields**: snake_case naming convention ### Common Headers ``` Authorization: Bearer Content-Type: application/json Accept: application/json ``` contact: name: API Support email: support@example.com license: name: MIT url: https://opensource.org/licenses/MIT servers: - url: http://127.0.0.1:3333 description: Local development server - url: https://api.yourdomain.com description: Production server security: - bearerAuth: [] components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT description: Short-lived access JWT. Opaque refresh tokens are never accepted here. schemas: User: type: object properties: id: type: integer example: 1 full_name: type: string example: 'John Doe' email: type: string format: email example: 'john@example.com' username: type: [string, 'null'] example: 'johndoe' email_verified: type: boolean example: true email_verified_at: type: [string, 'null'] format: date-time created_at: type: string format: date-time example: '2024-01-01T00:00:00.000Z' updated_at: type: string format: date-time example: '2024-01-01T00:00:00.000Z' roles: type: array items: $ref: '#/components/schemas/Role' Role: type: object properties: id: type: integer example: 1 name: type: string example: 'User' description: type: string example: 'Regular user role' slug: type: string enum: [root, admin, user, guest, editor] example: 'user' created_at: type: string format: date-time updated_at: type: string format: date-time AuthResponse: type: object properties: id: type: integer full_name: type: string email: type: string format: email username: type: string created_at: type: string format: date-time updated_at: type: string format: date-time roles: type: array items: $ref: '#/components/schemas/Role' auth: $ref: '#/components/schemas/AuthTokens' email_verification_sent: type: boolean description: Present on sign-up responses; false means the account was created but email delivery failed. AuthTokens: type: object required: [access_token, refresh_token] properties: access_token: type: string description: Short-lived JWT accepted by bearer-authenticated endpoints. example: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' refresh_token: type: string description: Opaque one-time refresh credential rotated after every successful refresh. example: 'D4m6j6pTW1u3Jf_Z0Q4K7rJch7Jv8k9xQ4Q6xk2MsGv...' RefreshTokenRequest: type: object required: [refresh_token] properties: refresh_token: type: string minLength: 32 description: Opaque refresh token returned by sign-in, sign-up, tenant switch, or refresh. PasswordResetRequest: type: object required: [token, password, password_confirmation] properties: token: type: string minLength: 32 description: Opaque single-use password reset token delivered by email. password: type: string format: password minLength: 8 password_confirmation: type: string format: password minLength: 8 Tenant: type: object required: [id, name, slug, role] properties: id: type: integer name: type: string slug: type: string is_active: type: boolean role: type: string enum: [owner, admin, member] FileListItem: type: object required: [id, client_name, file_name, file_size, file_type, file_category, url, owner] properties: id: type: integer client_name: type: string file_name: type: string file_size: type: integer file_type: type: string file_category: type: string enum: [image, document, video, audio, file] url: type: string owner: type: object required: [id, full_name] properties: id: type: integer full_name: type: string created_at: type: [string, 'null'] format: date-time Error: type: object properties: errors: type: array items: type: object properties: message: type: string example: 'Validation error' field: type: string example: 'email' rule: type: string example: 'email' Pagination: type: object properties: meta: type: object properties: total: type: integer example: 100 per_page: type: integer example: 10 current_page: type: integer example: 1 last_page: type: integer example: 10 first_page: type: integer example: 1 first_page_url: type: string example: '/?page=1' last_page_url: type: string example: '/?page=10' next_page_url: type: string example: '/?page=2' previous_page_url: type: string example: null FileUploadResponse: type: object properties: url: type: string example: 'https://storage.example.com/files/abc123.pdf' clientName: type: string example: 'document.pdf' fileCategory: type: string enum: [image, document, video, audio, file] example: 'document' fileType: type: string example: 'application/pdf' size: type: integer example: 12345 extname: type: string example: 'pdf' parameters: pathId: name: id in: path required: true schema: type: integer description: Resource ID pageParam: name: page in: query schema: type: integer default: 1 minimum: 1 description: Page number for pagination perPageParam: name: per_page in: query schema: type: integer default: 10 minimum: 1 maximum: 100 description: Number of items per page sortByParam: name: sort_by in: query schema: type: string default: id description: Field to sort by orderParam: name: order in: query schema: type: string enum: [asc, desc] default: asc description: Sort order searchParam: name: search in: query schema: type: string description: Search term for filtering results tenantHeader: name: x-tenant-id in: header required: false schema: type: integer minimum: 1 description: Optional active workspace override. Membership and active status are always validated. responses: UnauthorizedError: description: Authentication required content: application/json: schema: $ref: '#/components/schemas/Error' example: errors: - message: 'Unauthorized' ForbiddenError: description: Insufficient permissions content: application/json: schema: $ref: '#/components/schemas/Error' example: errors: - message: 'Forbidden' NotFoundError: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' example: errors: - message: 'Resource not found' ValidationError: description: Validation failed content: application/json: schema: $ref: '#/components/schemas/Error' tags: - name: Health description: System health monitoring endpoints - name: Authentication description: User authentication and session management - name: Users description: User management operations - name: Tenants description: Tenant membership and active workspace operations - name: Roles description: Role management operations (admin only) - name: Files description: File upload and management - name: Profile description: Current user profile operations - name: Permissions description: Permission management operations (admin only) paths: /version: get: operationId: getApiInfo summary: Get API information description: Returns basic information about the API tags: - Health security: [] responses: '200': description: API information content: application/json: schema: type: object properties: name: type: string example: 'adonis-web-kit' description: type: string example: 'Full-stack AdonisJS 7 and React starter kit' version: type: string example: '0.9.0' author: type: string example: 'Gabriel Maia' contributors: type: array items: type: string '429': description: Too Many Requests content: application/json: schema: $ref: '#/components/schemas/Error' /api/v1/health: get: operationId: healthCheck summary: Health check description: Check the health status of the API and its services tags: - Health security: [] responses: '200': description: Service is healthy content: application/json: schema: type: object properties: healthy: type: boolean example: true services: type: object properties: database: type: object properties: healthy: type: boolean example: true '429': description: Too Many Requests content: application/json: schema: $ref: '#/components/schemas/Error' '503': description: Service unhealthy content: application/json: schema: type: object properties: healthy: type: boolean example: false services: type: object /api/v1/sessions/sign-in: post: operationId: signIn summary: User login description: Authenticate a user and receive a short-lived access JWT plus an opaque rotating refresh token. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: type: object required: - uid - password properties: uid: type: string description: Email or username example: 'john@example.com' password: type: string format: password minLength: 8 example: 'password123' responses: '200': description: Login successful content: application/json: schema: $ref: '#/components/schemas/AuthResponse' '400': description: Invalid credentials content: application/json: schema: $ref: '#/components/schemas/Error' example: errors: - message: 'Invalid credentials' '422': $ref: '#/components/responses/ValidationError' /api/v1/sessions/forgot-password: post: operationId: requestPasswordReset summary: Request a password reset link description: Returns the same accepted response whether or not the email exists. Any issued token is opaque, single-use, and stored only as an HMAC. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: type: object required: [email] properties: email: type: string format: email responses: '202': description: Request accepted without revealing account existence content: application/json: schema: type: object properties: message: type: string '422': $ref: '#/components/responses/ValidationError' '429': description: Too many password reset requests /api/v1/sessions/reset-password: post: operationId: resetPassword summary: Reset an account password description: Consumes a valid reset token, changes the password, invalidates other reset links, and revokes active API refresh tokens. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/PasswordResetRequest' responses: '200': description: Password reset successfully '400': description: Invalid or expired token '422': $ref: '#/components/responses/ValidationError' '429': description: Too many password reset attempts /api/v1/sessions/refresh: post: operationId: refreshSession summary: Rotate a refresh token description: Atomically revokes the submitted opaque refresh token and returns a new access/refresh pair. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefreshTokenRequest' responses: '200': description: Token pair rotated successfully content: application/json: schema: type: object properties: auth: $ref: '#/components/schemas/AuthTokens' '401': $ref: '#/components/responses/UnauthorizedError' '422': $ref: '#/components/responses/ValidationError' /api/v1/sessions/logout: post: operationId: revokeSession summary: Revoke an API refresh token description: Revokes the submitted refresh token. Repeating the request is idempotent. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/RefreshTokenRequest' responses: '204': description: Refresh token revoked '422': $ref: '#/components/responses/ValidationError' /api/v1/me: get: operationId: getProfile summary: Get current user profile description: Retrieve the profile of the currently authenticated user tags: - Profile responses: '200': description: Profile retrieved successfully content: application/json: schema: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/UnauthorizedError' delete: operationId: deleteOwnAccount summary: Delete the authenticated account description: Requires the current password and the literal confirmation DELETE. The user is anonymized and active API credentials are revoked while historical references remain intact. tags: - Profile requestBody: required: true content: application/json: schema: type: object required: [current_password, confirmation] properties: current_password: type: string format: password confirmation: type: string const: DELETE responses: '204': description: Account anonymized and credentials revoked '400': description: Incorrect password or confirmation '401': $ref: '#/components/responses/UnauthorizedError' '422': $ref: '#/components/responses/ValidationError' /api/v1/me/permissions: get: operationId: getMyPermissions summary: Get current user permissions description: Retrieve the permissions of the currently authenticated user tags: - Profile responses: '200': description: Permissions retrieved successfully content: application/json: schema: type: object properties: permissions: type: array items: type: string example: 'users.create' '401': $ref: '#/components/responses/UnauthorizedError' /api/v1/me/roles: get: operationId: getMyRoles summary: Get current user roles description: Retrieve the roles of the currently authenticated user tags: - Profile responses: '200': description: Roles retrieved successfully content: application/json: schema: type: object properties: roles: type: array items: $ref: '#/components/schemas/Role' '401': $ref: '#/components/responses/UnauthorizedError' /api/v1/sessions/sign-up: post: operationId: signUp summary: User registration description: Creates a user, assigns the default role, optionally creates a personal workspace according to `REGISTRATION_WORKSPACE_MODE`, and returns tenant-scoped API tokens. Email delivery failure does not roll back the account. tags: - Authentication security: [] requestBody: required: true content: application/json: schema: type: object required: - full_name - email - password - password_confirmation properties: full_name: type: string example: 'John Doe' email: type: string format: email example: 'john@example.com' username: type: string example: 'johndoe' description: Optional username password: type: string format: password minLength: 8 example: 'password123' password_confirmation: type: string format: password example: 'password123' responses: '201': description: Registration successful content: application/json: schema: $ref: '#/components/schemas/AuthResponse' '422': $ref: '#/components/responses/ValidationError' /api/v1/verify-email: get: operationId: verifyEmail summary: Verify user email description: Verify a user's email address using a token from the verification link. tags: - Authentication security: [] parameters: - name: token in: query required: true schema: type: string description: The email verification token responses: '200': description: Email verified successfully '400': description: Invalid or expired token /api/v1/resend-verification-email: post: operationId: resendVerificationEmail summary: Resend verification email description: Resends the email verification link to the authenticated user. tags: - Authentication responses: '200': description: Verification email sent successfully '401': $ref: '#/components/responses/UnauthorizedError' '503': description: Verification email could not be delivered /api/v1/tenants: post: operationId: createTenant summary: Create a workspace description: Creates an active workspace, adds the authenticated user as owner, and returns a token pair carrying the new tenant id. Requires `tenants.create`. tags: - Tenants requestBody: required: true content: application/json: schema: type: object required: [name] properties: name: type: string minLength: 2 maxLength: 120 example: Acme Workspace responses: '201': description: Workspace created content: application/json: schema: type: object properties: tenant: $ref: '#/components/schemas/Tenant' auth: $ref: '#/components/schemas/AuthTokens' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/tenants/me: get: operationId: listMyTenants summary: List the authenticated user's tenant memberships tags: - Tenants responses: '200': description: Tenant memberships retrieved content: application/json: schema: type: object properties: data: type: array items: type: object properties: id: type: integer name: type: string slug: type: string is_active: type: boolean role: type: string enum: [owner, admin, member] '401': $ref: '#/components/responses/UnauthorizedError' /api/v1/tenants/switch: post: operationId: switchTenant summary: Switch the active API tenant description: Validates active membership and issues a fresh access/refresh pair carrying the selected tenant. tags: - Tenants requestBody: required: true content: application/json: schema: type: object required: [tenant_id] properties: tenant_id: type: integer minimum: 1 responses: '200': description: Active tenant switched content: application/json: schema: type: object properties: tenant: type: object auth: $ref: '#/components/schemas/AuthTokens' '400': description: Invalid tenant id '403': $ref: '#/components/responses/ForbiddenError' /api/v1/users: get: operationId: listUsers summary: List users description: Get a paginated list of users with optional search and sorting tags: - Users parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam' - $ref: '#/components/parameters/sortByParam' - $ref: '#/components/parameters/orderParam' - $ref: '#/components/parameters/searchParam' responses: '200': description: User list retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/Pagination' - type: object properties: data: type: array items: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/UnauthorizedError' post: operationId: createUser summary: Create user description: Create a new user account (requires the global `users.create` permission) tags: - Users requestBody: required: true content: application/json: schema: type: object required: - full_name - email - password - password_confirmation properties: full_name: type: string email: type: string format: email username: type: string password: type: string format: password minLength: 8 password_confirmation: type: string format: password responses: '201': description: User created successfully content: application/json: schema: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/UnauthorizedError' '422': $ref: '#/components/responses/ValidationError' /api/v1/users/{id}: get: operationId: getUserById summary: Get user by ID description: Retrieve a specific user's details tags: - Users parameters: - $ref: '#/components/parameters/pathId' responses: '200': description: User details retrieved successfully content: application/json: schema: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' put: operationId: updateUser summary: Update user description: Update user details (email and username cannot be changed) tags: - Users parameters: - $ref: '#/components/parameters/pathId' requestBody: required: true content: application/json: schema: type: object properties: full_name: type: string password: type: string format: password minLength: 8 password_confirmation: type: string format: password description: Required if password is provided responses: '200': description: User updated successfully content: application/json: schema: $ref: '#/components/schemas/User' '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' '422': $ref: '#/components/responses/ValidationError' delete: operationId: deleteUser summary: Delete user description: Soft delete a user (marks as deleted) tags: - Users parameters: - $ref: '#/components/parameters/pathId' responses: '204': description: User deleted successfully '401': $ref: '#/components/responses/UnauthorizedError' '404': $ref: '#/components/responses/NotFoundError' /api/v1/admin/roles: get: operationId: listRoles summary: List roles description: Get a paginated list of roles (requires ADMIN or ROOT role) tags: - Roles parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam' responses: '200': description: Role list retrieved successfully content: application/json: schema: allOf: - $ref: '#/components/schemas/Pagination' - type: object properties: data: type: array items: $ref: '#/components/schemas/Role' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' /api/v1/admin/roles/attach: put: operationId: attachRoles summary: Attach roles to user description: Assign roles to a user (requires ADMIN or ROOT role) tags: - Roles requestBody: required: true content: application/json: schema: type: object required: - user_id - role_ids properties: user_id: type: integer example: 1 role_ids: type: array items: type: integer example: [1, 2, 3] responses: '200': description: Roles attached successfully content: application/json: schema: type: object properties: message: type: string example: 'Role attached successfully' '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/permissions: get: operationId: listPermissions summary: List permissions description: Get a paginated list of permissions tags: - Permissions parameters: - $ref: '#/components/parameters/pageParam' - $ref: '#/components/parameters/perPageParam' responses: '200': description: Permission list retrieved successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' post: operationId: createPermission summary: Create permission description: Create a new permission tags: - Permissions requestBody: required: true content: application/json: schema: type: object required: - resource - action properties: resource: type: string example: 'posts' action: type: string example: 'create' description: type: string example: 'Allow creating posts' responses: '201': description: Permission created successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/roles/permissions/sync: put: operationId: syncRolePermissions summary: Sync role permissions description: Sync all permissions for a specific role tags: - Permissions requestBody: required: true content: application/json: schema: type: object required: - role_id - permission_ids properties: role_id: type: integer example: 2 permission_ids: type: array items: type: integer example: [1, 2, 3] responses: '200': description: Permissions synced successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/roles/permissions/attach: put: operationId: attachRolePermissions summary: Attach permissions to role description: Attach one or more permissions to a role tags: - Permissions requestBody: required: true content: application/json: schema: type: object required: - role_id - permission_ids properties: role_id: type: integer example: 2 permission_ids: type: array items: type: integer example: [4, 5] responses: '200': description: Permissions attached successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/roles/permissions/detach: put: operationId: detachRolePermissions summary: Detach permissions from role description: Detach one or more permissions from a role tags: - Permissions requestBody: required: true content: application/json: schema: type: object required: - role_id - permission_ids properties: role_id: type: integer example: 2 permission_ids: type: array items: type: integer example: [1] responses: '200': description: Permissions detached successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/users/permissions/sync: put: operationId: syncUserPermissions summary: Sync user permissions description: Sync all direct permissions for a specific user tags: - Permissions requestBody: required: true content: application/json: schema: type: object required: - user_id - permission_ids properties: user_id: type: integer example: 3 permission_ids: type: array items: type: integer example: [10, 11] responses: '200': description: User permissions synced successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/admin/users/{id}/permissions: get: operationId: getUserPermissions summary: Get user's direct permissions description: Get a list of direct permissions for a specific user tags: - Permissions parameters: - $ref: '#/components/parameters/pathId' responses: '200': description: User permissions retrieved successfully '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' /api/v1/admin/users/{id}/permissions/check: post: operationId: checkUserPermissions summary: Check user permissions description: Check if a user has specific permissions tags: - Permissions parameters: - $ref: '#/components/parameters/pathId' requestBody: required: true content: application/json: schema: type: object required: - permissions properties: permissions: type: array items: type: string example: ['users.create', 'files.delete'] responses: '200': description: Check result '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '422': $ref: '#/components/responses/ValidationError' /api/v1/files: get: operationId: listFiles summary: List files in the active workspace description: Returns a paginated tenant-scoped file list. Requires `files.list` and an active workspace. tags: - Files parameters: - $ref: '#/components/parameters/tenantHeader' - $ref: '#/components/parameters/pageParam' - name: per_page in: query schema: type: integer minimum: 1 maximum: 100 default: 20 responses: '200': description: Workspace file list content: application/json: schema: type: object properties: meta: type: object properties: total: type: integer perPage: type: integer currentPage: type: integer lastPage: type: integer firstPage: type: integer nextPageUrl: type: [string, 'null'] previousPageUrl: type: [string, 'null'] data: type: array items: $ref: '#/components/schemas/FileListItem' '400': description: An active workspace is required or the tenant header is malformed '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' /api/v1/files/upload: post: operationId: uploadFile summary: Upload file description: | Upload a file to the server. Files are automatically categorized based on their type. **File constraints:** - Maximum size: 10MB - Allowed extensions: jpeg, jpg, png, pdf, doc, docx, txt, csv, xls, xlsx, mp3, mp4, zip **Categories:** - `image`: jpeg, jpg, png - `document`: pdf, doc, docx, txt - `video`: mp4 - `audio`: mp3 - `file`: csv, xls, xlsx, zip, and others tags: - Files parameters: - $ref: '#/components/parameters/tenantHeader' requestBody: required: true content: multipart/form-data: schema: type: object required: - file properties: file: type: string format: binary description: File to upload responses: '201': description: File uploaded successfully content: application/json: schema: $ref: '#/components/schemas/FileUploadResponse' '401': $ref: '#/components/responses/UnauthorizedError' '422': description: File validation failed content: application/json: schema: $ref: '#/components/schemas/Error' example: errors: - message: 'File size should be less than 10MB' field: 'file' rule: 'size' /api/v1/files/{id}: delete: operationId: deleteFile summary: Delete a workspace file description: Deletes a file from storage and the database. `files.delete` may delete any workspace file; `files.delete.own` is restricted to the uploader. tags: - Files parameters: - $ref: '#/components/parameters/pathId' - $ref: '#/components/parameters/tenantHeader' responses: '204': description: File deleted successfully '400': description: An active workspace is required or the tenant header is malformed '401': $ref: '#/components/responses/UnauthorizedError' '403': $ref: '#/components/responses/ForbiddenError' '404': $ref: '#/components/responses/NotFoundError'