{ "openapi": "3.1.0", "info": { "title": "Convex Management API", "description": "Management API for provisioning and managing Convex projects and deployments.", "license": { "name": "LicenseRef-Convex", "identifier": "LicenseRef-Convex" }, "version": "1.0.0" }, "servers": [ { "url": "https://api.convex.dev/v1", "description": "Platform API" } ], "paths": { "/teams/{team_id}/create_project": { "post": { "tags": [ "Projects" ], "summary": "Create project", "description": "Create a new project on a team, optionally provisioning a dev or prod\ndeployment.", "operationId": "create project", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateProjectArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateProjectResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/projects/{project_id}": { "get": { "tags": [ "Projects" ], "summary": "Get project by ID", "description": "Get a project by its ID.", "operationId": "get project by id", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] }, "patch": { "tags": [ "Projects" ], "summary": "Update project", "description": "Update a project's name, slug, and/or tags. Returns the updated project.", "operationId": "update project", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUpdateProjectArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/projects": { "get": { "tags": [ "Projects" ], "summary": "List projects", "description": "List a page of projects for a team, ordered by descending project ID. Pass\n`limit` to set the page size and the `nextCursor` from the previous response\nas `cursor` to fetch the next page.", "operationId": "list projects", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of projects to return (1-100, defaults to 100)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "q", "in": "query", "description": "Search query to filter projects by name or slug (case-insensitive)", "required": false, "schema": { "type": "string" } }, { "name": "tag", "in": "query", "description": "Only return projects with this tag. This parameter can be provided more than once to match projects with any of several tags", "required": false, "schema": { "type": "array", "items": { "type": "string" } } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformPaginatedProjectsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_project_tags": { "get": { "tags": [ "Projects" ], "summary": "List project tags", "description": "List a page of the distinct tags used by a team's projects, ordered by tag\nname. Pass the `nextCursor` from the previous response as `cursor` to fetch\nthe next page.", "operationId": "list project tags", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of tags to return (default: 100, max: 100)", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectTagsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/projects/{project_id}/list_deployments": { "get": { "tags": [ "Deployments" ], "summary": "List deployments", "description": "List deployments for a projects.", "operationId": "list deployments", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } }, { "name": "includeLocal", "in": "query", "description": "If true, include local deployments in the response (filtered to only\nshow local deployments created by the requesting team member).", "required": false, "schema": { "type": "boolean" } }, { "name": "isDefault", "in": "query", "description": "If true, only include default deployments. If false, only include\nnon-default deployments.", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "deploymentType", "in": "query", "description": "Only include deployments of the given deployment type.", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DeploymentType" } ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/projects/{project_id}/deployment": { "get": { "tags": [ "Deployments" ], "summary": "Get deployment in project by id", "description": "Get a deployment within a project by reference, default production\ndeployment, or default dev deployment for the calling user.", "operationId": "get deployment in project by project id", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } }, { "name": "reference", "in": "query", "description": "The reference of the deployment to retrieve.", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DeploymentReference" } ] } }, { "name": "defaultProd", "in": "query", "description": "If true, retrieve the default production deployment.", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "defaultDev", "in": "query", "description": "If true, retrieve the default dev deployment for the calling user.", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/teams/{team_id_or_slug}/projects/{project_slug}/deployment": { "get": { "tags": [ "Deployments" ], "summary": "Get deployment in project by slug", "description": "Get a deployment within a project identified by team and project slug,\nby reference, default production deployment, or default dev deployment\nfor the calling user.", "operationId": "get deployment in project by project slug", "parameters": [ { "name": "team_id_or_slug", "in": "path", "description": "Team ID or slug", "required": true, "schema": { "type": "string" } }, { "name": "project_slug", "in": "path", "description": "Project slug", "required": true, "schema": { "type": "string" } }, { "name": "reference", "in": "query", "description": "The reference of the deployment to retrieve.", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DeploymentReference" } ] } }, { "name": "defaultProd", "in": "query", "description": "If true, retrieve the default production deployment.", "required": false, "schema": { "type": [ "boolean", "null" ] } }, { "name": "defaultDev", "in": "query", "description": "If true, retrieve the default dev deployment for the calling user.", "required": false, "schema": { "type": [ "boolean", "null" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/projects/{project_id}/delete": { "post": { "tags": [ "Projects" ], "summary": "Delete project", "description": "Delete a project. Deletes all deployments in the project as well.", "operationId": "delete project", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/projects/{project_id}/recover": { "post": { "tags": [ "Projects" ], "summary": "Recover project", "description": "Recover a recently deleted project and its eligible deployments.\n\nDeleted projects are recoverable for 7 days before they are purged.", "operationId": "recover project", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_deleted_projects": { "get": { "tags": [ "Projects" ], "summary": "List deleted projects", "description": "List a team's deleted projects within the recovery window, newest first.\n\nDeleted projects are recoverable for 7 days before they are purged.", "operationId": "list deleted projects", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor from the previous page.", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "limit", "in": "query", "description": "Maximum number of projects to return (1–100, defaults to 100).", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedDeletedProjectsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id_or_slug}/projects/{project_slug}": { "get": { "tags": [ "Projects" ], "summary": "Get project by slug", "description": "Get a project by its slug.", "operationId": "get project by slug", "parameters": [ { "name": "team_id_or_slug", "in": "path", "description": "Team ID or slug", "required": true, "schema": { "type": "string" } }, { "name": "project_slug", "in": "path", "description": "Project slug", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProjectResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/projects/{project_id}/create_deployment": { "post": { "tags": [ "Deployments" ], "summary": "Create deployment", "description": "Create a new deployment for a project.", "operationId": "create deployment", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateDeploymentArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] }, { "Preview Deploy Key": [] } ] } }, "/deployments/{deployment_name}/delete": { "post": { "tags": [ "Deployments" ], "summary": "Delete deployment", "description": "Delete a deployment. This will delete all data and files in the deployment,\nso we recommend creating and downloading a backup before calling this\nendpoint. This does not delete the project itself.", "operationId": "delete deployment", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment Name", "required": true } ], "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] }, { "Preview Deploy Key": [] } ] } }, "/deployments/{deployment_name}": { "get": { "tags": [ "Deployments" ], "summary": "Get deployment", "description": "Get details about a cloud deployment.", "operationId": "platform_get_deployment", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment Name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] }, { "Preview Deploy Key": [] } ] }, "patch": { "tags": [ "Deployments" ], "summary": "Update deployment", "description": "Updates properties of an existing deployment. Only the fields provided in\nthe request body are modified; omitted fields are left unchanged.", "operationId": "update deployment", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment Name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformUpdateDeploymentArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] }, { "Preview Deploy Key": [] } ] } }, "/deployments/{deployment_name}/transfer": { "post": { "tags": [ "Deployments" ], "summary": "Transfer deployment", "description": "Transfer a deployment from its current project to another project within the\nsame team. For production deployments, the caller must be a project admin on\nboth the source and destination projects. For other deployment types, any\nteam member can transfer deployments they created, or project admins can\ntransfer any deployment.", "operationId": "transfer deployment", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment Name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformTransferDeploymentArgs" } } }, "required": true }, "responses": { "204": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/teams/{team_id}/list_deployment_classes": { "get": { "tags": [ "Deployments" ], "summary": "List deployment classes", "description": "Lists the available deployment classes for a team.", "operationId": "list deployment classes", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDeploymentClassesResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_deployment_regions": { "get": { "tags": [ "Deployments" ], "summary": "List deployment regions", "description": "Lists the available deployment regions for a team.", "operationId": "list deployment regions", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListDeploymentRegionsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_deployments": { "get": { "tags": [ "Deployments" ], "summary": "List deployments for team", "description": "Lists deployments for a team with pagination, sorting, and filtering.", "operationId": "list deployments for team", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Max results per page (default: 100, max: 100)", "required": false, "schema": { "type": "integer", "format": "int64" } }, { "name": "sortBy", "in": "query", "description": "Sort field: createTime, lastDeployTime, reference", "required": false, "schema": { "type": "string" } }, { "name": "sortOrder", "in": "query", "description": "Sort order: asc, desc", "required": false, "schema": { "type": "string" } }, { "name": "deploymentType", "in": "query", "description": "Filter by type: dev, prod, preview, custom", "required": false, "schema": { "type": "string" } }, { "name": "q", "in": "query", "description": "Search by deployment name or reference", "required": false, "schema": { "type": "string" } }, { "name": "projectId", "in": "query", "description": "Filter by project ID", "required": false, "schema": { "$ref": "#/components/schemas/ProjectId" } }, { "name": "creator", "in": "query", "description": "Filter by creator member ID", "required": false, "schema": { "$ref": "#/components/schemas/MemberId" } }, { "name": "isDefault", "in": "query", "description": "Filter by default deployment status", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedDeploymentsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_local_deployments": { "get": { "tags": [ "Deployments" ], "summary": "List local deployments", "description": "Lists the local deployments for a team.", "operationId": "list local deployments for team", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListLocalDeploymentsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/deployments/{deployment_name}/mint_ai_gateway_jwt": { "post": { "tags": [ "Deployments" ], "summary": "Mint an AI gateway JWT", "description": "Mints a short-lived AI gateway JWT for a local deployment.", "operationId": "mint ai gateway jwt", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Local deployment name", "required": true, "schema": { "type": "string" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MintLocalAiGatewayJwtArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MintLocalAiGatewayJwtResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/deployments/{deployment_name}/create_deploy_key": { "post": { "tags": [ "Deploy Keys" ], "summary": "Create deploy key", "description": "Create a deploy key like \"dev:happy-animal-123|ey...\" which can be\nused with the Convex CLI to develop against or deploy code.\n\nWhen access to the deployment is granted through an OAuth token this\ndeploy key will use the same OAuth-granted token.\n\nWhen access to the deployment is granted any other way a new token will be\ncreated which grants access only to this deployment.", "operationId": "create deploy key", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateDeployKeyArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateDeployKeyResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/deployments/{deployment_name}/list_deploy_keys": { "get": { "tags": [ "Deploy Keys" ], "summary": "List deploy keys", "description": "Lists all deploy keys for the specified deployment.", "operationId": "list deploy keys", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformDeployKeyResponse" } } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/deployments/{deployment_name}/delete_deploy_key": { "post": { "tags": [ "Deploy Keys" ], "summary": "Delete deploy key", "description": "Deletes a deploy key for the specified deployment. The `id` in the request\nbody can be the full deploy key (with prefix), encoded token, or the name of\nthe deploy key.", "operationId": "delete deploy key", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeleteDeployKeyArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/projects/{project_id}/create_preview_deploy_key": { "post": { "tags": [ "Deploy Keys" ], "summary": "Create preview deploy key", "description": "Create a preview deploy key like \"preview:team-slug:project-slug|ey...\"\nwhich can be used with the Convex CLI to create and manage preview\ndeployments within the project.\n\nWhen access to the project is granted through an OAuth token this preview\ndeploy key will use the same OAuth-granted token.\n\nWhen access to the project is granted any other way a new token scoped to\npreview deployments in this project will be created.", "operationId": "create preview deploy key", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreatePreviewDeployKeyArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreatePreviewDeployKeyResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/projects/{project_id}/list_preview_deploy_keys": { "get": { "tags": [ "Deploy Keys" ], "summary": "List preview deploy keys", "description": "Lists all preview deploy keys for the specified project.", "operationId": "list preview deploy keys", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } }, { "name": "includeManaged", "in": "query", "description": "If true, include managed preview deploy keys (e.g., created by external\nintegrations like Vercel) in the response. Defaults to false.", "required": false, "schema": { "type": "boolean" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformListPreviewDeployKeysResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/projects/{project_id}/delete_preview_deploy_key": { "post": { "tags": [ "Deploy Keys" ], "summary": "Delete preview deploy key", "description": "Deletes a preview deploy key for the specified project. The `id` in the\nrequest body can be the full preview deploy key (with prefix), encoded\ntoken, or the name of the preview deploy key.", "operationId": "delete preview deploy key", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeletePreviewDeployKeyArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/list_personal_access_tokens": { "get": { "tags": [ "Access Tokens" ], "summary": "List personal access tokens", "description": "Lists all personal access tokens for the authenticated user.", "operationId": "list personal access tokens", "parameters": [ { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of tokens to return (default 10, max 100)", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedPersonalAccessTokensResponse" } } } } }, "security": [ { "PAT": [] } ] } }, "/create_personal_access_token": { "post": { "tags": [ "Access Tokens" ], "summary": "Create personal access token", "description": "Creates a new personal access token for the authenticated user.", "operationId": "create personal access token", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePersonalAccessTokenArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePersonalAccessTokenResponse" } } } } }, "security": [ { "PAT": [] } ] } }, "/delete_personal_access_token": { "post": { "tags": [ "Access Tokens" ], "summary": "Delete personal access token", "description": "Deletes a personal access token for the authenticated user. The `id` in the\nrequest body can be the encoded token secret or the name of the token.", "operationId": "delete personal access token", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeletePersonalAccessTokenArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] } ] } }, "/teams/{team_id}/list_access_tokens": { "get": { "tags": [ "Access Tokens" ], "summary": "List team access tokens", "description": "Lists the team access tokens created by the authenticated member for the\ngiven team.", "operationId": "list team access tokens", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Maximum number of tokens to return (default 10, max 100)", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListTeamAccessTokensResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/delete_access_token": { "post": { "tags": [ "Access Tokens" ], "summary": "Delete a team access token", "description": "Deletes a team access token, identified by its secret value or name.", "operationId": "delete team access token", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteTeamAccessTokenArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] } ] } }, "/token_details": { "get": { "tags": [ "Access Tokens" ], "summary": "Get token details", "description": "Returns the team ID for team tokens.\nEspecially useful after receiving a team token from an OAuth flow\nsince most endpoints require team ID.", "operationId": "get token details", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformTokenDetailsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/deployments/{deployment_name}/create_custom_domain": { "post": { "tags": [ "Custom Domains" ], "summary": "Create custom domain", "operationId": "create custom domain", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeleteCustomDomainArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/deployments/{deployment_name}/delete_custom_domain": { "post": { "tags": [ "Custom Domains" ], "summary": "Delete custom domain", "description": "Remove a custom domain from a deployment.", "operationId": "delete custom domain", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformDeleteCustomDomainArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/deployments/{deployment_name}/custom_domains": { "get": { "tags": [ "Custom Domains" ], "summary": "List custom domains", "description": "Get all custom domains configured for a deployment.", "operationId": "list custom domains", "parameters": [ { "name": "deployment_name", "in": "path", "description": "Deployment name", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformListCustomDomainsResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/teams/{team_id}/list_members": { "get": { "tags": [ "Teams" ], "summary": "List team members", "description": "List the members of the given team.", "operationId": "list team members", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformListTeamMembersResponse" } } } } }, "security": [ { "PAT": [] } ] } }, "/teams/create_team": { "post": { "tags": [ "Teams" ], "summary": "Create a team", "description": "This endpoint is not publicly accessible. It is reserved for specific\nintegrations that have been granted permission to create teams on behalf of\nusers. To request access, contact platforms@convex.dev.", "operationId": "create team", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformCreateTeamArgs" } } }, "required": true }, "responses": { "201": { "description": "Team created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamResponse" } } } }, "400": { "description": "Invalid team name or deployment region" }, "403": { "description": "This application is not authorized to create teams. This endpoint is reserved for specific integrations that are allowed to create users. If you need to create teams for your users, please contact us at platforms@convex.dev" } }, "security": [] } }, "/teams/{team_id}/create_access_token": { "post": { "tags": [ "Access Tokens" ], "summary": "Create a team access token", "operationId": "create team access token", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CreateTeamAccessTokenArgs" } ] } } } }, "responses": { "201": { "description": "Team access token created successfully", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamAccessTokenResponse" } } } }, "403": { "description": "Caller is not authorized to create team access tokens" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] } ] } }, "/teams/{team_id}/list_audit_log_events": { "get": { "tags": [ "Teams" ], "summary": "List audit log events", "description": "List a team's audit log events within a time range, with optional filters.", "operationId": "list audit log events", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "from", "in": "query", "description": "Start of the time range, in milliseconds since epoch.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "to", "in": "query", "description": "End of the time range, in milliseconds since epoch.", "required": true, "schema": { "type": "integer", "format": "int64" } }, { "name": "memberId", "in": "query", "description": "Only return events performed by this member.", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId" } ] } }, { "name": "action", "in": "query", "required": false, "schema": { "type": "string", "enum": [ "team:join", "team:create", "team:update", "team:delete", "project:create", "project:transfer", "project:receive", "project:update", "project:delete", "project:recover", "defaultEnvironmentVariable:create", "defaultEnvironmentVariable:update", "defaultEnvironmentVariable:delete", "deployment:create", "deployment:delete", "deployment:recover", "member:invite", "member:cancelInvitation", "member:remove", "member:updateRole", "project:updateMemberRole", "billing:paymentMethod:update", "billing:contact:update", "billing:address:update", "billing:taxId:update", "billing:subscription:create", "billing:subscription:resume", "billing:subscription:cancel", "billing:subscription:changePlan", "team:token:create", "team:token:update", "team:token:delete", "team:token:view", "project:token:create", "project:token:update", "project:token:delete", "project:token:view", "deployment:token:create", "deployment:token:update", "deployment:token:delete", "deployment:token:view", "member:token:createWithSsoAccess", "team:domain:create", "team:domain:delete", "deployment:customDomain:create", "deployment:customDomain:delete", "deployment:backups:create", "deployment:backups:import", "deployment:backups:configurePeriodic", "deployment:backups:disablePeriodic", "deployment:backups:delete", "team:disableExceedingSpendingLimits", "billing:spendingLimit:update", "team:applyReferralCode", "oauthApplication:create", "oauthApplication:update", "oauthApplication:delete", "oauthApplication:verify", "oauthApplication:generateClientSecret", "integration:workos:team:create", "integration:workos:environment:create", "integration:workos:environment:delete", "integration:workos:environment:retrieveCredentials", "integration:workos:team:disconnect", "integration:workos:team:inviteMember", "integration:workos:projectEnvironment:create", "integration:workos:projectEnvironment:delete", "integration:workos:projectEnvironment:retrieveCredentials", "sso:enable", "sso:disable", "sso:update", "member:loginWithSso", "directorySync:enable", "directorySync:disable", "directorySync:updateGroupMapping", "directorySync:deleteGroupMapping", "deployment:transfer", "deployment:receive", "deployment:update", "customRole:create", "customRole:update", "customRole:delete" ] } }, { "name": "limit", "in": "query", "description": "Maximum number of events to return (1-100, defaults to 15).", "required": false, "schema": { "type": [ "integer", "null" ], "format": "int64", "minimum": 0 } }, { "name": "cursor", "in": "query", "description": "Cursor from a previous response to fetch the next page.", "required": false, "schema": { "type": [ "string", "null" ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListAuditLogEventsResponse" } } } } }, "security": [ { "PAT": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/invite_team_member": { "post": { "tags": [ "Teams" ], "summary": "Invite a team member", "description": "Invite a member to the given team by email. `role` is required and must be\none of `admin`, `developer`, or `custom`. Pass `custom` together with a\nnon-empty `customRoles` list to invite a member into a custom role; for\n`admin` and `developer`, `customRoles` must be omitted.", "operationId": "invite team member", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateInvitationArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] } ] } }, "/teams/{team_id}/list_pending_invites": { "get": { "tags": [ "Teams" ], "summary": "List pending team invitations", "description": "List the pending invitations for the given team.", "operationId": "list pending team invites", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlatformListInvitationsResponse" } } } } }, "security": [ { "PAT": [] } ] } }, "/teams/{team_id}/cancel_team_member_invite": { "post": { "tags": [ "Teams" ], "summary": "Cancel a pending team invitation", "operationId": "cancel team member invite", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CancelInvitationArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] } ] } }, "/projects/{project_id}/list_default_environment_variables": { "get": { "tags": [ "Environment Variables" ], "summary": "List default environment variables", "description": "Lists all default environment variables for the specified project, with\noptional filtering by name and deployment type.", "operationId": "list default environment variables", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } }, { "name": "name", "in": "query", "description": "Filter by exact environment variable name.", "required": false, "schema": { "type": [ "string", "null" ] } }, { "name": "deploymentType", "in": "query", "description": "Filter by deployment type", "required": false, "schema": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DeploymentType" } ] } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaginatedDefaultEnvironmentVariablesResponse" } } } } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/projects/{project_id}/update_default_environment_variables": { "post": { "tags": [ "Environment Variables" ], "summary": "Update default environment variables", "description": "Creates, updates, or deletes default environment variables for the specified\nproject. When `value` is a string, the variable is upserted. When `value` is\nnull, the variable is deleted. Each item in `changes` can set\n`applyToExistingDeployments` to true to asynchronously upsert or delete the\nvariable on every existing cloud deployment of that item's `deploymentType`.", "operationId": "update default environment variables", "parameters": [ { "name": "project_id", "in": "path", "description": "Project ID", "required": true, "schema": { "$ref": "#/components/schemas/ProjectId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateDefaultEnvironmentVariablesArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "OAuth Team Token": [] }, { "Team Token": [] }, { "OAuth Project Token": [] } ] } }, "/teams/{team_id}/create_custom_role": { "post": { "tags": [ "Custom Roles" ], "summary": "Create a custom role", "description": "Creates a new custom role for the team with the specified name,\ndescription, and permission statements.", "operationId": "create custom role", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateCustomRoleArgs" } } }, "required": true }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomRoleResponse" } } } } }, "security": [ { "PAT": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/list_custom_roles": { "get": { "tags": [ "Custom Roles" ], "summary": "List custom roles", "description": "Lists all custom roles for the team with cursor-based pagination.", "operationId": "list custom roles", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } }, { "name": "cursor", "in": "query", "description": "Cursor for pagination", "required": false, "schema": { "type": "string" } }, { "name": "limit", "in": "query", "description": "Max results per page (default: 100, max: 100)", "required": false, "schema": { "type": "integer", "format": "int64" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListCustomRolesResponse" } } } } }, "security": [ { "PAT": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/update_custom_role": { "post": { "tags": [ "Custom Roles" ], "summary": "Update a custom role", "description": "Updates an existing custom role's name, description, and permission\nstatements.", "operationId": "update custom role", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateCustomRoleArgs" } } }, "required": true }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CustomRoleResponse" } } } } }, "security": [ { "PAT": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/delete_custom_role": { "post": { "tags": [ "Custom Roles" ], "summary": "Delete a custom role", "description": "Deletes a custom role from the team. Fails with `CustomRoleInUse` if\nthe role is still attached to any team members; reassign those members\n(e.g. via `update_team_member_role`) before retrying.", "operationId": "delete custom role", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteCustomRoleArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] }, { "Team Token": [] } ] } }, "/teams/{team_id}/update_team_member_role": { "post": { "tags": [ "Teams" ], "summary": "Update a team member's role", "description": "Sets either the member's built-in `role` (admin/developer) or their\n`customRoles`. The two fields are mutually exclusive: setting `role`\nclears `customRoles`, and setting `customRoles` (must be non-empty)\nputs the member in the `custom` role.", "operationId": "update team member role", "parameters": [ { "name": "team_id", "in": "path", "description": "Team ID", "required": true, "schema": { "$ref": "#/components/schemas/TeamId" } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTeamMemberRoleArgs" } } }, "required": true }, "responses": { "200": { "description": "" } }, "security": [ { "PAT": [] } ] } }, "/agents/create_guest_team": { "post": { "tags": [ "Agents" ], "summary": "Create agent guest team", "description": "Gives an AI agent that registered with WorkOS anonymously a team and a\nproject to build in before any Convex user claims it. The agent may then\ncreate one dev deployment in the project, which expires after a few days,\nand deploy keys for that deployment. Calling this again returns the same\nguest team. When a Convex user claims the agent, the project moves into\ntheir team.", "operationId": "create agent guest team", "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AgentGuestTeamResponse" } } } } }, "security": [ { "Agent Token": [] } ] } } }, "components": { "schemas": { "AccessTokenId": { "type": "integer", "format": "int64", "minimum": 0 }, "AdminKey": { "type": "string", "deprecated": true }, "AgentGuestTeamResponse": { "type": "object", "required": [ "teamId", "teamSlug", "projectId", "projectSlug" ], "properties": { "teamId": { "$ref": "#/components/schemas/TeamId", "description": "The guest team, which has no members." }, "teamSlug": { "$ref": "#/components/schemas/TeamSlug" }, "projectId": { "$ref": "#/components/schemas/ProjectId", "description": "The guest team project. The agent may create one dev deployment in it." }, "projectSlug": { "$ref": "#/components/schemas/ProjectSlug" } } }, "AttributionClaims": { "type": "object", "description": "The wire format of the claims sent to the gateway.\n\nAll three are absent when we cannot identify the caller. A caller in the\nroot component has a `function_name` but no `component_path`.", "properties": { "componentPath": { "type": [ "string", "null" ] }, "functionName": { "type": [ "string", "null" ] }, "functionType": { "type": [ "string", "null" ] } }, "additionalProperties": false }, "AuditLogActor": { "oneOf": [ { "type": "object", "title": "System", "description": "The internal Convex system.", "required": [ "kind" ], "properties": { "kind": { "type": "string", "enum": [ "system" ] } } }, { "type": "object", "title": "Member", "description": "A member acting via the dashboard.", "required": [ "member_id", "kind" ], "properties": { "member_id": { "$ref": "#/components/schemas/MemberId", "description": "Member ID" }, "kind": { "type": "string", "enum": [ "member" ] } } }, { "type": "object", "title": "Token", "description": "A token.", "required": [ "token_id", "kind" ], "properties": { "member_id": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId", "description": "Member ID" } ] }, "token_id": { "$ref": "#/components/schemas/AccessTokenId", "description": "Token ID. `0` for legacy audit log rows created before token IDs\nwere recorded." }, "client_id": { "type": [ "string", "null" ], "description": "Client ID of the OAuth application the token was issued to or is\nmanaged by, if any." }, "kind": { "type": "string", "enum": [ "token" ] } } }, { "type": "object", "title": "Integration", "description": "An integration (OAuth application).", "required": [ "client_id", "kind" ], "properties": { "client_id": { "type": "string", "description": "Client ID of the integration" }, "kind": { "type": "string", "enum": [ "integration" ] } } } ], "description": "The identity that executed an audit log action." }, "AuditLogEventResponse": { "type": "object", "required": [ "teamId", "actor", "action", "createTime", "metadata" ], "properties": { "teamId": { "$ref": "#/components/schemas/TeamId", "description": "Team ID" }, "actor": { "$ref": "#/components/schemas/AuditLogActor", "description": "The identity that executed the action" }, "action": { "type": "string", "enum": [ "team:join", "team:create", "team:update", "team:delete", "project:create", "project:transfer", "project:receive", "project:update", "project:delete", "project:recover", "defaultEnvironmentVariable:create", "defaultEnvironmentVariable:update", "defaultEnvironmentVariable:delete", "deployment:create", "deployment:delete", "deployment:recover", "member:invite", "member:cancelInvitation", "member:remove", "member:updateRole", "project:updateMemberRole", "billing:paymentMethod:update", "billing:contact:update", "billing:address:update", "billing:taxId:update", "billing:subscription:create", "billing:subscription:resume", "billing:subscription:cancel", "billing:subscription:changePlan", "team:token:create", "team:token:update", "team:token:delete", "team:token:view", "project:token:create", "project:token:update", "project:token:delete", "project:token:view", "deployment:token:create", "deployment:token:update", "deployment:token:delete", "deployment:token:view", "member:token:createWithSsoAccess", "team:domain:create", "team:domain:delete", "deployment:customDomain:create", "deployment:customDomain:delete", "deployment:backups:create", "deployment:backups:import", "deployment:backups:configurePeriodic", "deployment:backups:disablePeriodic", "deployment:backups:delete", "team:disableExceedingSpendingLimits", "billing:spendingLimit:update", "team:applyReferralCode", "oauthApplication:create", "oauthApplication:update", "oauthApplication:delete", "oauthApplication:verify", "oauthApplication:generateClientSecret", "integration:workos:team:create", "integration:workos:environment:create", "integration:workos:environment:delete", "integration:workos:environment:retrieveCredentials", "integration:workos:team:disconnect", "integration:workos:team:inviteMember", "integration:workos:projectEnvironment:create", "integration:workos:projectEnvironment:delete", "integration:workos:projectEnvironment:retrieveCredentials", "sso:enable", "sso:disable", "sso:update", "member:loginWithSso", "directorySync:enable", "directorySync:disable", "directorySync:updateGroupMapping", "directorySync:deleteGroupMapping", "deployment:transfer", "deployment:receive", "deployment:update", "customRole:create", "customRole:update", "customRole:delete" ] }, "createTime": { "type": "integer", "format": "int64", "description": "Time the event was created, in milliseconds since epoch." }, "metadata": { "$ref": "#/components/schemas/Value", "description": "Additional JSON metadata about the audit log event" }, "clientIp": { "type": [ "string", "null" ], "description": "IP address of the client that performed the action, if known." }, "clientUserAgent": { "type": [ "string", "null" ], "description": "User agent of the client that performed the action, if known." } } }, "CancelInvitationArgs": { "type": "object", "required": [ "email" ], "properties": { "email": { "type": "string" } }, "additionalProperties": false }, "CreateCustomRoleArgs": { "type": "object", "required": [ "name", "statements" ], "properties": { "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "statements": { "type": "array", "items": { "$ref": "#/components/schemas/RoleStatement" } } }, "additionalProperties": false }, "CreateDeploymentType": { "type": "string", "enum": [ "dev", "prod", "preview", "custom" ] }, "CreateInvitationArgs": { "type": "object", "required": [ "email", "role" ], "properties": { "email": { "type": "string" }, "role": { "$ref": "#/components/schemas/Role", "description": "Role to assign when the invitation is accepted.\nPass `custom` together with a non-empty `customRoles` list to invite a\nmember into a custom role; `admin` and `developer` must be sent without\n`customRoles`." }, "customRoles": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/CustomRoleId" }, "description": "Custom roles to attach when `role` is `custom`. Required and non-empty\nin that case, and forbidden otherwise." } } }, "CreatePersonalAccessTokenArgs": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Name for the personal access token." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this personal access token will\nexpire. Must be at least 30 minutes in the future." } }, "additionalProperties": false }, "CreatePersonalAccessTokenResponse": { "type": "object", "required": [ "accessToken" ], "properties": { "accessToken": { "type": "string", "description": "The generated personal access token." } } }, "CreateTeamAccessTokenArgs": { "type": "object", "properties": { "name": { "type": [ "string", "null" ], "description": "Name for the access token." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this token will expire. Must be at least\n30 minutes in the future. Defaults to no expiry if omitted." } }, "additionalProperties": false }, "CreateTeamAccessTokenResponse": { "type": "object", "required": [ "accessToken", "tokenType" ], "properties": { "accessToken": { "type": "string" }, "tokenType": { "type": "string" } } }, "CustomRoleId": { "type": "integer", "format": "int64", "minimum": 0 }, "CustomRoleResponse": { "type": "object", "required": [ "id", "teamId", "name", "statements", "createTime" ], "properties": { "id": { "$ref": "#/components/schemas/CustomRoleId" }, "teamId": { "$ref": "#/components/schemas/TeamId" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "statements": { "type": "array", "items": { "$ref": "#/components/schemas/RoleStatement" } }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId" } ] }, "createTime": { "type": "integer", "format": "int64" } } }, "DefaultEnvironmentVariableChangeArgs": { "type": "object", "required": [ "name", "deploymentType" ], "properties": { "name": { "type": "string" }, "deploymentType": { "$ref": "#/components/schemas/DeploymentType" }, "value": { "type": [ "string", "null" ], "description": "Set to a value to upsert the default environment variable\nwith the given name and type. If null, will delete the\nenvironment variable with the given name and deployment\ntype if it exists (and do nothing if it doesn’t exist)." }, "applyToExistingDeployments": { "type": "boolean", "description": "Apply this change to every existing cloud deployment of the selected\ntype, overwriting/deleting any existing values. Defaults to false." } }, "additionalProperties": false }, "DefaultEnvironmentVariableResponse": { "type": "object", "required": [ "name", "value", "deploymentTypes" ], "properties": { "name": { "type": "string" }, "value": { "type": "string" }, "deploymentTypes": { "type": "array", "items": { "$ref": "#/components/schemas/DeploymentType" }, "description": "The deployment types that this env var name + value apply to.\nNote that when filtering by a particular deployment type,\nall items in the result will have a single element\nin `deploymentType`." } } }, "DeleteCustomRoleArgs": { "type": "object", "required": [ "id" ], "properties": { "id": { "$ref": "#/components/schemas/CustomRoleId" } }, "additionalProperties": false }, "DeletePersonalAccessTokenArgs": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "description": "The token to delete. This can be the secret value of the token or the\ntoken's unique name." } }, "additionalProperties": false }, "DeleteTeamAccessTokenArgs": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "description": "The token to delete. This can be its secret value or its name." } }, "additionalProperties": false }, "DeletedProject": { "type": "object", "required": [ "id", "name", "slug", "deletedAt", "recoverableUntil" ], "properties": { "id": { "$ref": "#/components/schemas/ProjectId" }, "name": { "$ref": "#/components/schemas/ProjectName" }, "slug": { "$ref": "#/components/schemas/ProjectSlug" }, "deletedAt": { "type": "integer", "format": "int64", "description": "Deletion time in milliseconds since epoch." }, "recoverableUntil": { "type": "integer", "format": "int64", "description": "Recovery deadline in milliseconds since epoch." } } }, "DeployKey": { "type": "string", "description": "An access token with a deployment or project routing prefix." }, "DeploymentClass": { "type": "string", "enum": [ "s16", "s256", "d1024", "d2048", "p256" ] }, "DeploymentClassMetadata": { "type": "object", "required": [ "type", "available" ], "properties": { "type": { "$ref": "#/components/schemas/DeploymentClass" }, "available": { "type": "boolean" } } }, "DeploymentId": { "type": "integer", "format": "int64", "minimum": 0 }, "DeploymentReference": { "type": "string", "description": "An identifier that uniquely identifies this deployment within the project." }, "DeploymentRegionMetadata": { "type": "object", "required": [ "name", "displayName", "available" ], "properties": { "name": { "$ref": "#/components/schemas/RegionName" }, "displayName": { "type": "string" }, "available": { "type": "boolean" } } }, "DeploymentType": { "type": "string", "enum": [ "dev", "prod", "preview", "custom" ] }, "DeviceName": { "type": "string" }, "InvitationResponse": { "type": "object", "required": [ "email", "expired", "role" ], "properties": { "email": { "type": "string" }, "expired": { "type": "boolean" }, "role": { "$ref": "#/components/schemas/Role" }, "customRoles": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/TeamMemberCustomRole" }, "description": "The custom roles attached to this invitation. Present iff `role` is\n`custom`." } } }, "IsDefaultDeployment": { "type": "boolean", "description": "Indicates whether the deployment is the default prod deployment for the\nproject, or the default cloud dev deployment for the member in the project." }, "ListAuditLogEventsResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/AuditLogEventResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "ListCustomRolesResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/CustomRoleResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "ListDeploymentClassesResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/DeploymentClassMetadata" } } } }, "ListDeploymentRegionsResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/DeploymentRegionMetadata" } } } }, "ListLocalDeploymentsResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } } } }, "ListTeamAccessTokensResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/TeamAccessTokenResponse" }, "description": "The team access tokens created by the authenticated member." }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "ManagedBy": { "oneOf": [ { "type": "string", "enum": [ "vercel" ] }, { "type": "object", "required": [ "oauthApp" ], "properties": { "oauthApp": { "type": "string" } } }, { "type": "string", "enum": [ "agent" ] } ] }, "MemberId": { "type": "integer", "format": "int64", "minimum": 0 }, "MintLocalAiGatewayJwtArgs": { "type": "object", "required": [ "attribution" ], "properties": { "attribution": { "$ref": "#/components/schemas/AttributionClaims" } }, "additionalProperties": false }, "MintLocalAiGatewayJwtResponse": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } }, "PaginatedDefaultEnvironmentVariablesResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/DefaultEnvironmentVariableResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "PaginatedDeletedProjectsResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/DeletedProject" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "PaginatedDeploymentsResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformDeploymentResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "PaginatedPersonalAccessTokensResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PersonalAccessTokenResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "PaginationMetadata": { "type": "object", "required": [ "hasMore" ], "properties": { "hasMore": { "type": "boolean" }, "nextCursor": { "type": [ "string", "null" ] } } }, "PersonalAccessTokenResponse": { "type": "object", "required": [ "id", "name", "creationTime" ], "properties": { "id": { "$ref": "#/components/schemas/AccessTokenId", "description": "Stable identifier for this access token." }, "name": { "$ref": "#/components/schemas/DeviceName" }, "creationTime": { "type": "integer", "format": "int64" }, "lastUsedTime": { "type": [ "integer", "null" ], "format": "int64" }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64" }, "ssoTeamId": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/TeamId" } ] } } }, "PlatformCreateDeployKeyArgs": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Name for the deploy key." }, "allowedActions": { "type": "array", "items": { "type": "string", "enum": [ "deployment:deploy", "deployment:env:view", "deployment:env:write", "deployment:pause", "deployment:unpause", "deployment:logs:view", "deployment:metrics:view", "deployment:integrations:view", "deployment:integrations:write", "deployment:data:view", "deployment:data:write", "deployment:backups:view", "deployment:backups:create", "deployment:backups:download", "deployment:backups:delete", "deployment:backups:import", "deployment:functions:actAsUser", "deployment:functions:runInternalQueries", "deployment:functions:runInternalMutations", "deployment:functions:runInternalActions", "deployment:functions:runTestQuery", "deployment:auditLog:view", "deployment:usageLimits:view", "deployment:usageLimits:write", "deployment:usage:view", "deployment:aiGateway:use", "deployment:backups:configurePeriodic", "deployment:backups:disablePeriodic" ] }, "description": "Optional list of allowed operations for this deploy key. If omitted, the key is allowed every action the caller is currently allowed to perform on this deployment. Must contain at least one action if provided." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this deploy key will expire. Must be\nat least 30 minutes in the future." } } }, "PlatformCreateDeployKeyResponse": { "type": "object", "required": [ "deployKey" ], "properties": { "deployKey": { "$ref": "#/components/schemas/DeployKey", "description": "The generated deploy key." } } }, "PlatformCreateDeploymentArgs": { "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/components/schemas/CreateDeploymentType" }, "class": { "type": [ "string", "null" ], "description": "The class to use for this deployment. If not provided, the default\ndeployment class for your team will be used." }, "region": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RegionName", "description": "The hosting region to use for this deployment. If not provided, the\ndefault deployment region for your team will be used." } ] }, "reference": { "type": [ "string", "null" ], "description": "An identifier that uniquely identifies this deployment within the\nproject. By providing a reference, you can create multiple dev and prod\ndeployments in the project. If you don’t provide a reference, the\nendpoint will create the default production deployment for the project,\nor the default development deployment for the member that creates it\n(i.e. the deployment used by default when running `npx convex deploy`\nor `npx convex dev` respectively). When not providing a reference,\na reference will be automatically generated." }, "isDefault": { "type": [ "boolean", "null" ], "description": "When creating a prod deployment, whether the deployment is the default\nproduction deployment for the project (i.e. the one used by default\nwhen running `npx convex deploy`).\nWhen creating a dev deployment, whether the deployment is the default\ndevelopment deployment for the member that creates it (i.e. the one used\nby default when running `npx convex dev`).\nThis option can’t be set on other types of deployments.\nIf not provided, defaults to `true` when creating a dev or prod\ndeployment without providing a reference (and defaults to `false`\notherwise)." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this deployment will be deleted.\nPreview deployments have this set by default unless overridden.\nMust be at least 30 minutes in the future and cannot exceed the\nteam’s preview deployment retention days entitlement from now.\nSet to `null` to clear the expiration." } }, "additionalProperties": false }, "PlatformCreatePreviewDeployKeyArgs": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string", "description": "Name for the preview deploy key." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this preview deploy key will expire.\nMust be at least 30 minutes in the future." } } }, "PlatformCreatePreviewDeployKeyResponse": { "type": "object", "required": [ "previewDeployKey" ], "properties": { "previewDeployKey": { "$ref": "#/components/schemas/DeployKey", "description": "The generated preview deploy key." } } }, "PlatformCreateProjectArgs": { "type": "object", "required": [ "projectName" ], "properties": { "projectName": { "$ref": "#/components/schemas/ProjectName", "description": "The full name of the project as it will appear in the dashboard. Spaces\nand punctuations allowed." }, "deploymentType": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/CreateDeploymentType", "description": "Optionally provision a \"dev\" development deployment or \"prod\" production\ndeployment alongside the project. If omitted, a project is created\nwithout a deployment." } ] }, "deploymentClass": { "type": [ "string", "null" ], "description": "When creating a deployment, the class to use for the deployment.\nIf not provided, the default deployment class for your team will be\nused." }, "deploymentRegion": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RegionName", "description": "When creating a deployment, the hosting region to use for the\ndeployment. If not provided, the default deployment region for your\nteam will be used." } ] }, "tags": { "type": [ "array", "null" ], "items": { "type": "string" } } }, "additionalProperties": false }, "PlatformCreateProjectResponse": { "type": "object", "required": [ "projectId", "id", "slug" ], "properties": { "projectId": { "$ref": "#/components/schemas/ProjectId", "description": "Deprecated alias for `id`, kept for backwards compatibility." }, "id": { "$ref": "#/components/schemas/ProjectId" }, "slug": { "$ref": "#/components/schemas/ProjectSlug", "description": "The shortened version of the project name used in Convex Dashboard URLs." }, "deploymentName": { "type": [ "string", "null" ], "description": "The readable identifier for this deployment, something like\nplayful-otter-123. Only present when a deployment was requested." }, "deploymentUrl": { "type": [ "string", "null" ], "description": "Deployment cloud URL, where this deployment lives. Only present when a\ndeployment was requested." } } }, "PlatformCreateTeamArgs": { "type": "object", "required": [ "defaultRegion", "name" ], "properties": { "defaultRegion": { "$ref": "#/components/schemas/RegionName" }, "name": { "$ref": "#/components/schemas/ProposedTeamName" } } }, "PlatformCustomDomainResponse": { "type": "object", "required": [ "creationTime", "deploymentName", "requestDestination", "domain" ], "properties": { "creationTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this domain was created." }, "deploymentName": { "type": "string", "description": "The deployment name this domain is configured for." }, "requestDestination": { "$ref": "#/components/schemas/RequestDestination", "description": "The destination for this custom domain (convexCloud or convexSite)." }, "domain": { "type": "string", "description": "The custom domain name." }, "verificationTime": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this domain was verified, or null if not\nyet verified." } } }, "PlatformDeleteCustomDomainArgs": { "type": "object", "required": [ "requestDestination", "domain" ], "properties": { "requestDestination": { "$ref": "#/components/schemas/RequestDestination", "description": "The destination for this custom domain (convexCloud or convexSite)." }, "domain": { "type": "string", "description": "The custom domain name to delete." } } }, "PlatformDeleteDeployKeyArgs": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "description": "The token to delete. This can be the secret value of the token or the\ntoken's unique name." } }, "additionalProperties": false }, "PlatformDeletePreviewDeployKeyArgs": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "string", "description": "The token to delete. This can be the secret value of the token or the\ntoken's unique name." } }, "additionalProperties": false }, "PlatformDeployKeyResponse": { "type": "object", "required": [ "id", "name", "creationTime", "allowedActions" ], "properties": { "id": { "$ref": "#/components/schemas/AccessTokenId", "description": "Stable identifier for this deploy key." }, "name": { "type": "string", "description": "The name given to the deploy key at creation." }, "creationTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this token was created." }, "lastUsedTime": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this token was last used (if ever)." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this deploy key will expire." }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId", "description": "The member ID that created this deploy key (if available)." } ] }, "managedBy": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ManagedBy", "description": "The external integration that manages this deploy key, if any." } ] }, "allowedActions": { "type": "array", "items": { "type": "string", "enum": [ "deployment:deploy", "deployment:env:view", "deployment:env:write", "deployment:pause", "deployment:unpause", "deployment:logs:view", "deployment:metrics:view", "deployment:integrations:view", "deployment:integrations:write", "deployment:data:view", "deployment:data:write", "deployment:backups:view", "deployment:backups:create", "deployment:backups:download", "deployment:backups:delete", "deployment:backups:import", "deployment:functions:actAsUser", "deployment:functions:runInternalQueries", "deployment:functions:runInternalMutations", "deployment:functions:runInternalActions", "deployment:functions:runTestQuery", "deployment:auditLog:view", "deployment:usageLimits:view", "deployment:usageLimits:write", "deployment:usage:view", "deployment:aiGateway:use", "deployment:backups:configurePeriodic", "deployment:backups:disablePeriodic" ] }, "description": "The same operations as `allowedOperations`, in the colon-based action format (e.g. `\"deployment:data:view\"`). Unlike `allowedOperations`, this is always present: an unrestricted key (where `allowedOperations` is omitted) lists every deployment action here." } } }, "PlatformDeploymentResponse": { "oneOf": [ { "type": "object", "required": [ "id", "name", "createTime", "deploymentType", "projectId", "region", "isDefault", "reference", "deploymentUrl", "class", "kind" ], "properties": { "id": { "$ref": "#/components/schemas/DeploymentId" }, "name": { "type": "string", "description": "The readable identifier for this deployment, something like\nplayful-otter-123." }, "createTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this deployment was created." }, "lastDeployTime": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds of the last deploy to this deployment, if\nany." }, "deploymentType": { "$ref": "#/components/schemas/DeploymentType", "description": "The type of this deployment." }, "projectId": { "$ref": "#/components/schemas/ProjectId", "description": "The project this deployment belongs to." }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId", "description": "The member who created this deployment." } ] }, "previewIdentifier": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PreviewDeploymentIdentifier", "description": "Preview deployment identifier, if this is a preview deployment." } ] }, "region": { "$ref": "#/components/schemas/RegionName", "description": "The region where this deployment is hosted." }, "isDefault": { "$ref": "#/components/schemas/IsDefaultDeployment", "description": "For prod deployments, whether they are the default prod deployment\nof the project. For dev deployments, whether they are the default\ndev deployment for the member that created it.\nFor other deployments, set to false." }, "reference": { "$ref": "#/components/schemas/DeploymentReference", "description": "An identifier that uniquely identifies this deployment within the\nproject." }, "dashboardEditConfirmation": { "type": [ "boolean", "null" ], "description": "Controls whether the dashboard requires a confirmation before\nallowing edits during a browser session for this deployment.\nIf not set, defaults to true for prod deployments and false\nfor dev and preview deployments." }, "deploymentUrl": { "type": "string", "description": "The full backend URL for this deployment (e.g. \"https://joyful-capybara-123.convex.cloud\" or \"https://calm-cow-456.eu-west-1.convex.cloud\"). This is always a `.convex.cloud` URL, even when the deployment is using custom domains. To get the canonical URL, use [`/get_canonical_urls`](https://docs.convex.dev/deployment-api/get-canonical-urls)." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this deployment will be\ndeleted. Preview deployments have this set by default unless\noverridden." }, "class": { "type": "string", "description": "The deployment class for this deployment." }, "sendLogsToClient": { "type": [ "boolean", "null" ], "description": "Whether to send function logs to the client. If `null`, the\ndeployment-type default is used (true for dev/preview, false for\nprod)." }, "kind": { "type": "string", "enum": [ "cloud" ] } } }, { "type": "object", "required": [ "name", "createTime", "deploymentType", "projectId", "creator", "port", "deviceName", "isActive", "kind" ], "properties": { "name": { "type": "string", "description": "The readable identifier for this deployment." }, "createTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this deployment was created." }, "deploymentType": { "$ref": "#/components/schemas/DeploymentType", "description": "Whether this is a \"dev\" development deployment or \"prod\" production\ndeployment. Note that this will always be \"dev\" for local\ndeployments." }, "projectId": { "$ref": "#/components/schemas/ProjectId", "description": "The project this deployment belongs to." }, "creator": { "$ref": "#/components/schemas/MemberId", "description": "The member who created this deployment." }, "previewIdentifier": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/PreviewDeploymentIdentifier", "description": "Preview deployment identifier. Note that this will always be None\nfor local deployments." } ] }, "port": { "type": "integer", "format": "int32", "description": "The port where this local deployment is running.", "minimum": 0 }, "deviceName": { "$ref": "#/components/schemas/DeviceName", "description": "The device name where this local deployment is running." }, "isActive": { "type": "boolean", "description": "Whether this local deployment is currently active." }, "kind": { "type": "string", "enum": [ "local" ] } } } ] }, "PlatformListCustomDomainsResponse": { "type": "object", "required": [ "domains" ], "properties": { "domains": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformCustomDomainResponse" }, "description": "List of custom domains configured for this deployment." } } }, "PlatformListInvitationsResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/InvitationResponse" } } } }, "PlatformListPreviewDeployKeysResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/PlatformDeployKeyResponse" }, "description": "The list of preview deploy keys." } } }, "PlatformListTeamMembersResponse": { "type": "object", "required": [ "items" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/TeamMember" } }, "directorySynced": { "type": [ "boolean", "null" ] } } }, "PlatformPaginatedProjectsResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "PlatformTokenDetailsResponse": { "oneOf": [ { "type": "object", "required": [ "id", "teamId", "name", "createTime", "type" ], "properties": { "id": { "$ref": "#/components/schemas/AccessTokenId", "description": "Stable identifier for this access token." }, "teamId": { "$ref": "#/components/schemas/TeamId", "description": "The team ID this token is associated with." }, "name": { "$ref": "#/components/schemas/DeviceName", "description": "The name given to the token at creation." }, "createTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this token was created." }, "type": { "type": "string", "enum": [ "teamToken" ] } } }, { "type": "object", "required": [ "id", "projectId", "name", "createTime", "type" ], "properties": { "id": { "$ref": "#/components/schemas/AccessTokenId", "description": "Stable identifier for this access token." }, "projectId": { "$ref": "#/components/schemas/ProjectId", "description": "The project ID this token is associated with." }, "name": { "$ref": "#/components/schemas/DeviceName", "description": "The name given to the token at creation." }, "createTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when this token was created." }, "type": { "type": "string", "enum": [ "projectToken" ] } } } ] }, "PlatformTransferDeploymentArgs": { "type": "object", "required": [ "destinationProjectId" ], "properties": { "destinationProjectId": { "$ref": "#/components/schemas/ProjectId" } }, "additionalProperties": false }, "PlatformUpdateDeploymentArgs": { "type": "object", "properties": { "reference": { "type": [ "string", "null" ], "description": "The reference of the deployment. When provided, must match the following\nrules:\n - be unique across deployment references in the project\n - 3 to 100 characters (included)\n - only lowercase letters, numbers, \"-\"\" and \"/\"\n - not follow the deployment name format [a-z]+-[a-z]+-[0-9]+ (e.g.\n \"happy-capybara-123\")\n - not start with \"local-\"\"\n - not be one of the following reserved keywords: \"prod\", \"dev\",\n \"cloud\", \"local\", \"default\", \"name\", \"new\", \"existing\",\n \"deployment\", \"preview\"" }, "dashboardEditConfirmation": { "type": [ "boolean", "null" ], "description": "Controls whether the dashboard requires a confirmation before allowing\nedits during a browser session for this deployment. If set to `null`,\nthe setting is reset to the default behavior (true for prod deployments,\nfalse for dev and preview deployments). If set to `true` or `false`, the\nsetting is explicitly overridden." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when this deployment will be deleted.\nPreview deployments have this set by default unless overridden.\nMust be at least 30 minutes in the future and cannot exceed the\nteam's preview deployment retention days entitlement from now.\nSet to `null` to clear the expiration." }, "sendLogsToClient": { "type": [ "boolean", "null" ], "description": "Whether to send function logs to the client. If set to `null`, the\nsetting is reset to the deployment-type default (true for dev/preview,\nfalse for prod). If set to `true` or `false`, the setting is explicitly\noverridden." }, "class": { "type": [ "string", "null" ], "description": "The deployment class to move this deployment to (e.g. \"s16\", \"s256\").\nRequires the deployment class selection entitlement." }, "isDefault": { "type": [ "boolean", "null" ], "description": "For a prod deployment, whether the deployment is the default\nproduction deployment for the project (i.e. the one used by default\nwhen running `npx convex deploy`).\nFor a dev deployment, whether the deployment is the default\ndevelopment deployment for the member that created it (i.e. the one\nused by default when running `npx convex dev`).\nSetting this to `true` will fail on preview or custom deployments,\nor if there is already a matching default deployment in the project." }, "deploymentType": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DeploymentType", "description": "Set this field to change the deployment type of this deployment.\nIf the deployment is a default deployment, you will need to set\n`isDefault` explicitly." } ] } }, "additionalProperties": false }, "PlatformUpdateProjectArgs": { "type": "object", "properties": { "name": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProjectName", "description": "New name for the project. If omitted, the name is left unchanged." } ] }, "slug": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ProjectSlug", "description": "New slug for the project. If omitted, the slug is left unchanged." } ] }, "tags": { "type": [ "array", "null" ], "items": { "type": "string" }, "description": "Replaces the project's full set of tags; `[]` clears them. If omitted,\nthe tags are left unchanged." } }, "additionalProperties": false }, "PreviewDeploymentIdentifier": { "type": "string" }, "ProjectId": { "type": "integer", "format": "int64", "minimum": 0 }, "ProjectName": { "type": "string" }, "ProjectResponse": { "type": "object", "required": [ "id", "name", "slug", "teamId", "teamSlug", "createTime", "tags" ], "properties": { "id": { "$ref": "#/components/schemas/ProjectId" }, "name": { "$ref": "#/components/schemas/ProjectName", "description": "The full project name, including spaces and punctuation." }, "slug": { "$ref": "#/components/schemas/ProjectSlug", "description": "This shortened version of the name used in Convex Dashboard URLs." }, "teamId": { "$ref": "#/components/schemas/TeamId" }, "teamSlug": { "$ref": "#/components/schemas/TeamSlug", "description": "The slug of the team that owns this project." }, "createTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds." }, "prodDeploymentName": { "type": [ "string", "null" ], "description": "The name of the default production deployment for this project, if one\nexists (e.g. \"happy-otter-123\")." }, "devDeploymentName": { "type": [ "string", "null" ], "description": "The name of the requesting member's default development deployment for\nthis project, if one exists (an active local deployment or default\ncloud dev deployment)." }, "prodDeploymentReference": { "type": [ "string", "null" ], "description": "The reference of the default production deployment for this project,\nif one exists (e.g. \"production\")." }, "devDeploymentReference": { "type": [ "string", "null" ], "description": "The reference of the requesting member's default development deployment\nfor this project, if one exists and is a cloud deployment (e.g.\n\"dev/jane-doe\")." }, "tags": { "type": "array", "items": { "type": "string" } } } }, "ProjectSlug": { "type": "string" }, "ProjectTagResponse": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "ProjectTagsResponse": { "type": "object", "required": [ "items", "pagination" ], "properties": { "items": { "type": "array", "items": { "$ref": "#/components/schemas/ProjectTagResponse" } }, "pagination": { "$ref": "#/components/schemas/PaginationMetadata" } } }, "ProposedTeamName": { "type": "string" }, "ReferralCode": { "type": "string" }, "RegionName": { "type": "string", "enum": [ "aws-us-east-1", "aws-eu-west-1", "aws-ca-central-1", "aws-ap-southeast-2" ] }, "RequestDestination": { "type": "string", "enum": [ "convexCloud", "convexSite" ] }, "Role": { "type": "string", "enum": [ "admin", "developer", "custom" ] }, "RoleStatement": { "type": "object", "description": "A single permission rule within a custom role.", "required": [ "effect", "actions", "resource" ], "properties": { "effect": { "$ref": "#/components/schemas/RoleStatementEffect" }, "actions": { "$ref": "#/components/schemas/RoleStatementActions" }, "resource": { "type": "string", "description": "Resource path like `project:*`, `project:slug=my-app`,\n`project:tag=prod`, or `project:*:deployment:type=prod`.", "example": "project:*" } } }, "RoleStatementAction": { "type": "string", "description": "An action that can be allowed or denied by a custom role statement.", "enum": [ "team:update", "team:delete", "project:create", "project:transfer", "project:receive", "project:update", "project:delete", "project:recover", "project:view", "project:updateMemberRole", "defaultEnvironmentVariable:create", "defaultEnvironmentVariable:update", "defaultEnvironmentVariable:delete", "defaultEnvironmentVariable:view", "deployment:create", "deployment:transfer", "deployment:receive", "deployment:updateReference", "deployment:updateDashboardEditConfirmation", "deployment:updateExpiresAt", "deployment:updateSendLogsToClient", "deployment:updateClass", "deployment:updateIsDefault", "deployment:updateType", "deployment:delete", "deployment:recover", "deployment:view", "deployment:integrations:view", "deployment:integrations:write", "deployment:customDomain:create", "deployment:customDomain:delete", "deployment:customDomain:view", "member:invite", "member:cancelInvitation", "member:remove", "member:updateRole", "member:view", "billing:paymentMethod:update", "billing:contact:update", "billing:address:update", "billing:taxId:update", "billing:subscription:changePlan", "billing:spendingLimit:update", "billing:view", "billing:invoices:view", "team:auditLog:view", "team:domain:create", "team:domain:delete", "team:domain:view", "team:projectTags:view", "team:token:create", "team:token:update", "team:token:delete", "team:token:view", "project:token:create", "project:token:update", "project:token:delete", "project:token:view", "deployment:token:create", "deployment:token:update", "deployment:token:delete", "deployment:token:view", "oauthApplication:create", "oauthApplication:update", "oauthApplication:delete", "oauthApplication:view", "oauthApplication:generateClientSecret", "team:usage:view", "deployment:insights:view", "deployment:backups:create", "deployment:backups:import", "deployment:backups:configurePeriodic", "deployment:backups:disablePeriodic", "deployment:backups:delete", "deployment:backups:view", "sso:enable", "sso:disable", "sso:update", "sso:view", "directorySync:enable", "directorySync:disable", "directorySync:updateGroupMapping", "directorySync:deleteGroupMapping", "directorySync:view", "customRole:view", "integration:view", "integration:create", "integration:update", "integration:delete", "deployment:deploy", "deployment:env:view", "deployment:env:write", "deployment:pause", "deployment:unpause", "deployment:logs:view", "deployment:metrics:view", "deployment:data:view", "deployment:data:write", "deployment:backups:download", "deployment:functions:actAsUser", "deployment:functions:runInternalQueries", "deployment:functions:runInternalMutations", "deployment:functions:runInternalActions", "deployment:functions:runTestQuery", "deployment:auditLog:view", "deployment:usageLimits:view", "deployment:usageLimits:write", "deployment:usage:view", "deployment:aiGateway:use" ] }, "RoleStatementActions": { "oneOf": [ { "$ref": "#/components/schemas/RoleStatementWildcardAction" }, { "type": "array", "items": { "$ref": "#/components/schemas/RoleStatementAction" } } ] }, "RoleStatementEffect": { "type": "string", "description": "Whether a rule grants or revokes access.", "enum": [ "allow", "deny" ] }, "RoleStatementWildcardAction": { "type": "string", "enum": [ "*" ] }, "TeamAccessTokenResponse": { "type": "object", "required": [ "id", "name", "creationTime" ], "properties": { "id": { "$ref": "#/components/schemas/AccessTokenId", "description": "The id of this access token." }, "name": { "type": "string", "description": "Name of the token." }, "creationTime": { "type": "integer", "format": "int64", "description": "Timestamp in milliseconds when the token was created." }, "lastUsedTime": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when the token was last used, if ever." }, "expiresAt": { "type": [ "integer", "null" ], "format": "int64", "description": "Timestamp in milliseconds when the token expires, if set." }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId", "description": "The member who created the token." } ] } } }, "TeamId": { "type": "integer", "format": "int64", "minimum": 0 }, "TeamMember": { "type": "object", "required": [ "id", "email", "role" ], "properties": { "id": { "$ref": "#/components/schemas/MemberId" }, "name": { "type": [ "string", "null" ], "description": "The name of the team member" }, "email": { "type": "string", "description": "The email of the team member" }, "role": { "$ref": "#/components/schemas/Role", "description": "The role of the team member. `custom` indicates the member's\npermissions come from the attached `customRoles`." }, "customRoles": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/TeamMemberCustomRole" }, "description": "The custom roles attached to this team member. Present iff\n`role` is `custom`." }, "directoryManaged": { "type": [ "boolean", "null" ] } } }, "TeamMemberCustomRole": { "type": "object", "description": "A custom role attached to a team member, denormalized with the\nrole's display name so API consumers can render members without a\nseparate roles lookup.", "required": [ "id", "name" ], "properties": { "id": { "$ref": "#/components/schemas/CustomRoleId" }, "name": { "type": "string" } } }, "TeamName": { "type": "string" }, "TeamResponse": { "type": "object", "required": [ "id", "name", "slug", "suspended", "referralCode" ], "properties": { "id": { "$ref": "#/components/schemas/TeamId" }, "name": { "$ref": "#/components/schemas/TeamName" }, "slug": { "$ref": "#/components/schemas/TeamSlug" }, "creator": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MemberId" } ] }, "suspended": { "type": "boolean" }, "referralCode": { "$ref": "#/components/schemas/ReferralCode" }, "referredBy": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/TeamId" } ] }, "managedBy": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ManagedBy" } ] }, "defaultRegion": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RegionName" } ] }, "ssoLoginId": { "type": [ "string", "null" ] }, "managedByUrl": { "type": [ "string", "null" ] } } }, "TeamSlug": { "type": "string" }, "UpdateCustomRoleArgs": { "type": "object", "required": [ "id", "name", "statements" ], "properties": { "id": { "$ref": "#/components/schemas/CustomRoleId" }, "name": { "type": "string" }, "description": { "type": [ "string", "null" ] }, "statements": { "type": "array", "items": { "$ref": "#/components/schemas/RoleStatement" } } }, "additionalProperties": false }, "UpdateDefaultEnvironmentVariablesArgs": { "type": "object", "required": [ "changes" ], "properties": { "changes": { "type": "array", "items": { "$ref": "#/components/schemas/DefaultEnvironmentVariableChangeArgs" } } }, "additionalProperties": false }, "UpdateTeamMemberRoleArgs": { "type": "object", "required": [ "memberId" ], "properties": { "memberId": { "$ref": "#/components/schemas/MemberId" }, "role": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/Role", "description": "Set the member's built-in role to `admin` or `developer`. Mutually\nexclusive with `customRoles`. The `custom` value is not accepted\nhere; assign `customRoles` to put the member in the custom state." } ] }, "customRoles": { "type": [ "array", "null" ], "items": { "$ref": "#/components/schemas/CustomRoleId" }, "description": "Replace the member's custom roles. Mutually exclusive with `role`.\nMust be non-empty. Sets the member's role to `custom`." } }, "additionalProperties": false }, "Value": {} }, "securitySchemes": { "Agent Token": { "type": "http", "scheme": "bearer", "description": "Access token WorkOS issued to an AI agent registration." }, "OAuth Project Token": { "type": "http", "scheme": "bearer", "description": "Obtained through a [Convex OAuth application](https://docs.convex.dev/management-api)." }, "OAuth Team Token": { "type": "http", "scheme": "bearer", "description": "Obtained through a [Convex OAuth application](https://docs.convex.dev/management-api)." }, "PAT": { "type": "http", "scheme": "bearer", "bearerFormat": "PAT", "description": "Personal access token created in the Convex dashboard under user settings." }, "Preview Deploy Key": { "type": "http", "scheme": "bearer", "description": "Preview deploy key scoped to a project. Allowed only when operating on preview deployments in the key's project." }, "Team Token": { "type": "http", "scheme": "bearer", "description": "Created in the dashboard under team settings for any team you can manage." } } }, "tags": [ { "name": "Projects", "description": "Create, list, and manage projects" }, { "name": "Deployments", "description": "Create, list, and manage deployments" }, { "name": "Deploy Keys", "description": "Create, list, and delete deploy keys" }, { "name": "Custom Domains", "description": "Create, list, and delete custom domains" }, { "name": "Teams", "description": "List and manage team members" }, { "name": "Access Tokens", "description": "Inspect authentication token details" } ] }