Skip to content

Create project

POST
/api/v1/projects
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

Project details

Media type application/json
object
auto_deploy_enabled

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.

boolean
build_command
string
<= 500 characters
default_branch
string
<= 255 characters
framework
string
Allowed values: nextjs sveltekit astro hugo vite gatsby jekyll static-html other
git_provider
string
Allowed values: github gitlab bitbucket codeberg
git_repo_url
string
git_token
string
<= 500 characters
mr_previews_enabled

Whether merge/pull request events build previews (default true). Independent of the branch policy, which never applies to MR events.

boolean
name
required
string
>= 1 characters <= 255 characters
output_dir
string
<= 255 characters
package_manager
string
Allowed values: npm pnpm yarn bun
preview_branch_exclude

Branch patterns evaluated before the include list under mode “custom”; a match blocks the build. “Everything except bots” is include [“”], exclude [“renovate/”].

Array<string>
preview_branch_include

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.

Array<string>
preview_branch_mode

Which webhook pushes auto-build a preview: “all” (default), “none” (only the default branch) or “custom”. The default branch always builds, under every mode.

string
root_directory
string
<= 255 characters
skip_git_validation
boolean
slug
string
>= 1 characters <= 255 characters

Created

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
auto_deploy_enabled

Auto-deploy (GitHub webhook) fields

boolean
build_command
string
bunny_edge_rule_guid
string
bunny_not_found_edge_rule_guid
string
bunny_pull_zone_id
integer
created_at
string
default_branch
string
framework
string
Allowed values: nextjs sveltekit astro hugo vite gatsby jekyll static-html other
git_connection_id

Optional FK to team_git_connections; nil = manual PAT

string
git_provider
string
git_repo_url
string
id
string
live_deployment_id
string
mr_previews_enabled

MRPreviewsEnabled governs merge/pull-request previews on its own: the branch policy above never applies to an MR event.

boolean
name
string
output_dir
string
package_manager

PackageManager overrides the Node package manager used at build time. nil = auto-detect (lockfile / packageManager field); set = user override.

string
Allowed values: npm pnpm yarn bun
preview_branch_exclude
Array<string>
preview_branch_include
Array<string>
preview_branch_mode

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.

string
Allowed values: all none custom
production_url
string
root_directory
string
slug
string
status
string
Allowed values: active deleting
subdomain

Production URL fields

string
team_id
string
updated_at
string
Example
{
"data": {
"framework": "nextjs",
"package_manager": "npm",
"preview_branch_mode": "all",
"status": "active"
}
}

Bad Request

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Unauthorized

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}

Slug already exists

Media type application/json
object
code
string
details
error
string
meta
object
request_id
string
timestamp
string
trace_id
string
Example generated
{
"code": "example",
"details": "example",
"error": "example",
"meta": {
"request_id": "example",
"timestamp": "example",
"trace_id": "example"
}
}