Begin a direct upload for a new project
const url = 'https://api.deploybase.eu/api/v1/api/v1/uploads';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"files":[{"hash":"example","path":"example","size":1}],"label":"example","project":{"name":"example","subdomain":"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/uploads \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "files": [ { "hash": "example", "path": "example", "size": 1 } ], "label": "example", "project": { "name": "example", "subdomain": "example" } }'Creates the project and opens its upload session in one call, so a folder is never asked for after the project exists and the address shown is the one reserved (DEP-671). The files are checked (manifest, and whether it is a publishable site) before the project is created. The response carries the new project; PUT the files and finalize as with POST /projects/{id}/uploads. The project stays provisional until an upload to it publishes: if none does, it is deleted about 2 hours 15 minutes after the last begin, so an abandoned upload leaves no empty project. A retry after a failed PUT or finalize goes to POST /projects/{id}/uploads with the returned project id. Git can be connected to the project later.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Header Parameters
Section titled “ Header Parameters ”Replaying this key returns the original session and project and creates nothing
Request Body
Section titled “ Request Body ”Project and upload manifest
object
object
object
Example generated
{ "files": [ { "hash": "example", "path": "example", "size": 1 } ], "label": "example", "project": { "name": "example", "subdomain": "example" }}Responses
Section titled “ Responses ”Created
object
object
object
Missing lists every unique manifest hash the client must PUT. In this phase that is every hash in the manifest; DEP-411 narrows it to the blobs the team does not hold.
Project is present on POST /uploads, which created it (DEP-671). It stays provisional (provisional_until set) until this upload, or a retry of it, publishes; if none ever does, the sweeper deletes it.
object
Site analytics (DEP-17). On by default; switching it off stops collection and deletes the project’s site_analytics_daily rows.
Auto-deploy (GitHub webhook) fields
AutoDeployPauseReason says why; the only value is AutoDeployPauseReasonRepeatedFailures.
AutoDeployPausedAt is when the breaker tripped. NULL means auto-deploy is not paused.
Auto-deploy circuit breaker (DEP-544). All five are SYSTEM state, written only by the dedicated repository methods (RecordBuildFailure, ResetBuildFailureStreak) and never by ProjectRepository.Update, which omits them: a settings save that read the row before the breaker tripped must not be able to write the pause back out.
They are deliberately separate from AutoDeployEnabled, the user’s own setting, which the platform never writes. See AutoDeployPaused in preview_branch_policy.go.
ConsecutiveBuildFailures counts user-caused failures sharing LastBuildFailureSignature.
Provenance (DEP-674, migration 000113): how the request that created this project was authenticated (proven: session or api_key) and which of our clients says it sent it (claimed, from X-Deploybase-Client). Written once by Create and omitted by ProjectRepository.Update. nil = unknown, including every project from before 000113.
ForgejoAudience is the aud value Forgejo generates for an Authorized Integration. Forgejo’s docs state it is not confidential, so unlike GitTokenEncrypted it is stored in plain text AND returned by the API – the user has to read it back to check it against their Forgejo settings.
GitAuthMode selects which credential ResolveProjectToken produces (DEP-447). “pat” is the historical behaviour; “forgejo_jwt” mints a short-lived JWT per call against ForgejoAudience and stores nothing. Empty is treated as “pat” so a row loaded before the migration, or a struct built in a test, still behaves.
Optional FK to team_git_connections; nil = manual PAT
GitUsername is the HTTP Basic username sent with the stored PAT instead of the provider default (DEP-810). A GitLab deploy token is only accepted with its own username, e.g. gitlab+deploy-token-123. Not a secret, so it is returned by the API. Set only alongside a stored PAT; cleared with it and by the keyless Forgejo mode.
LastBuildFailureMessage is the classified error line of the current streak, which the pause banner shows. Never raw build output.
LiveDeploymentID is production. Only the repository’s MoveProduction writes it, together with LiveSince and a production_events row (DEP-965); Update leaves both columns alone.
LiveSince is when production last changed: stamped whenever LiveDeploymentID moves (a build’s auto-promote, a promotion, a rollback), NULL while nothing is live (a trigger clears it with LiveDeploymentID). Never set directly (DEP-876): see ProductionMove.
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.
PlatformURLMode is read only when PrimaryDomainID is set. See PlatformURLMode.
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.
PreviewSlug is the MUTABLE, globally unique label that preview hostnames are derived from: {branch}-{preview_slug}.previews.deploybase.eu (DEP-436). It drives hostnames and nothing else — never a storage path, never a manifest. Globally unique because the previews zone is shared by every team, so the hostname namespace is global.
PrimaryDomainID is the project’s canonical hostname, as a foreign key into
domains — deliberately not a copy of the hostname string (DEP-112). The route
reconciler recomputes every pointer from this FK on each sweep, so a wrong
redirect is drift it can see and repair; a denormalised host column would be read
back by that same reconciler and confirmed rather than fixed, and the 301 it
produces is cached at the edge for an hour.
NULL means no canonical hostname: every hostname serves content directly, which is the behaviour every project had before DEP-112.
ProductionBranchDeletedAt is when a push deleted the production branch (EffectiveDefaultBranch). Cleared by the next push to that branch and by a change of DefaultBranch. nil = not known to be deleted.
ProvisionalUntil is set while a project created by a folder upload has not published yet (DEP-671, migration 000109). The project and its upload session are created together so the chosen address is held by the unique index from the start; past this time the upload sweeper deletes the project if it is still empty. NULL for every other project.
SYSTEM state, like the breaker columns below: written only by Create and the dedicated repository methods, and omitted by ProjectRepository.Update, so a stale struct saved by the publisher can never put a deadline back on an adopted project.
RepoDefaultBranch is the forge’s default branch as the last push reported it. nil when no push has reported one; Bitbucket Cloud push payloads never do.
SitesDomain is the base domain this project’s production host lives under ({subdomain}.{SitesDomain}). NULL means the legacy platform domain (BUNNY_SITES_BASE_DOMAIN). Set once at creation and never written from a request body; read it through ResolvedSitesDomain (DEP-486).
Slug is IMMUTABLE. It is the storage key — the middle segment of every deployed object’s path ({team_id}/{slug}/{deployment_id}/…) and the project_slug baked into each deployment’s write-once route manifest. Renaming it makes the router answer 500 slug_mismatch for every deployment already built. Use PreviewSlug to rename a hostname.
Production URL fields
ProjectID is the project the upload publishes to.
Skipped lists the paths left out because they sit under functions/: uploads do not deploy functions yet, and their source must never be served (DEP-1033). Send them nowhere; they are not in Missing. Absent when nothing was skipped.
Example
{ "data": { "project": { "created_client": "dashboard", "created_via": "session", "framework": "nextjs", "package_manager": "npm", "platform_url_mode": "redirect", "preview_branch_mode": "all", "status": "active" } }}Invalid request body or Idempotency-Key
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}Unauthorized
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}PLAN_LIMIT_EXCEEDED: site limit reached, or the manifest exceeds the plan’s upload allowance
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}FORBIDDEN when the role is too low; DEPLOYS_PAUSED_FOR_REVIEW when the team is held for review by a suspension case (deploys paused, sites keep serving), ACCOUNT_SUSPENDED when it is suspended; INSUFFICIENT_SCOPE when an agent connected with read or preview access uploads to production, with a WWW-Authenticate insufficient_scope challenge
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}SUBDOMAIN_TAKEN with details.suggestions, or PROJECT_NAME_TAKEN
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}SUBDOMAIN_INVALID or SUBDOMAIN_RESERVED with details.suggestions; INVALID_MANIFEST; or not a publishable site (UPLOAD_SITE_IN_SUBFOLDER, UPLOAD_SOURCE_CODE, UPLOAD_PHP_SITE)
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}Too many upload sessions
object
object
object
The structured outcome (ADR-030, DEP-965). Optional and additive: only the operations endpoints fill them so far, and a client that does not know them reads the rest as before.
Example generated
{ "code": "example", "details": "example", "docs_url": "example", "error": "example", "meta": { "request_id": "example", "timestamp": "example", "trace_id": "example" }, "next_actions": [ { "action": "example", "cli": "example", "description": "example", "http": "example", "tool": "example" } ], "reason": "example", "who_acts": "example"}Live 582ac705 built