{ "openapi": "3.0.3", "info": { "title": "Kaneo API", "description": "Kaneo Project Management API - Manage projects, tasks, labels, and more", "version": "1.0.0" }, "servers": [ { "url": "http://localhost:1337/api", "description": "Kaneo API Server" } ], "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "description": "Bearer token authentication" }, "apiKeyCookie": { "type": "apiKey", "in": "cookie", "name": "apiKeyCookie", "description": "API Key authentication via cookie" } }, "schemas": { "User": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "emailVerified": { "type": "boolean", "default": false, "readOnly": true }, "image": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "updatedAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "isAnonymous": { "type": "boolean", "default": false, "readOnly": true } }, "required": [ "name", "email", "createdAt", "updatedAt" ] }, "Session": { "type": "object", "properties": { "id": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "token": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "updatedAt": { "type": "string", "format": "date-time" }, "ipAddress": { "type": "string" }, "userAgent": { "type": "string" }, "userId": { "type": "string" }, "activeOrganizationId": { "type": "string" }, "activeTeamId": { "type": "string" } }, "required": [ "expiresAt", "token", "createdAt", "updatedAt", "userId" ] }, "Account": { "type": "object", "properties": { "id": { "type": "string" }, "accountId": { "type": "string" }, "providerId": { "type": "string" }, "userId": { "type": "string" }, "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "idToken": { "type": "string" }, "accessTokenExpiresAt": { "type": "string", "format": "date-time" }, "refreshTokenExpiresAt": { "type": "string", "format": "date-time" }, "scope": { "type": "string" }, "password": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "accountId", "providerId", "userId", "createdAt", "updatedAt" ] }, "Verification": { "type": "object", "properties": { "id": { "type": "string" }, "identifier": { "type": "string" }, "value": { "type": "string" }, "expiresAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "updatedAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" } }, "required": [ "identifier", "value", "expiresAt", "createdAt", "updatedAt" ] }, "Organization": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "slug": { "type": "string" }, "logo": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "metadata": { "type": "string" }, "description": { "type": "string" } }, "required": [ "name", "slug", "createdAt" ] }, "Team": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "organizationId": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" } }, "required": [ "name", "organizationId", "createdAt" ] }, "TeamMember": { "type": "object", "properties": { "id": { "type": "string" }, "teamId": { "type": "string" }, "userId": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "teamId", "userId" ] }, "Member": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "userId": { "type": "string" }, "role": { "type": "string", "default": "member" }, "createdAt": { "type": "string", "format": "date-time" } }, "required": [ "organizationId", "userId", "role", "createdAt" ] }, "Invitation": { "type": "object", "properties": { "id": { "type": "string" }, "organizationId": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string" }, "teamId": { "type": "string" }, "status": { "type": "string", "default": "pending" }, "expiresAt": { "type": "string", "format": "date-time" }, "createdAt": { "type": "string", "format": "date-time", "default": "Generated at runtime" }, "inviterId": { "type": "string" } }, "required": [ "organizationId", "email", "status", "expiresAt", "createdAt", "inviterId" ] }, "Apikey": { "type": "object", "properties": { "id": { "type": "string" }, "configId": { "type": "string", "default": "default", "readOnly": true }, "name": { "type": "string", "readOnly": true }, "start": { "type": "string", "readOnly": true }, "referenceId": { "type": "string", "readOnly": true }, "prefix": { "type": "string", "readOnly": true }, "key": { "type": "string", "readOnly": true }, "refillInterval": { "type": "number", "readOnly": true }, "refillAmount": { "type": "number", "readOnly": true }, "lastRefillAt": { "type": "string", "format": "date-time", "readOnly": true }, "enabled": { "type": "boolean", "default": true, "readOnly": true }, "rateLimitEnabled": { "type": "boolean", "default": true, "readOnly": true }, "rateLimitTimeWindow": { "type": "number", "default": 86400000, "readOnly": true }, "rateLimitMax": { "type": "number", "default": 10, "readOnly": true }, "requestCount": { "type": "number", "default": 0, "readOnly": true }, "remaining": { "type": "number", "readOnly": true }, "lastRequest": { "type": "string", "format": "date-time", "readOnly": true }, "expiresAt": { "type": "string", "format": "date-time", "readOnly": true }, "createdAt": { "type": "string", "format": "date-time", "readOnly": true }, "updatedAt": { "type": "string", "format": "date-time", "readOnly": true }, "permissions": { "type": "string", "readOnly": true }, "metadata": { "type": "string" } }, "required": [] } } }, "security": [ { "bearerAuth": [] } ], "paths": { "/config": { "get": { "operationId": "getConfig", "tags": [ "Config" ], "description": "Get application settings and configuration", "responses": { "200": { "description": "Application settings", "content": { "application/json": { "schema": { "type": "object", "properties": { "disableRegistration": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "isDemoMode": { "type": "boolean" }, "hasSmtp": { "type": "boolean" }, "hasGithubSignIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "hasGoogleSignIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "hasDiscordSignIn": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "hasCustomOAuth": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "hasGuestAccess": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "disableRegistration", "isDemoMode", "hasSmtp", "hasGithubSignIn", "hasGoogleSignIn", "hasDiscordSignIn", "hasCustomOAuth", "hasGuestAccess" ] } } } } } } }, "/project": { "get": { "operationId": "listProjects", "tags": [ "Projects" ], "description": "Get all projects in a workspace", "responses": { "200": { "description": "List of projects with statistics", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } } } } } }, "parameters": [ { "in": "query", "name": "workspaceId", "schema": { "type": "string" }, "required": true } ] }, "post": { "operationId": "createProject", "tags": [ "Projects" ], "description": "Create a new project in a workspace", "responses": { "200": { "description": "Project created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "workspaceId": { "type": "string" }, "icon": { "type": "string" }, "slug": { "type": "string" } }, "required": [ "name", "workspaceId", "icon", "slug" ] } } } } } }, "/project/{id}": { "get": { "operationId": "getProject", "tags": [ "Projects" ], "description": "Get a specific project by ID", "responses": { "200": { "description": "Project details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true }, { "in": "query", "name": "workspaceId", "schema": { "type": "string" }, "required": true } ] }, "put": { "operationId": "updateProject", "tags": [ "Projects" ], "description": "Update an existing project", "responses": { "200": { "description": "Project updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "icon": { "type": "string" }, "slug": { "type": "string" }, "description": { "type": "string" }, "isPublic": { "type": "boolean" } }, "required": [ "name", "icon", "slug", "description", "isPublic" ] } } } } }, "delete": { "operationId": "deleteProject", "tags": [ "Projects" ], "description": "Delete a project by ID", "responses": { "200": { "description": "Project deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/task/tasks/{projectId}": { "get": { "operationId": "listTasks", "tags": [ "Tasks" ], "description": "Get all tasks for a specific project", "responses": { "200": { "description": "Project with tasks organized by columns", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] } }, "/task/{projectId}": { "post": { "operationId": "createTask", "tags": [ "Tasks" ], "description": "Create a new task in a project", "responses": { "200": { "description": "Task created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "dueDate": { "type": "string" }, "priority": { "type": "string" }, "status": { "type": "string" }, "userId": { "type": "string" } }, "required": [ "title", "description", "priority", "status" ] } } } }, "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "projectId", "required": true } ] } }, "/task/{id}": { "get": { "operationId": "getTask", "tags": [ "Tasks" ], "description": "Get a specific task by ID", "responses": { "200": { "description": "Task details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] }, "put": { "operationId": "updateTask", "tags": [ "Tasks" ], "description": "Update all fields of a task", "responses": { "200": { "description": "Task updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "dueDate": { "type": "string" }, "priority": { "type": "string" }, "status": { "type": "string" }, "projectId": { "type": "string" }, "position": { "type": "number" }, "userId": { "type": "string" } }, "required": [ "title", "description", "priority", "status", "projectId", "position" ] } } } } }, "delete": { "operationId": "deleteTask", "tags": [ "Tasks" ], "description": "Delete a task by ID", "responses": { "200": { "description": "Task deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/task/export/{projectId}": { "get": { "operationId": "exportTasks", "tags": [ "Tasks" ], "description": "Export all tasks from a project", "responses": { "200": { "description": "Exported tasks data", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] } }, "/task/import/{projectId}": { "post": { "operationId": "importTasks", "tags": [ "Tasks" ], "description": "Import multiple tasks into a project", "responses": { "200": { "description": "Tasks imported successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "tasks": { "type": "array", "items": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "type": "string" }, "status": { "type": "string" }, "priority": { "type": "string" }, "dueDate": { "type": "string" }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "title", "status" ] } } }, "required": [ "tasks" ] } } } } } }, "/task/status/{id}": { "put": { "operationId": "updateTaskStatus", "tags": [ "Tasks" ], "description": "Update only the status of a task", "responses": { "200": { "description": "Task status updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string" } }, "required": [ "status" ] } } } } } }, "/task/priority/{id}": { "put": { "operationId": "updateTaskPriority", "tags": [ "Tasks" ], "description": "Update only the priority of a task", "responses": { "200": { "description": "Task priority updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "priority": { "type": "string" } }, "required": [ "priority" ] } } } } } }, "/task/assignee/{id}": { "put": { "operationId": "updateTaskAssignee", "tags": [ "Tasks" ], "description": "Assign or unassign a task to a user", "responses": { "200": { "description": "Task assignee updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" } }, "required": [ "userId" ] } } } } } }, "/task/due-date/{id}": { "put": { "operationId": "updateTaskDueDate", "tags": [ "Tasks" ], "description": "Update only the due date of a task", "responses": { "200": { "description": "Task due date updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "dueDate": { "type": "string" } }, "required": [] } } } } } }, "/task/title/{id}": { "put": { "operationId": "updateTaskTitle", "tags": [ "Tasks" ], "description": "Update only the title of a task", "responses": { "200": { "description": "Task title updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "title": { "type": "string" } }, "required": [ "title" ] } } } } } }, "/task/description/{id}": { "put": { "operationId": "updateTaskDescription", "tags": [ "Tasks" ], "description": "Update only the description of a task", "responses": { "200": { "description": "Task description updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "description": { "type": "string" } }, "required": [ "description" ] } } } } } }, "/column/{projectId}": { "get": { "operationId": "getColumns", "tags": [ "Columns" ], "description": "Get all columns for a project", "responses": { "200": { "description": "List of columns ordered by position", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] }, "post": { "operationId": "createColumn", "tags": [ "Columns" ], "description": "Create a new column in a project", "responses": { "200": { "description": "Column created successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "icon": { "type": "string" }, "color": { "type": "string" }, "isFinal": { "type": "boolean" } }, "required": [ "name" ] } } } } } }, "/column/reorder/{projectId}": { "put": { "operationId": "reorderColumns", "tags": [ "Columns" ], "description": "Reorder columns in a project", "responses": { "200": { "description": "Columns reordered successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "columns": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "position": { "type": "number" } }, "required": [ "id", "position" ] } } }, "required": [ "columns" ] } } } } } }, "/column/{id}": { "put": { "operationId": "updateColumn", "tags": [ "Columns" ], "description": "Update a column", "responses": { "200": { "description": "Column updated successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "color": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isFinal": { "type": "boolean" } }, "required": [] } } } } }, "delete": { "operationId": "deleteColumn", "tags": [ "Columns" ], "description": "Delete a column", "responses": { "200": { "description": "Column deleted successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/activity/{taskId}": { "get": { "operationId": "getActivities", "tags": [ "Activity" ], "description": "Get all activities for a specific task", "responses": { "200": { "description": "List of activities for the task", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } } } } }, "parameters": [ { "in": "path", "name": "taskId", "schema": { "type": "string" }, "required": true } ] } }, "/activity/create": { "post": { "operationId": "createActivity", "tags": [ "Activity" ], "description": "Create a new activity (system-generated event)", "responses": { "200": { "description": "Activity created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "taskId": { "type": "string" }, "userId": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string" } }, "required": [ "taskId", "userId", "message", "type" ] } } } } } }, "/activity/comment": { "post": { "operationId": "createComment", "tags": [ "Activity" ], "description": "Create a new comment on a task", "responses": { "200": { "description": "Comment created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "taskId": { "type": "string" }, "comment": { "type": "string" } }, "required": [ "taskId", "comment" ] } } } } }, "put": { "operationId": "updateComment", "tags": [ "Activity" ], "description": "Update an existing comment", "responses": { "200": { "description": "Comment updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activityId": { "type": "string" }, "comment": { "type": "string" } }, "required": [ "activityId", "comment" ] } } } } }, "delete": { "operationId": "deleteComment", "tags": [ "Activity" ], "description": "Delete a comment", "responses": { "200": { "description": "Comment deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "activityId": { "type": "string" } }, "required": [ "activityId" ] } } } } } }, "/time-entry/task/{taskId}": { "get": { "operationId": "getTaskTimeEntries", "tags": [ "Time Entries" ], "description": "Get all time entries for a specific task", "responses": { "200": { "description": "List of time entries for the task", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startTime": { }, "endTime": { }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "createdAt": { } }, "required": [ "id", "taskId", "userId", "description", "startTime", "duration", "createdAt" ] } } } } } }, "parameters": [ { "in": "path", "name": "taskId", "schema": { "type": "string" }, "required": true } ] } }, "/time-entry/{id}": { "get": { "operationId": "getTimeEntry", "tags": [ "Time Entries" ], "description": "Get a specific time entry by ID", "responses": { "200": { "description": "Time entry details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startTime": { }, "endTime": { }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "createdAt": { } }, "required": [ "id", "taskId", "userId", "description", "startTime", "duration", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] }, "put": { "operationId": "updateTimeEntry", "tags": [ "Time Entries" ], "description": "Update an existing time entry", "responses": { "200": { "description": "Time entry updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startTime": { }, "endTime": { }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "createdAt": { } }, "required": [ "id", "taskId", "userId", "description", "startTime", "duration", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "startTime": { "type": "string" }, "endTime": { "type": "string" }, "description": { "type": "string" } }, "required": [ "startTime" ] } } } } } }, "/time-entry": { "post": { "operationId": "createTimeEntry", "tags": [ "Time Entries" ], "description": "Create a new time entry for a task", "responses": { "200": { "description": "Time entry created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startTime": { }, "endTime": { }, "duration": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "createdAt": { } }, "required": [ "id", "taskId", "userId", "description", "startTime", "duration", "createdAt" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "taskId": { "type": "string" }, "startTime": { "type": "string" }, "endTime": { "type": "string" }, "description": { "type": "string" } }, "required": [ "taskId", "startTime" ] } } } } } }, "/label/task/{taskId}": { "get": { "operationId": "getTaskLabels", "tags": [ "Labels" ], "description": "Get all labels assigned to a specific task", "responses": { "200": { "description": "List of labels for the task", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } } }, "parameters": [ { "in": "path", "name": "taskId", "schema": { "type": "string" }, "required": true } ] } }, "/label/workspace/{workspaceId}": { "get": { "operationId": "getWorkspaceLabels", "tags": [ "Labels" ], "description": "Get all labels for a specific workspace", "responses": { "200": { "description": "List of labels in the workspace", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } } }, "parameters": [ { "in": "path", "name": "workspaceId", "schema": { "type": "string" }, "required": true } ] } }, "/label": { "post": { "operationId": "createLabel", "tags": [ "Labels" ], "description": "Create a new label in a workspace", "responses": { "200": { "description": "Label created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "color": { "type": "string" }, "workspaceId": { "type": "string" }, "taskId": { "type": "string" } }, "required": [ "name", "color", "workspaceId" ] } } } } } }, "/label/{id}": { "get": { "operationId": "getLabel", "tags": [ "Labels" ], "description": "Get a specific label by ID", "responses": { "200": { "description": "Label details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] }, "put": { "operationId": "updateLabel", "tags": [ "Labels" ], "description": "Update an existing label", "responses": { "200": { "description": "Label updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string" }, "color": { "type": "string" } }, "required": [ "name", "color" ] } } } } }, "delete": { "operationId": "deleteLabel", "tags": [ "Labels" ], "description": "Delete a label by ID", "responses": { "200": { "description": "Label deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "color": { "type": "string" }, "createdAt": { }, "taskId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "workspaceId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "color", "createdAt", "taskId", "workspaceId" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/notification": { "get": { "operationId": "listNotifications", "tags": [ "Notifications" ], "description": "Get all notifications for the current user", "responses": { "200": { "description": "List of notifications", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "title": { "type": "string" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": { "enum": [ "info", "task_created", "workspace_created", "task_status_changed", "task_assignee_changed", "time_entry_created" ] }, "isRead": { "type": "boolean" }, "resourceId": { "type": "string" }, "resourceType": { "enum": [ "task", "workspace" ] }, "createdAt": { } }, "required": [ "id", "userId", "title", "content", "type", "createdAt" ] } } } } } } }, "post": { "operationId": "createNotification", "tags": [ "Notifications" ], "description": "Create a new notification for a user", "responses": { "200": { "description": "Notification created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "title": { "type": "string" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": { "enum": [ "info", "task_created", "workspace_created", "task_status_changed", "task_assignee_changed", "time_entry_created" ] }, "isRead": { "type": "boolean" }, "resourceId": { "type": "string" }, "resourceType": { "enum": [ "task", "workspace" ] }, "createdAt": { } }, "required": [ "id", "userId", "title", "content", "type", "createdAt" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "userId": { "type": "string" }, "title": { "type": "string" }, "message": { "type": "string" }, "type": { "type": "string" }, "relatedEntityId": { "type": "string" }, "relatedEntityType": { "type": "string" } }, "required": [ "userId", "title", "message", "type" ] } } } } } }, "/notification/{id}/read": { "patch": { "operationId": "markNotificationAsRead", "tags": [ "Notifications" ], "description": "Mark a specific notification as read", "responses": { "200": { "description": "Notification marked as read", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "title": { "type": "string" }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "type": { "enum": [ "info", "task_created", "workspace_created", "task_status_changed", "task_assignee_changed", "time_entry_created" ] }, "isRead": { "type": "boolean" }, "resourceId": { "type": "string" }, "resourceType": { "enum": [ "task", "workspace" ] }, "createdAt": { } }, "required": [ "id", "userId", "title", "content", "type", "createdAt" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/notification/read-all": { "patch": { "operationId": "markAllNotificationsAsRead", "tags": [ "Notifications" ], "description": "Mark all notifications as read for the current user", "responses": { "200": { "description": "All notifications marked as read", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "count": { "type": "number" } }, "required": [ "success" ] } } } } } } }, "/notification/clear-all": { "delete": { "operationId": "clearAllNotifications", "tags": [ "Notifications" ], "description": "Clear all notifications for the current user", "responses": { "200": { "description": "All notifications cleared", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" }, "count": { "type": "number" } }, "required": [ "success" ] } } } } } } }, "/search": { "get": { "operationId": "globalSearch", "tags": [ "Search" ], "description": "Search across tasks, projects, workspaces, comments, and activities", "responses": { "200": { "description": "Search results", "content": { "application/json": { "schema": { "type": "object", "properties": { "tasks": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "position": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "number": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "title": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "status": { "type": "string" }, "priority": { "enum": [ "no-priority", "low", "medium", "high", "urgent" ] }, "dueDate": { }, "createdAt": { } }, "required": [ "id", "projectId", "position", "number", "userId", "title", "description", "status", "priority", "createdAt" ] } }, "projects": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "workspaceId": { "type": "string" }, "slug": { "type": "string" }, "icon": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { }, "isPublic": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [ "id", "workspaceId", "slug", "icon", "name", "description", "createdAt", "isPublic" ] } }, "workspaces": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "slug": { "type": "string" }, "logo": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "metadata": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { } }, "required": [ "id", "name", "slug", "logo", "metadata", "description", "createdAt" ] } }, "comments": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } }, "activities": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "type": { "enum": [ "comment", "task", "status_changed", "priority_changed", "unassigned", "assignee_changed", "due_date_changed", "title_changed", "description_changed", "create" ] }, "createdAt": { }, "userId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "content": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUserAvatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalSource": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "externalUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "taskId", "type", "createdAt", "userId", "content", "externalUserName", "externalUserAvatar", "externalSource", "externalUrl" ] } } }, "required": [] } } } } }, "parameters": [ { "in": "query", "name": "q", "schema": { "type": "string", "minLength": 1 }, "required": true }, { "in": "query", "name": "type", "schema": { "enum": [ "all", "tasks", "projects", "workspaces", "comments", "activities" ], "default": "all" } }, { "in": "query", "name": "workspaceId", "schema": { "type": "string" } }, { "in": "query", "name": "projectId", "schema": { "type": "string" } }, { "in": "query", "name": "limit", "schema": { "type": "string", "minimum": 1, "maximum": 50, "default": "20" } }, { "in": "query", "name": "userEmail", "schema": { "type": "string", "format": "email" } } ] } }, "/github-integration/app-info": { "get": { "operationId": "getGitHubAppInfo", "tags": [ "GitHub" ], "description": "Get GitHub app configuration information", "responses": { "200": { "description": "GitHub app information", "content": { "application/json": { "schema": { "type": "object", "properties": { "appName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "appName" ] } } } } } } }, "/github-integration/repositories": { "get": { "operationId": "listGitHubRepositories", "tags": [ "GitHub" ], "description": "List all accessible GitHub repositories", "responses": { "200": { "description": "List of repositories", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "number" }, "name": { "type": "string" }, "full_name": { "type": "string" }, "owner": { "type": "object", "properties": { "login": { "type": "string" } }, "required": [ "login" ] }, "private": { "type": "boolean" }, "html_url": { "type": "string" } }, "required": [ "id", "name", "full_name", "owner", "private", "html_url" ] } } } } } } } }, "/github-integration/verify": { "post": { "operationId": "verifyGitHubInstallation", "tags": [ "GitHub" ], "description": "Verify GitHub app installation for a repository", "responses": { "200": { "description": "Verification result", "content": { "application/json": { "schema": { "type": "object", "properties": { "installed": { "type": "boolean" }, "message": { "type": "string" } }, "required": [ "installed" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "repositoryOwner": { "type": "string", "minLength": 1 }, "repositoryName": { "type": "string", "minLength": 1 } }, "required": [ "repositoryOwner", "repositoryName" ] } } } } } }, "/github-integration/project/{projectId}": { "get": { "operationId": "getGitHubIntegration", "tags": [ "GitHub" ], "description": "Get GitHub integration for a project", "responses": { "200": { "description": "GitHub integration details", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "repositoryOwner": { "type": "string" }, "repositoryName": { "type": "string" }, "installationId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "isActive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "createdAt": { }, "updatedAt": { } }, "required": [ "id", "projectId", "repositoryOwner", "repositoryName", "installationId", "isActive", "createdAt", "updatedAt" ] } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] }, "post": { "operationId": "createGitHubIntegration", "tags": [ "GitHub" ], "description": "Create a new GitHub integration for a project", "responses": { "200": { "description": "Integration created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "repositoryOwner": { "type": "string" }, "repositoryName": { "type": "string" }, "installationId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "isActive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "createdAt": { }, "updatedAt": { } }, "required": [ "id", "projectId", "repositoryOwner", "repositoryName", "installationId", "isActive", "createdAt", "updatedAt" ] } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "repositoryOwner": { "type": "string", "minLength": 1 }, "repositoryName": { "type": "string", "minLength": 1 } }, "required": [ "repositoryOwner", "repositoryName" ] } } } } }, "patch": { "operationId": "updateGitHubIntegration", "tags": [ "GitHub" ], "description": "Update GitHub integration settings", "responses": { "200": { "description": "Integration updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "repositoryOwner": { "type": "string" }, "repositoryName": { "type": "string" }, "installationId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "isActive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "createdAt": { }, "updatedAt": { } }, "required": [ "id", "projectId", "repositoryOwner", "repositoryName", "installationId", "isActive", "createdAt", "updatedAt" ] } } } }, "404": { "description": "Integration not found", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "isActive": { "type": "boolean" } }, "required": [] } } } } }, "delete": { "operationId": "deleteGitHubIntegration", "tags": [ "GitHub" ], "description": "Delete GitHub integration for a project", "responses": { "200": { "description": "Integration deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "projectId": { "type": "string" }, "repositoryOwner": { "type": "string" }, "repositoryName": { "type": "string" }, "installationId": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "isActive": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "createdAt": { }, "updatedAt": { } }, "required": [ "id", "projectId", "repositoryOwner", "repositoryName", "installationId", "isActive", "createdAt", "updatedAt" ] } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] } }, "/github-integration/import-issues": { "post": { "operationId": "importGitHubIssues", "tags": [ "GitHub" ], "description": "Import GitHub issues as tasks", "responses": { "200": { "description": "Issues imported successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "imported": { "type": "number" }, "skipped": { "type": "number" }, "errors": { "type": "array", "items": { "type": "string" } } }, "required": [ "imported", "skipped" ] } } } } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "projectId": { "type": "string" } }, "required": [ "projectId" ] } } } } } }, "/external-link/task/{taskId}": { "get": { "operationId": "getExternalLinksByTask", "tags": [ "External Links" ], "description": "Get all external links for a task", "responses": { "200": { "description": "External links for the task", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "taskId": { "type": "string" }, "integrationId": { "type": "string" }, "resourceType": { "type": "string" }, "externalId": { "type": "string" }, "url": { "type": "string" }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "metadata": { }, "createdAt": { }, "updatedAt": { } }, "required": [ "id", "taskId", "integrationId", "resourceType", "externalId", "url", "title", "metadata", "createdAt", "updatedAt" ] } } } } } }, "parameters": [ { "in": "path", "name": "taskId", "schema": { "type": "string" }, "required": true } ] } }, "/workflow-rule/{projectId}": { "get": { "operationId": "getWorkflowRules", "tags": [ "Workflow Rules" ], "description": "Get all workflow rules for a project", "responses": { "200": { "description": "List of workflow rules", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ] }, "put": { "operationId": "upsertWorkflowRule", "tags": [ "Workflow Rules" ], "description": "Create or update a workflow rule", "responses": { "200": { "description": "Workflow rule upserted successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "projectId", "schema": { "type": "string" }, "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "integrationType": { "type": "string" }, "eventType": { "type": "string" }, "columnId": { "type": "string" } }, "required": [ "integrationType", "eventType", "columnId" ] } } } } } }, "/workflow-rule/{id}": { "delete": { "operationId": "deleteWorkflowRule", "tags": [ "Workflow Rules" ], "description": "Delete a workflow rule", "responses": { "200": { "description": "Workflow rule deleted successfully", "content": { "application/json": { "schema": { } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/invitation/pending": { "get": { "operationId": "getUserPendingInvitations", "tags": [ "Invitations" ], "description": "Get all pending invitations for the current user", "responses": { "200": { "description": "List of pending invitations", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "workspaceId": { "type": "string" }, "workspaceName": { "type": "string" }, "inviterName": { "type": "string" }, "expiresAt": { "type": "string" }, "createdAt": { "type": "string" }, "status": { "type": "string" } }, "required": [ "id", "email", "workspaceId", "workspaceName", "inviterName", "expiresAt", "createdAt", "status" ] } } } } } } } }, "/invitation/{id}": { "get": { "operationId": "getInvitationDetails", "tags": [ "Invitations" ], "description": "Get details of a specific invitation by ID", "responses": { "200": { "description": "Invitation details", "content": { "application/json": { "schema": { "type": "object", "properties": { "valid": { "type": "boolean" }, "invitation": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "workspaceName": { "type": "string" }, "inviterName": { "type": "string" }, "expiresAt": { "type": "string" }, "status": { "type": "string" }, "expired": { "type": "boolean" } }, "required": [ "id", "email", "workspaceName", "inviterName", "expiresAt", "status", "expired" ] }, "error": { "type": "string" } }, "required": [ "valid" ] } } } } }, "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string" }, "required": true } ] } }, "/sign-in/social": { "post": { "tags": [ "Default" ], "description": "Sign in with a social provider", "operationId": "socialSignIn", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "callbackURL": { "type": [ "string", "null" ], "description": "Callback URL to redirect to after the user has signed in" }, "newUserCallbackURL": { "type": [ "string", "null" ] }, "errorCallbackURL": { "type": [ "string", "null" ], "description": "Callback URL to redirect to if an error happens" }, "provider": { "type": "string" }, "disableRedirect": { "type": [ "boolean", "null" ], "description": "Disable automatic redirection to the provider. Useful for handling the redirection yourself" }, "idToken": { "type": [ "object", "null" ], "properties": { "token": { "type": "string", "description": "ID token from the provider" }, "nonce": { "type": [ "string", "null" ], "description": "Nonce used to generate the token" }, "accessToken": { "type": [ "string", "null" ], "description": "Access token from the provider" }, "refreshToken": { "type": [ "string", "null" ], "description": "Refresh token from the provider" }, "expiresAt": { "type": [ "number", "null" ], "description": "Expiry date of the token" } }, "required": [ "token" ] }, "scopes": { "type": [ "array", "null" ], "description": "Array of scopes to request from the provider. This will override the default scopes passed." }, "requestSignUp": { "type": [ "boolean", "null" ], "description": "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider" }, "loginHint": { "type": [ "string", "null" ], "description": "The login hint to use for the authorization code request" }, "additionalData": { "type": [ "string", "null" ] } }, "required": [ "provider" ] } } } }, "responses": { "200": { "description": "Success - Returns either session details or redirect URL", "content": { "application/json": { "schema": { "type": "object", "description": "Session response when idToken is provided", "properties": { "token": { "type": "string" }, "user": { "type": "object", "$ref": "#/components/schemas/User" }, "url": { "type": "string" }, "redirect": { "type": "boolean", "enum": [false] } }, "required": [ "redirect", "token", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/callback/{id}": { "get": { "tags": [ "Default" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } }, "post": { "tags": [ "Default" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/get-session": { "get": { "tags": [ "Default" ], "description": "Get the current session", "operationId": "getSession", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "nullable": true, "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "session", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } }, "post": { "tags": [ "Default" ], "description": "Get the current session", "operationId": "getSession", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "nullable": true, "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "session", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-out": { "post": { "tags": [ "Default" ], "description": "Sign out the current user", "operationId": "signOut", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-up/email": { "post": { "tags": [ "Default" ], "description": "Sign up a user using email and password", "operationId": "signUpWithEmailAndPassword", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the user" }, "email": { "type": "string", "description": "The email of the user" }, "password": { "type": "string", "description": "The password of the user" }, "image": { "type": "string", "description": "The profile image URL of the user" }, "callbackURL": { "type": "string", "description": "The URL to use for email verification callback" }, "rememberMe": { "type": "boolean", "description": "If this is false, the session will not be remembered. Default is `true`." } }, "required": [ "name", "email", "password" ] } } } }, "responses": { "200": { "description": "Successfully created user", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "nullable": true, "description": "Authentication token for the session" }, "user": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the user" }, "email": { "type": "string", "format": "email", "description": "The email address of the user" }, "name": { "type": "string", "description": "The name of the user" }, "image": { "type": "string", "format": "uri", "nullable": true, "description": "The profile image URL of the user" }, "emailVerified": { "type": "boolean", "description": "Whether the email has been verified" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the user was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the user was last updated" } }, "required": [ "id", "email", "name", "emailVerified", "createdAt", "updatedAt" ] } }, "required": [ "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "422": { "description": "Unprocessable Entity. User already exists or failed to create user.", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } } }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-in/email": { "post": { "tags": [ "Default" ], "description": "Sign in with email and password", "operationId": "signInEmail", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email of the user" }, "password": { "type": "string", "description": "Password of the user" }, "callbackURL": { "type": [ "string", "null" ], "description": "Callback URL to use as a redirect for email verification" }, "rememberMe": { "type": [ "boolean", "null" ], "description": "If this is false, the session will not be remembered. Default is `true`.", "default": true } }, "required": [ "email", "password" ] } } } }, "responses": { "200": { "description": "Success - Returns either session details or redirect URL", "content": { "application/json": { "schema": { "type": "object", "description": "Session response when idToken is provided", "properties": { "redirect": { "type": "boolean", "enum": [false] }, "token": { "type": "string", "description": "Session token" }, "url": { "type": "string", "nullable": true }, "user": { "type": "object", "$ref": "#/components/schemas/User" } }, "required": [ "redirect", "token", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/reset-password": { "post": { "tags": [ "Default" ], "description": "Reset the password for a user", "operationId": "resetPassword", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "newPassword": { "type": "string", "description": "The new password to set" }, "token": { "type": [ "string", "null" ], "description": "The token to reset the password" } }, "required": [ "newPassword" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/verify-password": { "post": { "tags": [ "Default" ], "description": "Verify the current user's password", "operationId": "verifyPassword", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "password": { "type": "string", "description": "The password to verify" } }, "required": [ "password" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/verify-email": { "get": { "tags": [ "Default" ], "description": "Verify the email of the user", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "token", "in": "query", "description": "The token to verify the email", "required": true, "schema": { "type": "string" } }, { "name": "callbackURL", "in": "query", "description": "The URL to redirect to after email verification", "required": false, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/components/schemas/User" }, "status": { "type": "boolean", "description": "Indicates if the email was verified successfully" } }, "required": [ "user", "status" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/send-verification-email": { "post": { "tags": [ "Default" ], "description": "Send a verification email to the user", "operationId": "sendVerificationEmail", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "The email to send the verification email to", "example": "user@example.com" }, "callbackURL": { "type": "string", "description": "The URL to use for email verification callback", "example": "https://example.com/callback", "nullable": true } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean", "description": "Indicates if the email was sent successfully", "example": true } } } } } }, "400": { "description": "Bad Request", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Error message", "example": "Verification email isn't enabled" } } } } } }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/change-email": { "post": { "tags": [ "Default" ], "operationId": "changeEmail", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "newEmail": { "type": "string", "description": "The new email address to set must be a valid email address" }, "callbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to after email verification" } }, "required": [ "newEmail" ] } } } }, "responses": { "200": { "description": "Email change request processed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/components/schemas/User" }, "status": { "type": "boolean", "description": "Indicates if the request was successful" }, "message": { "type": "string", "enum": [ "Email updated", "Verification email sent" ], "description": "Status message of the email change process", "nullable": true } }, "required": [ "status" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/change-password": { "post": { "tags": [ "Default" ], "description": "Change the password of the user", "operationId": "changePassword", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "newPassword": { "type": "string", "description": "The new password to set" }, "currentPassword": { "type": "string", "description": "The current password is required" }, "revokeOtherSessions": { "type": [ "boolean", "null" ], "description": "Must be a boolean value" } }, "required": [ "newPassword", "currentPassword" ] } } } }, "responses": { "200": { "description": "Password successfully changed", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "nullable": true, "description": "New session token if other sessions were revoked" }, "user": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the user" }, "email": { "type": "string", "format": "email", "description": "The email address of the user" }, "name": { "type": "string", "description": "The name of the user" }, "image": { "type": "string", "format": "uri", "nullable": true, "description": "The profile image URL of the user" }, "emailVerified": { "type": "boolean", "description": "Whether the email has been verified" }, "createdAt": { "type": "string", "format": "date-time", "description": "When the user was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "When the user was last updated" } }, "required": [ "id", "email", "name", "emailVerified", "createdAt", "updatedAt" ] } }, "required": [ "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/update-session": { "post": { "tags": [ "Default" ], "description": "Update the current session", "operationId": "updateSession", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "session": { "type": "object", "$ref": "#/components/schemas/Session" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/update-user": { "post": { "tags": [ "Default" ], "description": "Update the current user", "operationId": "updateUser", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the user" }, "image": { "type": "string", "description": "The image of the user", "nullable": true } } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "$ref": "#/components/schemas/User" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/delete-user": { "post": { "tags": [ "Default" ], "description": "Delete the user", "operationId": "deleteUser", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "callbackURL": { "type": "string", "description": "The callback URL to redirect to after the user is deleted" }, "password": { "type": "string", "description": "The user's password. Required if session is not fresh" }, "token": { "type": "string", "description": "The deletion verification token" } } } } } }, "responses": { "200": { "description": "User deletion processed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the operation was successful" }, "message": { "type": "string", "enum": [ "User deleted", "Verification email sent" ], "description": "Status message of the deletion process" } }, "required": [ "success", "message" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/request-password-reset": { "post": { "tags": [ "Default" ], "description": "Send a password reset email to the user", "operationId": "requestPasswordReset", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "The email address of the user to send a password reset email to" }, "redirectTo": { "type": [ "string", "null" ], "description": "The URL to redirect the user to reset their password. If the token isn't valid or expired, it'll be redirected with a query parameter `?error=INVALID_TOKEN`. If the token is valid, it'll be redirected with a query parameter `?token=VALID_TOKEN" } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" }, "message": { "type": "string" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/reset-password/{token}": { "get": { "tags": [ "Default" ], "description": "Redirects the user to the callback URL with the token", "operationId": "resetPasswordCallback", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "token", "in": "path", "required": true, "description": "The token to reset the password", "schema": { "type": "string" } }, { "name": "callbackURL", "in": "query", "required": true, "description": "The URL to redirect the user to reset their password", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/list-sessions": { "get": { "tags": [ "Default" ], "description": "List all active sessions for the user", "operationId": "listUserSessions", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Session" } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/revoke-session": { "post": { "tags": [ "Default" ], "description": "Revoke a single session", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "description": "The token to revoke" } }, "required": [ "token" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean", "description": "Indicates if the session was revoked successfully" } }, "required": [ "status" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/revoke-sessions": { "post": { "tags": [ "Default" ], "description": "Revoke all sessions for the user", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean", "description": "Indicates if all sessions were revoked successfully" } }, "required": [ "status" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/revoke-other-sessions": { "post": { "tags": [ "Default" ], "description": "Revoke all other sessions for the user except the current one", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { } } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean", "description": "Indicates if all other sessions were revoked successfully" } }, "required": [ "status" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/link-social": { "post": { "tags": [ "Default" ], "description": "Link a social account to the user", "operationId": "linkSocialAccount", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "callbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to after the user has signed in" }, "provider": { "type": "string" }, "idToken": { "type": [ "object", "null" ], "properties": { "token": { "type": "string" }, "nonce": { "type": [ "string", "null" ] }, "accessToken": { "type": [ "string", "null" ] }, "refreshToken": { "type": [ "string", "null" ] }, "scopes": { "type": [ "array", "null" ] } }, "required": [ "token" ] }, "requestSignUp": { "type": [ "boolean", "null" ] }, "scopes": { "type": [ "array", "null" ], "description": "Additional scopes to request from the provider" }, "errorCallbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to if there is an error during the link process" }, "disableRedirect": { "type": [ "boolean", "null" ], "description": "Disable automatic redirection to the provider. Useful for handling the redirection yourself" }, "additionalData": { "type": [ "string", "null" ] } }, "required": [ "provider" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "description": "The authorization URL to redirect the user to" }, "redirect": { "type": "boolean", "description": "Indicates if the user should be redirected to the authorization URL" }, "status": { "type": "boolean" } }, "required": [ "redirect" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/list-accounts": { "get": { "tags": [ "Default" ], "description": "List all accounts linked to the user", "operationId": "listUserAccounts", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "providerId": { "type": "string" }, "createdAt": { "type": "string", "format": "date-time" }, "updatedAt": { "type": "string", "format": "date-time" }, "accountId": { "type": "string" }, "userId": { "type": "string" }, "scopes": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "providerId", "createdAt", "updatedAt", "accountId", "userId", "scopes" ] } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/delete-user/callback": { "get": { "tags": [ "Default" ], "description": "Callback to complete user deletion with verification token", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "token", "in": "query", "schema": { "type": "string", "description": "The token to verify the deletion request" } }, { "name": "callbackURL", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The URL to redirect to after deletion" } } ], "responses": { "200": { "description": "User successfully deleted", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the deletion was successful" }, "message": { "type": "string", "enum": [ "User deleted" ], "description": "Confirmation message" } }, "required": [ "success", "message" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/unlink-account": { "post": { "tags": [ "Default" ], "description": "Unlink an account", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "providerId": { "type": "string" }, "accountId": { "type": [ "string", "null" ] } }, "required": [ "providerId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/refresh-token": { "post": { "tags": [ "Default" ], "description": "Refresh the access token using a refresh token", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "providerId": { "type": "string", "description": "The provider ID for the OAuth provider" }, "accountId": { "type": [ "string", "null" ], "description": "The account ID associated with the refresh token" }, "userId": { "type": [ "string", "null" ], "description": "The user ID associated with the account" } }, "required": [ "providerId" ] } } } }, "responses": { "200": { "description": "Access token refreshed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "tokenType": { "type": "string" }, "idToken": { "type": "string" }, "accessToken": { "type": "string" }, "refreshToken": { "type": "string" }, "accessTokenExpiresAt": { "type": "string", "format": "date-time" }, "refreshTokenExpiresAt": { "type": "string", "format": "date-time" } } } } } }, "400": { "description": "Invalid refresh token or provider configuration" }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/get-access-token": { "post": { "tags": [ "Default" ], "description": "Get a valid access token, doing a refresh if needed", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "providerId": { "type": "string", "description": "The provider ID for the OAuth provider" }, "accountId": { "type": [ "string", "null" ], "description": "The account ID associated with the refresh token" }, "userId": { "type": [ "string", "null" ], "description": "The user ID associated with the account" } }, "required": [ "providerId" ] } } } }, "responses": { "200": { "description": "A Valid access token", "content": { "application/json": { "schema": { "type": "object", "properties": { "tokenType": { "type": "string" }, "idToken": { "type": "string" }, "accessToken": { "type": "string" }, "accessTokenExpiresAt": { "type": "string", "format": "date-time" } } } } } }, "400": { "description": "Invalid refresh token or provider configuration" }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/account-info": { "get": { "tags": [ "Default" ], "description": "Get the account info provided by the provider", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "email": { "type": "string" }, "image": { "type": "string" }, "emailVerified": { "type": "boolean" } }, "required": [ "id", "emailVerified" ] }, "data": { "type": "object", "properties": { }, "additionalProperties": true } }, "required": [ "user", "data" ], "additionalProperties": false } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/ok": { "get": { "tags": [ "Default" ], "description": "Check if the API is working", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "API is working", "content": { "application/json": { "schema": { "type": "object", "properties": { "ok": { "type": "boolean", "description": "Indicates if the API is working" } }, "required": [ "ok" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/error": { "get": { "tags": [ "Default" ], "description": "Displays an error page", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "text/html": { "schema": { "type": "string", "description": "The HTML content of the error page" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-in/anonymous": { "post": { "tags": [ "Anonymous" ], "description": "Sign in anonymously", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Sign in anonymously", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/User" }, "session": { "$ref": "#/components/schemas/Session" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/delete-anonymous-user": { "post": { "tags": [ "Anonymous" ], "description": "Delete an anonymous user", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Anonymous user deleted", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "description": "Anonymous user deletion is disabled", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } }, "required": [ "message" ] } } }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "description": "Internal server error", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } } } } } }, "/sign-in/magic-link": { "post": { "tags": [ "Magic-link" ], "description": "Sign in with magic link", "operationId": "signInWithMagicLink", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to send the magic link" }, "name": { "type": [ "string", "null" ], "description": "User display name. Only used if the user is registering for the first time. Eg: \"my-name\"" }, "callbackURL": { "type": [ "string", "null" ], "description": "URL to redirect after magic link verification" }, "newUserCallbackURL": { "type": [ "string", "null" ], "description": "URL to redirect after new user signup. Only used if the user is registering for the first time." }, "errorCallbackURL": { "type": [ "string", "null" ], "description": "URL to redirect after error." } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/magic-link/verify": { "get": { "tags": [ "Magic-link" ], "description": "Verify magic link", "operationId": "verifyMagicLink", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "token", "in": "query", "schema": { "type": "string", "description": "Verification token" } }, { "name": "callbackURL", "in": "query", "schema": { "type": [ "string", "null" ], "description": "URL to redirect after magic link verification, if not provided the user will be redirected to the root URL. Eg: \"/dashboard\"" } }, { "name": "errorCallbackURL", "in": "query", "schema": { "type": [ "string", "null" ], "description": "URL to redirect after error." } }, { "name": "newUserCallbackURL", "in": "query", "schema": { "type": [ "string", "null" ], "description": "URL to redirect after new user signup. Only used if the user is registering for the first time." } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "session": { "$ref": "#/components/schemas/Session" }, "user": { "$ref": "#/components/schemas/User" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/send-verification-otp": { "post": { "tags": [ "Email-otp" ], "description": "Send a verification OTP to an email", "operationId": "sendEmailVerificationOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to send the OTP" }, "type": { "type": "string", "description": "Type of the OTP" } }, "required": [ "email", "type" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/check-verification-otp": { "post": { "tags": [ "Email-otp" ], "description": "Verify an email with an OTP", "operationId": "verifyEmailWithOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address the OTP was sent to" }, "type": { "type": "string", "description": "Type of the OTP" }, "otp": { "type": "string", "description": "OTP to verify" } }, "required": [ "email", "type", "otp" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/verify-email": { "post": { "tags": [ "Email-otp" ], "description": "Verify email with OTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to verify" }, "otp": { "type": "string", "description": "OTP to verify" } }, "required": [ "email", "otp" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "boolean", "description": "Indicates if the verification was successful", "enum": [true] }, "token": { "type": "string", "nullable": true, "description": "Session token if autoSignInAfterVerification is enabled, otherwise null" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "status", "token", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-in/email-otp": { "post": { "tags": [ "Email-otp" ], "description": "Sign in with email and OTP", "operationId": "signInWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "token": { "type": "string", "description": "Session token for the authenticated session" }, "user": { "$ref": "#/components/schemas/User" } }, "required": [ "token", "user" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/request-password-reset": { "post": { "tags": [ "Email-otp" ], "description": "Request password reset with email and OTP", "operationId": "requestPasswordResetWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to send the OTP" } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the OTP was sent successfully" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/forget-password/email-otp": { "post": { "tags": [ "Email-otp" ], "description": "Deprecated: Use /email-otp/request-password-reset instead.", "operationId": "forgetPasswordWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to send the OTP" } }, "required": [ "email" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the OTP was sent successfully" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/reset-password": { "post": { "tags": [ "Email-otp" ], "description": "Reset password with email and OTP", "operationId": "resetPasswordWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "Email address to reset the password" }, "otp": { "type": "string", "description": "OTP sent to the email" }, "password": { "type": "string", "description": "New password" } }, "required": [ "email", "otp", "password" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/request-email-change": { "post": { "tags": [ "Email-otp" ], "description": "Request email change with verification OTP sent to the new email", "operationId": "requestEmailChangeWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "newEmail": { "type": "string", "description": "New email address to send the OTP" }, "otp": { "type": [ "string", "null" ] } }, "required": [ "newEmail" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/email-otp/change-email": { "post": { "tags": [ "Email-otp" ], "description": "Verify new email with OTP and change the email if verification is successful", "operationId": "changeEmailWithEmailOTP", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "newEmail": { "type": "string", "description": "New email address to verify and change to" }, "otp": { "type": "string", "description": "OTP sent to the new email" } }, "required": [ "newEmail", "otp" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/create": { "post": { "tags": [ "Organization" ], "description": "Create an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the organization" }, "slug": { "type": "string", "description": "The slug of the organization" }, "userId": { "type": [ "string", "null" ], "description": "The user id of the organization creator. If not provided, the current user will be used. Should only be used by admins or when called by the server. server-only. Eg: \"user-id\"" }, "logo": { "type": [ "string", "null" ], "description": "The logo of the organization" }, "metadata": { "type": [ "string", "null" ], "description": "The metadata of the organization" }, "keepCurrentActiveOrganization": { "type": [ "boolean", "null" ], "description": "Whether to keep the current active organization active after creating a new one. Eg: true" }, "description": { "type": [ "string", "null" ] } }, "required": [ "name", "slug" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "description": "The organization that was created", "$ref": "#/components/schemas/Organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/update": { "post": { "tags": [ "Organization" ], "description": "Update an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "description": { "type": [ "string", "null" ] }, "name": { "type": [ "string", "null" ], "description": "The name of the organization" }, "slug": { "type": [ "string", "null" ], "description": "The slug of the organization" }, "logo": { "type": [ "string", "null" ], "description": "The logo of the organization" }, "metadata": { "type": [ "string", "null" ], "description": "The metadata of the organization" } } }, "organizationId": { "type": [ "string", "null" ], "description": "The organization ID. Eg: \"org-id\"" } }, "required": [ "data" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "description": "The updated organization", "$ref": "#/components/schemas/Organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/delete": { "post": { "tags": [ "Organization" ], "description": "Delete an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "The organization id to delete" } }, "required": [ "organizationId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "string", "description": "The organization id that was deleted" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/set-active": { "post": { "tags": [ "Organization" ], "description": "Set the active organization", "operationId": "setActiveOrganization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "organizationId": { "type": [ "string", "null" ] }, "organizationSlug": { "type": [ "string", "null" ], "description": "The organization slug to set as active. It can be null to unset the active organization if organizationId is not provided. Eg: \"org-slug\"" } }, "required": [] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "description": "The organization", "$ref": "#/components/schemas/Organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/get-full-organization": { "get": { "tags": [ "Organization" ], "description": "Get the full organization", "operationId": "getOrganization", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "description": "The organization", "$ref": "#/components/schemas/Organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list": { "get": { "tags": [ "Organization" ], "description": "List all organizations", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/Organization" } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/invite-member": { "post": { "tags": [ "Organization" ], "description": "Create an invitation to an organization", "operationId": "createOrganizationInvitation", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "description": "The email address of the user to invite" }, "role": { "type": "string", "description": "The role(s) to assign to the user. It can be `admin`, `member`, owner. Eg: \"member\"" }, "organizationId": { "type": [ "string", "null" ], "description": "The organization ID to invite the user to" }, "resend": { "type": [ "boolean", "null" ], "description": "Resend the invitation email, if the user is already invited. Eg: true" }, "teamId": { "type": "string" } }, "required": [ "email", "role", "teamId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string" }, "organizationId": { "type": "string" }, "inviterId": { "type": "string" }, "status": { "type": "string" }, "expiresAt": { "type": "string" }, "createdAt": { "type": "string" } }, "required": [ "id", "email", "role", "organizationId", "inviterId", "status", "expiresAt", "createdAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/cancel-invitation": { "post": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "invitationId": { "type": "string", "description": "The ID of the invitation to cancel" } }, "required": [ "invitationId" ] } } } }, "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/accept-invitation": { "post": { "tags": [ "Organization" ], "description": "Accept an invitation to an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "invitationId": { "type": "string", "description": "The ID of the invitation to accept" } }, "required": [ "invitationId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitation": { "type": "object" }, "member": { "type": "object" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/get-invitation": { "get": { "tags": [ "Organization" ], "description": "Get an invitation by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string", "description": "The ID of the invitation to get" } } ], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string" }, "organizationId": { "type": "string" }, "inviterId": { "type": "string" }, "status": { "type": "string" }, "expiresAt": { "type": "string" }, "organizationName": { "type": "string" }, "organizationSlug": { "type": "string" }, "inviterEmail": { "type": "string" } }, "required": [ "id", "email", "role", "organizationId", "inviterId", "status", "expiresAt", "organizationName", "organizationSlug", "inviterEmail" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/reject-invitation": { "post": { "tags": [ "Organization" ], "description": "Reject an invitation to an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "invitationId": { "type": "string", "description": "The ID of the invitation to reject" } }, "required": [ "invitationId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "invitation": { "type": "object" }, "member": { "type": "object", "nullable": true } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-invitations": { "get": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/get-active-member": { "get": { "tags": [ "Organization" ], "description": "Get the member details of the active organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "organizationId": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "userId", "organizationId", "role" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/check-slug": { "post": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "slug": { "type": "string", "description": "The organization slug to check. Eg: \"my-org\"" } }, "required": [ "slug" ] } } } }, "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/remove-member": { "post": { "tags": [ "Organization" ], "description": "Remove a member from an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "memberIdOrEmail": { "type": "string", "description": "The ID or email of the member to remove" }, "organizationId": { "type": [ "string", "null" ], "description": "The ID of the organization to remove the member from. If not provided, the active organization will be used. Eg: \"org-id\"" } }, "required": [ "memberIdOrEmail" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "member": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "organizationId": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "userId", "organizationId", "role" ] } }, "required": [ "member" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/update-member-role": { "post": { "tags": [ "Organization" ], "description": "Update the role of a member in an organization", "operationId": "updateOrganizationMemberRole", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "role": { "type": "string", "description": "The new role to be applied. This can be a string or array of strings representing the roles. Eg: [\"admin\", \"sale\"]" }, "memberId": { "type": "string", "description": "The member id to apply the role update to. Eg: \"member-id\"" }, "organizationId": { "type": [ "string", "null" ], "description": "An optional organization ID which the member is a part of to apply the role update. If not provided, you must provide session headers to get the active organization. Eg: \"organization-id\"" } }, "required": [ "role", "memberId" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "member": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "organizationId": { "type": "string" }, "role": { "type": "string" } }, "required": [ "id", "userId", "organizationId", "role" ] } }, "required": [ "member" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/leave": { "post": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "The organization Id for the member to leave. Eg: \"organization-id\"" } }, "required": [ "organizationId" ] } } } }, "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-user-invitations": { "get": { "tags": [ "Organization" ], "description": "List all invitations a user has received", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "email": { "type": "string" }, "role": { "type": "string" }, "organizationId": { "type": "string" }, "organizationName": { "type": "string" }, "inviterId": { "type": "string", "description": "The ID of the user who created the invitation" }, "teamId": { "type": "string", "description": "The ID of the team associated with the invitation", "nullable": true }, "status": { "type": "string" }, "expiresAt": { "type": "string" }, "createdAt": { "type": "string" } }, "required": [ "id", "email", "role", "organizationId", "organizationName", "inviterId", "status", "expiresAt", "createdAt" ] } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-members": { "get": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/get-active-member-role": { "get": { "tags": [ "Organization" ], "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/create-team": { "post": { "tags": [ "Organization" ], "description": "Create a new team within an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the team. Eg: \"my-team\"" }, "organizationId": { "type": [ "string", "null" ], "description": "The organization ID which the team will be created in. Defaults to the active organization. Eg: \"organization-id\"" } }, "required": [ "name" ] } } } }, "responses": { "200": { "description": "Team created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the created team" }, "name": { "type": "string", "description": "Name of the team" }, "organizationId": { "type": "string", "description": "ID of the organization the team belongs to" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was last updated" } }, "required": [ "id", "name", "organizationId", "createdAt", "updatedAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-teams": { "get": { "tags": [ "Organization" ], "description": "List all teams in an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Teams retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the team" }, "name": { "type": "string", "description": "Name of the team" }, "organizationId": { "type": "string", "description": "ID of the organization the team belongs to" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was last updated" } }, "required": [ "id", "name", "organizationId", "createdAt", "updatedAt" ] }, "description": "Array of team objects within the organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/remove-team": { "post": { "tags": [ "Organization" ], "description": "Remove a team from an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "teamId": { "type": "string", "description": "The team ID of the team to remove. Eg: \"team-id\"" }, "organizationId": { "type": [ "string", "null" ], "description": "The organization ID which the team falls under. If not provided, it will default to the user's active organization. Eg: \"organization-id\"" } }, "required": [ "teamId" ] } } } }, "responses": { "200": { "description": "Team removed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Confirmation message indicating successful removal", "enum": [ "Team removed successfully." ] } }, "required": [ "message" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/update-team": { "post": { "tags": [ "Organization" ], "description": "Update an existing team in an organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "teamId": { "type": "string", "description": "The ID of the team to be updated. Eg: \"team-id\"" }, "data": { "type": "object", "properties": { "id": { "type": [ "string", "null" ], "default": "icQPfLVaGoklNpvoH3pn9AZiFFsoFAqD" }, "name": { "type": [ "string", "null" ] }, "organizationId": { "type": [ "string", "null" ] }, "createdAt": { "type": [ "string", "null" ] }, "updatedAt": { "type": [ "string", "null" ] } } } }, "required": [ "teamId", "data" ] } } } }, "responses": { "200": { "description": "Team updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the updated team" }, "name": { "type": "string", "description": "Updated name of the team" }, "organizationId": { "type": "string", "description": "ID of the organization the team belongs to" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was created" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team was last updated" } }, "required": [ "id", "name", "organizationId", "createdAt", "updatedAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/set-active-team": { "post": { "tags": [ "Organization" ], "description": "Set the active team", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "teamId": { "type": [ "string", "null" ] } }, "required": [] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "description": "The team", "$ref": "#/components/schemas/Team" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-user-teams": { "get": { "tags": [ "Organization" ], "description": "List all teams that the current user is a part of.", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Teams retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "description": "The team", "$ref": "#/components/schemas/Team" }, "description": "Array of team objects within the organization" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/list-team-members": { "get": { "tags": [ "Organization" ], "description": "List the members of the given team.", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "Teams retrieved successfully", "content": { "application/json": { "schema": { "type": "array", "items": { "type": "object", "description": "The team member", "properties": { "id": { "type": "string", "description": "Unique identifier of the team member" }, "userId": { "type": "string", "description": "The user ID of the team member" }, "teamId": { "type": "string", "description": "The team ID of the team the team member is in" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team member was created" } }, "required": [ "id", "userId", "teamId", "createdAt" ] }, "description": "Array of team member objects within the team" } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/add-team-member": { "post": { "tags": [ "Organization" ], "description": "The newly created member", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "teamId": { "type": "string", "description": "The team the user should be a member of." }, "userId": { "type": "string", "description": "The user Id which represents the user to be added as a member." } }, "required": [ "teamId", "userId" ] } } } }, "responses": { "200": { "description": "Team member created successfully", "content": { "application/json": { "schema": { "type": "object", "description": "The team member", "properties": { "id": { "type": "string", "description": "Unique identifier of the team member" }, "userId": { "type": "string", "description": "The user ID of the team member" }, "teamId": { "type": "string", "description": "The team ID of the team the team member is in" }, "createdAt": { "type": "string", "format": "date-time", "description": "Timestamp when the team member was created" } }, "required": [ "id", "userId", "teamId", "createdAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/remove-team-member": { "post": { "tags": [ "Organization" ], "description": "Remove a member from a team", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "teamId": { "type": "string", "description": "The team the user should be removed from." }, "userId": { "type": "string", "description": "The user which should be removed from the team." } }, "required": [ "teamId", "userId" ] } } } }, "responses": { "200": { "description": "Team member removed successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string", "description": "Confirmation message indicating successful removal", "enum": [ "Team member removed successfully." ] } }, "required": [ "message" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/organization/has-permission": { "post": { "tags": [ "Organization" ], "description": "Check if the user has permission", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "permission": { "type": "object", "description": "The permission to check", "deprecated": true }, "permissions": { "type": "object", "description": "The permission to check" } }, "required": [ "permissions" ] } } } }, "responses": { "200": { "description": "Success", "content": { "application/json": { "schema": { "type": "object", "properties": { "error": { "type": "string" }, "success": { "type": "boolean" } }, "required": [ "success" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/sign-in/oauth2": { "post": { "tags": [ "Generic-oauth" ], "description": "Sign in with OAuth2", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "providerId": { "type": "string", "description": "The provider ID for the OAuth provider" }, "callbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to after sign in" }, "errorCallbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to if an error occurs" }, "newUserCallbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to after login if the user is new. Eg: \"/welcome\"" }, "disableRedirect": { "type": [ "boolean", "null" ], "description": "Disable redirect" }, "scopes": { "type": [ "array", "null" ], "description": "Scopes to be passed to the provider authorization request." }, "requestSignUp": { "type": [ "boolean", "null" ], "description": "Explicitly request sign-up. Useful when disableImplicitSignUp is true for this provider. Eg: false" }, "additionalData": { "type": [ "string", "null" ] } }, "required": [ "providerId" ] } } } }, "responses": { "200": { "description": "Sign in with OAuth2", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" }, "redirect": { "type": "boolean" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/oauth2/callback/{providerId}": { "get": { "tags": [ "Generic-oauth" ], "description": "OAuth2 callback", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "code", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The OAuth2 code" } }, { "name": "error", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The error message, if any" } }, { "name": "error_description", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The error description, if any" } }, { "name": "state", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The state parameter from the OAuth2 request" } }, { "name": "iss", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The issuer identifier" } } ], "responses": { "200": { "description": "OAuth2 callback", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string" } } } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/oauth2/link": { "post": { "tags": [ "Generic-oauth" ], "description": "Link an OAuth2 account to the current user session", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "providerId": { "type": "string" }, "callbackURL": { "type": "string" }, "scopes": { "type": [ "array", "null" ], "description": "Additional scopes to request when linking the account" }, "errorCallbackURL": { "type": [ "string", "null" ], "description": "The URL to redirect to if there is an error during the link process" } }, "required": [ "providerId", "callbackURL" ] } } } }, "responses": { "200": { "description": "Authorization URL generated successfully for linking an OAuth2 account", "content": { "application/json": { "schema": { "type": "object", "properties": { "url": { "type": "string", "format": "uri", "description": "The authorization URL to redirect the user to for linking the OAuth2 account" }, "redirect": { "type": "boolean", "description": "Indicates that the client should redirect to the provided URL", "enum": [true] } }, "required": [ "url", "redirect" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/api-key/create": { "post": { "tags": [ "Api-key" ], "description": "Create a new API key for a user", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "configId": { "type": [ "string", "null" ], "description": "The configuration ID to use for the API key. If not provided, the default configuration will be used." }, "name": { "type": [ "string", "null" ], "description": "Name of the Api Key" }, "expiresIn": { "type": "string", "default": null }, "prefix": { "type": [ "string", "null" ], "description": "Prefix of the Api Key" }, "remaining": { "type": "string", "default": null }, "metadata": { "type": [ "string", "null" ] }, "refillAmount": { "type": [ "number", "null" ], "description": "Amount to refill the remaining count of the Api Key. server-only. Eg: 100" }, "refillInterval": { "type": [ "number", "null" ], "description": "Interval to refill the Api Key in milliseconds. server-only. Eg: 1000" }, "rateLimitTimeWindow": { "type": [ "number", "null" ], "description": "The duration in milliseconds where each request is counted. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 1000" }, "rateLimitMax": { "type": [ "number", "null" ], "description": "Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100" }, "rateLimitEnabled": { "type": [ "boolean", "null" ], "description": "Whether the key has rate limiting enabled. server-only. Eg: true" }, "permissions": { "type": [ "string", "null" ], "description": "Permissions of the Api Key." }, "userId": { "type": [ "string", "null" ], "description": "User Id of the user that the Api Key belongs to. server-only. Eg: \"user-id\"" }, "organizationId": { "type": [ "string", "null" ], "description": "Organization Id of the organization that the Api Key belongs to. Eg: 'org-id'" } }, "required": [ "expiresIn", "remaining" ] } } } }, "responses": { "200": { "description": "API key created successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Unique identifier of the API key" }, "createdAt": { "type": "string", "format": "date-time", "description": "Creation timestamp" }, "updatedAt": { "type": "string", "format": "date-time", "description": "Last update timestamp" }, "name": { "type": "string", "nullable": true, "description": "Name of the API key" }, "prefix": { "type": "string", "nullable": true, "description": "Prefix of the API key" }, "start": { "type": "string", "nullable": true, "description": "Starting characters of the key (if configured)" }, "key": { "type": "string", "description": "The full API key (only returned on creation)" }, "enabled": { "type": "boolean", "description": "Whether the key is enabled" }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "Expiration timestamp" }, "referenceId": { "type": "string", "description": "ID of the reference owning the key" }, "lastRefillAt": { "type": "string", "format": "date-time", "nullable": true, "description": "Last refill timestamp" }, "lastRequest": { "type": "string", "format": "date-time", "nullable": true, "description": "Last request timestamp" }, "metadata": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Metadata associated with the key" }, "rateLimitMax": { "type": "number", "nullable": true, "description": "Maximum requests in time window" }, "rateLimitTimeWindow": { "type": "number", "nullable": true, "description": "Rate limit time window in milliseconds" }, "remaining": { "type": "number", "nullable": true, "description": "Remaining requests" }, "refillAmount": { "type": "number", "nullable": true, "description": "Amount to refill" }, "refillInterval": { "type": "number", "nullable": true, "description": "Refill interval in milliseconds" }, "rateLimitEnabled": { "type": "boolean", "description": "Whether rate limiting is enabled" }, "requestCount": { "type": "number", "description": "Current request count in window" }, "permissions": { "type": "object", "nullable": true, "additionalProperties": { "type": "array", "items": { "type": "string" } }, "description": "Permissions associated with the key" } }, "required": [ "id", "createdAt", "updatedAt", "key", "enabled", "referenceId", "rateLimitEnabled", "requestCount" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/api-key/get": { "get": { "tags": [ "Api-key" ], "description": "Retrieve an existing API key by ID", "security": [ { "bearerAuth": [] } ], "parameters": [ { "name": "configId", "in": "query", "schema": { "type": [ "string", "null" ], "description": "The configuration ID to use for the API key lookup. If not provided, the default configuration will be used." } }, { "name": "id", "in": "query", "schema": { "type": "string", "description": "The id of the Api Key" } } ], "responses": { "200": { "description": "API key retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "ID" }, "name": { "type": "string", "nullable": true, "description": "The name of the key" }, "start": { "type": "string", "nullable": true, "description": "Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key." }, "prefix": { "type": "string", "nullable": true, "description": "The API Key prefix. Stored as plain text." }, "userId": { "type": "string", "description": "The owner of the user id" }, "refillInterval": { "type": "number", "nullable": true, "description": "The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)" }, "refillAmount": { "type": "number", "nullable": true, "description": "The amount to refill" }, "lastRefillAt": { "type": "string", "format": "date-time", "nullable": true, "description": "The last refill date" }, "enabled": { "type": "boolean", "description": "Sets if key is enabled or disabled", "default": true }, "rateLimitEnabled": { "type": "boolean", "description": "Whether the key has rate limiting enabled" }, "rateLimitTimeWindow": { "type": "number", "nullable": true, "description": "The duration in milliseconds" }, "rateLimitMax": { "type": "number", "nullable": true, "description": "Maximum amount of requests allowed within a window" }, "requestCount": { "type": "number", "description": "The number of requests made within the rate limit time window" }, "remaining": { "type": "number", "nullable": true, "description": "Remaining requests (every time api key is used this should updated and should be updated on refill as well)" }, "lastRequest": { "type": "string", "format": "date-time", "nullable": true, "description": "When last request occurred" }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "Expiry date of a key" }, "createdAt": { "type": "string", "format": "date-time", "description": "created at" }, "updatedAt": { "type": "string", "format": "date-time", "description": "updated at" }, "metadata": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Extra metadata about the apiKey" }, "permissions": { "type": "string", "nullable": true, "description": "Permissions for the api key (stored as JSON string)" } }, "required": [ "id", "userId", "enabled", "rateLimitEnabled", "requestCount", "createdAt", "updatedAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/api-key/update": { "post": { "tags": [ "Api-key" ], "description": "Update an existing API key by ID", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "type": "object", "properties": { "configId": { "type": [ "string", "null" ], "description": "The configuration ID to use for the API key lookup. If not provided, the default configuration will be used." }, "keyId": { "type": "string", "description": "The id of the Api Key" }, "userId": { "type": [ "string", "null" ], "description": "The id of the user which the api key belongs to. server-only. Eg: \"some-user-id\"" }, "name": { "type": [ "string", "null" ], "description": "The name of the key" }, "enabled": { "type": [ "boolean", "null" ], "description": "Whether the Api Key is enabled or not" }, "remaining": { "type": [ "number", "null" ], "description": "The number of remaining requests" }, "refillAmount": { "type": [ "number", "null" ], "description": "The refill amount" }, "refillInterval": { "type": [ "number", "null" ], "description": "The refill interval" }, "metadata": { "type": [ "string", "null" ] }, "expiresIn": { "type": "string" }, "rateLimitEnabled": { "type": [ "boolean", "null" ], "description": "Whether the key has rate limiting enabled." }, "rateLimitTimeWindow": { "type": [ "number", "null" ], "description": "The duration in milliseconds where each request is counted. server-only. Eg: 1000" }, "rateLimitMax": { "type": [ "number", "null" ], "description": "Maximum amount of requests allowed within a window. Once the `maxRequests` is reached, the request will be rejected until the `timeWindow` has passed, at which point the `timeWindow` will be reset. server-only. Eg: 100" }, "permissions": { "type": "string" } }, "required": [ "keyId", "expiresIn", "permissions" ] } } } }, "responses": { "200": { "description": "API key updated successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "ID" }, "name": { "type": "string", "nullable": true, "description": "The name of the key" }, "start": { "type": "string", "nullable": true, "description": "Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key." }, "prefix": { "type": "string", "nullable": true, "description": "The API Key prefix. Stored as plain text." }, "userId": { "type": "string", "description": "The owner of the user id" }, "refillInterval": { "type": "number", "nullable": true, "description": "The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)" }, "refillAmount": { "type": "number", "nullable": true, "description": "The amount to refill" }, "lastRefillAt": { "type": "string", "format": "date-time", "nullable": true, "description": "The last refill date" }, "enabled": { "type": "boolean", "description": "Sets if key is enabled or disabled", "default": true }, "rateLimitEnabled": { "type": "boolean", "description": "Whether the key has rate limiting enabled" }, "rateLimitTimeWindow": { "type": "number", "nullable": true, "description": "The duration in milliseconds" }, "rateLimitMax": { "type": "number", "nullable": true, "description": "Maximum amount of requests allowed within a window" }, "requestCount": { "type": "number", "description": "The number of requests made within the rate limit time window" }, "remaining": { "type": "number", "nullable": true, "description": "Remaining requests (every time api key is used this should updated and should be updated on refill as well)" }, "lastRequest": { "type": "string", "format": "date-time", "nullable": true, "description": "When last request occurred" }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "Expiry date of a key" }, "createdAt": { "type": "string", "format": "date-time", "description": "created at" }, "updatedAt": { "type": "string", "format": "date-time", "description": "updated at" }, "metadata": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Extra metadata about the apiKey" }, "permissions": { "type": "string", "nullable": true, "description": "Permissions for the api key (stored as JSON string)" } }, "required": [ "id", "userId", "enabled", "rateLimitEnabled", "requestCount", "createdAt", "updatedAt" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/api-key/delete": { "post": { "tags": [ "Api-key" ], "description": "Delete an existing API key", "security": [ { "bearerAuth": [] } ], "parameters": [], "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "keyId": { "type": "string", "description": "The id of the API key to delete" } }, "required": [ "keyId" ] } } } }, "responses": { "200": { "description": "API key deleted successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "success": { "type": "boolean", "description": "Indicates if the API key was successfully deleted" } }, "required": [ "success" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } }, "/api-key/list": { "get": { "tags": [ "Api-key" ], "description": "List all API keys for the authenticated user or for a specific organization", "security": [ { "bearerAuth": [] } ], "parameters": [], "responses": { "200": { "description": "API keys retrieved successfully", "content": { "application/json": { "schema": { "type": "object", "properties": { "apiKeys": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string", "description": "ID" }, "name": { "type": "string", "nullable": true, "description": "The name of the key" }, "start": { "type": "string", "nullable": true, "description": "Shows the first few characters of the API key, including the prefix. This allows you to show those few characters in the UI to make it easier for users to identify the API key." }, "prefix": { "type": "string", "nullable": true, "description": "The API Key prefix. Stored as plain text." }, "userId": { "type": "string", "description": "The owner of the user id" }, "refillInterval": { "type": "number", "nullable": true, "description": "The interval in milliseconds between refills of the `remaining` count. Example: 3600000 // refill every hour (3600000ms = 1h)" }, "refillAmount": { "type": "number", "nullable": true, "description": "The amount to refill" }, "lastRefillAt": { "type": "string", "format": "date-time", "nullable": true, "description": "The last refill date" }, "enabled": { "type": "boolean", "description": "Sets if key is enabled or disabled", "default": true }, "rateLimitEnabled": { "type": "boolean", "description": "Whether the key has rate limiting enabled" }, "rateLimitTimeWindow": { "type": "number", "nullable": true, "description": "The duration in milliseconds" }, "rateLimitMax": { "type": "number", "nullable": true, "description": "Maximum amount of requests allowed within a window" }, "requestCount": { "type": "number", "description": "The number of requests made within the rate limit time window" }, "remaining": { "type": "number", "nullable": true, "description": "Remaining requests (every time api key is used this should updated and should be updated on refill as well)" }, "lastRequest": { "type": "string", "format": "date-time", "nullable": true, "description": "When last request occurred" }, "expiresAt": { "type": "string", "format": "date-time", "nullable": true, "description": "Expiry date of a key" }, "createdAt": { "type": "string", "format": "date-time", "description": "created at" }, "updatedAt": { "type": "string", "format": "date-time", "description": "updated at" }, "metadata": { "type": "object", "nullable": true, "additionalProperties": true, "description": "Extra metadata about the apiKey" }, "permissions": { "type": "string", "nullable": true, "description": "Permissions for the api key (stored as JSON string)" } }, "required": [ "id", "userId", "enabled", "rateLimitEnabled", "requestCount", "createdAt", "updatedAt" ] } }, "total": { "type": "number", "description": "Total number of API keys" }, "limit": { "type": "number", "nullable": true, "description": "The limit used for pagination" }, "offset": { "type": "number", "nullable": true, "description": "The offset used for pagination" } }, "required": [ "apiKeys", "total" ] } } } }, "400": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Bad Request. Usually due to missing parameters, or invalid parameters." }, "401": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } }, "required": [ "message" ] } } }, "description": "Unauthorized. Due to missing or invalid authentication." }, "403": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Forbidden. You do not have permission to access this resource or to perform this action." }, "404": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Not Found. The requested resource was not found." }, "429": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Too Many Requests. You have exceeded the rate limit. Try again later." }, "500": { "content": { "application/json": { "schema": { "type": "object", "properties": { "message": { "type": "string" } } } } }, "description": "Internal Server Error. This is a problem with the server that you cannot fix." } } } } }, "tags": [ { "name": "Default", "description": "Default endpoints that are included with Better Auth by default. These endpoints are not part of any plugin." } ] }