Create project
const url = 'https://api.deploybase.eu/api/v1/api/v1/projects';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"auto_deploy_enabled":true,"build_command":"example","default_branch":"example","framework":"nextjs","git_provider":"github","git_repo_url":"example","git_token":"example","mr_previews_enabled":true,"name":"example","output_dir":"example","package_manager":"npm","preview_branch_exclude":["example"],"preview_branch_include":["example"],"preview_branch_mode":"example","root_directory":"example","skip_git_validation":true,"slug":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.deploybase.eu/api/v1/api/v1/projects \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "auto_deploy_enabled": true, "build_command": "example", "default_branch": "example", "framework": "nextjs", "git_provider": "github", "git_repo_url": "example", "git_token": "example", "mr_previews_enabled": true, "name": "example", "output_dir": "example", "package_manager": "npm", "preview_branch_exclude": [ "example" ], "preview_branch_include": [ "example" ], "preview_branch_mode": "example", "root_directory": "example", "skip_git_validation": true, "slug": "example" }'Creates a new static site project for the authenticated team
Authorizations
Section titled “ Authorizations ”Request Body
Section titled “ Request Body ”Project details
object
AutoDeployEnabled, when true, registers a webhook at create time so the flow stays a single atomic call (no post-create PATCH). Requires a git source whose provider supports auto-deploy and a resolvable token; otherwise creation is rejected.
Whether merge/pull request events build previews (default true). Independent of the branch policy, which never applies to MR events.
Branch patterns evaluated before the include list under mode “custom”; a match blocks the build. “Everything except bots” is include [“”], exclude [“renovate/”].
Branch patterns that opt a branch in under mode “custom”. Exact name, or one “” alone or at either end (e.g. “release/”, “*-beta”). Maximum 32.
Which webhook pushes auto-build a preview: “all” (default), “none” (only the default branch) or “custom”. The default branch always builds, under every mode.
Responses
Section titled “ Responses ”Created
object
object
object
Auto-deploy (GitHub webhook) fields
Optional FK to team_git_connections; nil = manual PAT
MRPreviewsEnabled governs merge/pull-request previews on its own: the branch policy above never applies to an MR event.
PackageManager overrides the Node package manager used at build time. nil = auto-detect (lockfile / packageManager field); set = user override.
Preview branch policy (DEP-287). Decides which webhook pushes auto-build a preview; see ShouldAutoBuildBranch in preview_branch_policy.go. Nothing here touches manual/API/MCP/ZIP deploys, and the default branch is never filtered.
Production URL fields
Example
{ "data": { "framework": "nextjs", "package_manager": "npm", "preview_branch_mode": "all", "status": "active" }}Bad Request
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Unauthorized
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}Slug already exists
object
object
Example generated
{ "code": "example", "details": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }}