Create an app
curl --request POST \
--url https://platform.jobbit.uk/v1/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_id": "up_4e7a1c90b3d2",
"name": "kent-physio-site",
"env": {
"BOOKING_EMAIL": "bookings@kentphysio.co.uk"
},
"database": "managed",
"description": "Kent Physio website"
}
'import requests
url = "https://platform.jobbit.uk/v1/apps"
payload = {
"upload_id": "up_4e7a1c90b3d2",
"name": "kent-physio-site",
"env": { "BOOKING_EMAIL": "bookings@kentphysio.co.uk" },
"database": "managed",
"description": "Kent Physio website"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: 'up_4e7a1c90b3d2',
name: 'kent-physio-site',
env: {BOOKING_EMAIL: 'bookings@kentphysio.co.uk'},
database: 'managed',
description: 'Kent Physio website'
})
};
fetch('https://platform.jobbit.uk/v1/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.jobbit.uk/v1/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'upload_id' => 'up_4e7a1c90b3d2',
'name' => 'kent-physio-site',
'env' => [
'BOOKING_EMAIL' => 'bookings@kentphysio.co.uk'
],
'database' => 'managed',
'description' => 'Kent Physio website'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.jobbit.uk/v1/apps"
payload := strings.NewReader("{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.jobbit.uk/v1/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}"
response = http.request(request)
puts response.read_body{
"requested_name": "kent-physio-site",
"deployment": {
"id": "b7d30c2e-18a4-4f69-9c05-e2a61d7f4b83",
"app": null,
"status": "pending",
"url": null,
"error": null
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "upload_not_found",
"message": "no such upload; upload the archive first",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_request",
"message": "the request is not valid",
"details": [
{
"location": [
"body",
"name"
],
"message": "String should match pattern '^[a-z0-9][a-z0-9-]*$'",
"type": "string_pattern_mismatch"
}
],
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Create an app
Creates an app from an upload and starts building it. It returns at once with status 202 and a deployment; poll GET /v1/deployments/{deployment_id} until it is deployed or failed. A key limited to some apps cannot create new ones.
Requires the deploy:write permission.
POST
/
v1
/
apps
Create an app
curl --request POST \
--url https://platform.jobbit.uk/v1/apps \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"upload_id": "up_4e7a1c90b3d2",
"name": "kent-physio-site",
"env": {
"BOOKING_EMAIL": "bookings@kentphysio.co.uk"
},
"database": "managed",
"description": "Kent Physio website"
}
'import requests
url = "https://platform.jobbit.uk/v1/apps"
payload = {
"upload_id": "up_4e7a1c90b3d2",
"name": "kent-physio-site",
"env": { "BOOKING_EMAIL": "bookings@kentphysio.co.uk" },
"database": "managed",
"description": "Kent Physio website"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
upload_id: 'up_4e7a1c90b3d2',
name: 'kent-physio-site',
env: {BOOKING_EMAIL: 'bookings@kentphysio.co.uk'},
database: 'managed',
description: 'Kent Physio website'
})
};
fetch('https://platform.jobbit.uk/v1/apps', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://platform.jobbit.uk/v1/apps",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'upload_id' => 'up_4e7a1c90b3d2',
'name' => 'kent-physio-site',
'env' => [
'BOOKING_EMAIL' => 'bookings@kentphysio.co.uk'
],
'database' => 'managed',
'description' => 'Kent Physio website'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://platform.jobbit.uk/v1/apps"
payload := strings.NewReader("{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://platform.jobbit.uk/v1/apps")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/apps")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"upload_id\": \"up_4e7a1c90b3d2\",\n \"name\": \"kent-physio-site\",\n \"env\": {\n \"BOOKING_EMAIL\": \"bookings@kentphysio.co.uk\"\n },\n \"database\": \"managed\",\n \"description\": \"Kent Physio website\"\n}"
response = http.request(request)
puts response.read_body{
"requested_name": "kent-physio-site",
"deployment": {
"id": "b7d30c2e-18a4-4f69-9c05-e2a61d7f4b83",
"app": null,
"status": "pending",
"url": null,
"error": null
}
}{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "insufficient_scope",
"message": "this key does not have the deploy:write permission",
"details": {
"required": "deploy:write"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "upload_not_found",
"message": "no such upload; upload the archive first",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "invalid_request",
"message": "the request is not valid",
"details": [
{
"location": [
"body",
"name"
],
"message": "String should match pattern '^[a-z0-9][a-z0-9-]*$'",
"type": "string_pattern_mismatch"
}
],
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}{
"error": {
"code": "rate_limited",
"message": "too many read requests, retry in 4 s",
"details": {
"group": "read",
"limit": 120,
"window_seconds": 60
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}Authorizations
An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…
Body
application/json
An upload from POST /v1/uploads.
Required string length:
1 - 128The app name: lowercase letters, digits and hyphens. The hosting may add a suffix while building; the final name comes with the deployment.
Required string length:
1 - 60Pattern:
^[a-z0-9][a-z0-9-]*$Environment variables for the app.
Show child attributes
Show child attributes
managed gives the app a Postgres database and its DATABASE_URL; none does not.
Available options:
none, managed A short description.
Maximum string length:
500⌘I