POST
/
v1
/
automations
/
{automation_id}
/
versions
Publish a version
curl --request POST \
  --url https://platform.jobbit.uk/v1/automations/{automation_id}/versions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/gzip' \
  --data '"<string>"'
import requests

url = "https://platform.jobbit.uk/v1/automations/{automation_id}/versions"

payload = "<string>"
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/gzip"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/gzip'},
body: JSON.stringify('<string>')
};

fetch('https://platform.jobbit.uk/v1/automations/{automation_id}/versions', 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/automations/{automation_id}/versions",
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('<string>'),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/gzip"
],
]);

$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/automations/{automation_id}/versions"

payload := strings.NewReader("\"<string>\"")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/gzip")

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/automations/{automation_id}/versions")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/gzip")
.body("\"<string>\"")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.jobbit.uk/v1/automations/{automation_id}/versions")

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/gzip'
request.body = "\"<string>\""

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "automation_id": "<string>",
  "definition": {},
  "fingerprint": "<string>",
  "image_ref": "<string>",
  "build_error": "<string>",
  "consented_by": "<string>",
  "consented_at": "2023-11-07T05:31:56Z",
  "build_node": "<string>",
  "build_started_at": "2023-11-07T05:31:56Z",
  "build_finished_at": "2023-11-07T05:31:56Z",
  "created_at": "2023-11-07T05:31:56Z",
  "active": true,
  "restorable": true,
  "reused": true
}
{
"id": "88e1d5b2-43a7-4c06-9f3e-b7a0c2d41e59",
"automation_id": "2d9c6a40-7e18-4b3f-a5d2-61f08b4c9e37",
"definition": {
"meta": {
"name": "Weekly booking summary"
}
},
"status": "published",
"fingerprint": "sha256:1f3c9a",
"created_at": "2026-10-12T09:40:12+00:00",
"reused": false
}
{
"id": "<string>",
"automation_id": "<string>",
"definition": {},
"fingerprint": "<string>",
"image_ref": "<string>",
"build_error": "<string>",
"consented_by": "<string>",
"consented_at": "2023-11-07T05:31:56Z",
"build_node": "<string>",
"build_started_at": "2023-11-07T05:31:56Z",
"build_finished_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"active": true,
"restorable": true,
"reused": true
}
{
"error": {
"code": "bad_request",
"message": "automation.yaml is not in the archive",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"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": "consent_required",
"message": "consent required",
"details": {
"kind": "consent_required",
"risks": [
"network_egress"
],
"version_id": "88e1d5b2-43a7-4c06-9f3e-b7a0c2d41e59"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "validation",
"message": "validation",
"details": {
"kind": "validation",
"errors": [
{
"code": "unknown_step",
"message": "step 'send_email' needs a step that is not defined",
"step_id": "send_email"
}
]
},
"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

Authorization
string
header
required

An API key from Settings → API keys, sent as Authorization: Bearer jb_live_…

Path Parameters

automation_id
string
required

The automation id.

Maximum string length: 64

Query Parameters

The person has allowed the risks the package declares.

note
string

A note for the version history.

Maximum string length: 300

Body

application/gzip

The package as a gzip-compressed tar archive.

The body is of type file.

Response

Identical contents already existed; that version is returned with reused: true.

id
string
required

The version id.

automation_id
string
required

The automation.

status
enum<string>
required

Where the version is.

Available options:
draft,
validating,
awaiting_consent,
building,
published,
failed,
pruned
definition
object

The automation's definition, as read from automation.yaml: meta, manifest, triggers, steps and policies.

fingerprint
string | null

A hash of the package contents. Publishing identical contents again reuses the version.

image_ref
string | null

The built image.

build_error
string | null

Why the build failed.

consented_by
string | null

Who allowed the risks this version declares.

consented_at
string<date-time> | null

When.

build_node
string | null

Where it was built.

build_started_at
string<date-time> | null

When the build began.

build_finished_at
string<date-time> | null

When the build ended.

created_at
string<date-time>

When the version was made.

active
boolean

Whether it is the live version.

restorable
boolean

Whether it can be restored.

reused
boolean

Only when publishing: true if identical contents already existed.