Skip to content

Finalize an upload

POST
/api/v1/uploads/{id}/finalize
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/uploads/example/finalize \
--header 'Authorization: <Authorization>'

Verifies every manifest path arrived and publishes the deployment

id
required
string

Upload session ID

OK

Media type application/json
object
data
meta
object
request_id
string
timestamp
string
trace_id
string
data
object
branch
string
build_finished_at
string
build_log
string
build_queued_at

BuildQueuedAt is when the build entered the queue. Subtract it from build_started_at for the queue wait.

string
build_started_at
string
commit_hash
string
commit_message
string
content_hash

ContentHash is the digest of the upload’s sorted manifest (path+hash pairs). Two uploads of identical content share it, which is what makes a re-upload a no-op.

string
created_at
string
created_by_email
string
deployed_at
string
error_category

ErrorCategory of a failed build: build_error, configuration, platform, timeout or platform_restart. Always a category, never a raw error message.

string
file_count
integer
framework

Framework the project was built as, e.g. “astro”. “unknown” when unresolved.

string
has_custom_404
boolean
has_spa_fallback
boolean
id
string
is_preview
boolean
package_manager

PackageManager used for this build: npm, pnpm, yarn or bun.

string
preview_url
string
project_id
string
queue

Queue is set only while Status is queued: where this deployment sits in the build queue (DEP-326). Never stored.

object
aging_minutes
integer
ahead
integer
estimated_start_seconds
integer
lane
string
slots
integer
redirect_rules
Array<object>
object
force
boolean
from
string
status
integer
to
string
source

Source is where this deployment’s files came from: git or upload.

string
Allowed values: git upload
status
string
Allowed values: pending queued building deployed failed cancelled
team_id
string
total_bytes
integer
updated_at
string
upload_label

UploadLabel is the user-supplied name for an upload, standing in for the commit message a git deployment carries.

string
url
string
warnings

Warnings are user-facing notes about what this deploy published (DEP-442). Written once, with the terminal status, in the same UPDATE. Each stores a code; the wording and the remedy are rendered from it at read time — see deployment_warning.go.

Array<object>
object
code
string
Allowed values: OUTPUT_DIR_IS_REPO_ROOT ARTIFACTS_WITHHELD COMMITTED_CREDENTIALS
paths

Paths are the entries the warning is about, relative to the output directory. Empty for warnings that are about configuration rather than files.

Array<string>
Example
{
"data": {
"source": "git",
"status": "pending",
"warnings": [
{
"code": "OUTPUT_DIR_IS_REPO_ROOT"
}
]
}
}

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"
}
}

Unknown session

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"
}
}

Files still missing, or a finalize is already running

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"
}
}

Session is no longer open

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"
}
}

Publish failed

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"
}
}