v2
latestOpenAPI 3.1.0LicenseRef-Convex2026-07-264790136.4 KBCreate deployment
Create a new deployment for a project.
Path parameters
Project ID
Request body
The class to use for this deployment. If not provided, the default deployment class for your team will be used.
An identifier that uniquely identifies this deployment within the project. By providing a reference, you can create multiple dev and prod deployments in the project. If you don’t provide a reference, the endpoint will create the default production deployment for the project, or the default development deployment for the member that creates it (i.e. the deployment used by default when running npx convex deploy or npx convex dev respectively). When not providing a reference, a reference will be automatically generated.
When creating a prod deployment, whether the deployment is the default production deployment for the project (i.e. the one used by default when running npx convex deploy). When creating a dev deployment, whether the deployment is the default development deployment for the member that creates it (i.e. the one used by default when running npx convex dev). This option can’t be set on other types of deployments. If not provided, defaults to true when creating a dev or prod deployment without providing a reference (and defaults to false otherwise).
Timestamp in milliseconds when this deployment will be deleted. Preview deployments have this set by default unless overridden. Must be at least 30 minutes in the future and cannot exceed the team’s preview deployment retention days entitlement from now. Set to null to clear the expiration.