Skip to content

Create deployment

POST
/api/v1/deployments
curl --request POST \
--url https://api.deploybase.eu/api/v1/api/v1/deployments \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "branch": "example", "commit_hash": "example", "commit_message": "example", "project_id": "example" }'

Creates a new deployment and queues it for building

Deployment details

Media type application/json
object
branch
required
string
>= 1 characters <= 255 characters
commit_hash
string
commit_message
string
<= 1000 characters
project_id
required
string
Example generated
{
"branch": "example",
"commit_hash": "example",
"commit_message": "example",
"project_id": "example"
}

Created

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_started_at
string
commit_hash
string
commit_message
string
created_at
string
created_by_email
string
deployed_at
string
file_count
integer
has_custom_404
boolean
has_spa_fallback
boolean
id
string
is_preview
boolean
preview_url
string
project_id
string
redirect_rules
Array<object>
object
force
boolean
from
string
status
integer
to
string
status
string
Allowed values: pending queued building deployed failed cancelled
team_id
string
total_bytes
integer
updated_at
string
url
string
Example
{
"data": {
"status": "pending"
}
}

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

Project not found

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