Set a state entry
curl --request PUT \
--url https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": {
"week_ending": "2026-11-01",
"bookings": 42
}
}
'import requests
url = "https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}"
payload = { "value": {
"week_ending": "2026-11-01",
"bookings": 42
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: {week_ending: '2026-11-01', bookings: 42}})
};
fetch('https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}', 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}/state/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => [
'week_ending' => '2026-11-01',
'bookings' => 42
]
]),
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/automations/{automation_id}/state/{key}"
payload := strings.NewReader("{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}"
response = http.request(request)
puts response.read_body{
"key": "last_summary",
"value": {
"week_ending": "2026-11-01",
"bookings": 42
}
}{
"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": "not_found",
"message": "unknown automation",
"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"
}
}Set a state entry
Stores a JSON object under a key of the automation’s memory, replacing what was there.
Requires the automations:write permission.
PUT
/
v1
/
automations
/
{automation_id}
/
state
/
{key}
Set a state entry
curl --request PUT \
--url https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"value": {
"week_ending": "2026-11-01",
"bookings": 42
}
}
'import requests
url = "https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}"
payload = { "value": {
"week_ending": "2026-11-01",
"bookings": 42
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({value: {week_ending: '2026-11-01', bookings: 42}})
};
fetch('https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}', 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}/state/{key}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'value' => [
'week_ending' => '2026-11-01',
'bookings' => 42
]
]),
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/automations/{automation_id}/state/{key}"
payload := strings.NewReader("{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}")
req, _ := http.NewRequest("PUT", 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.put("https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform.jobbit.uk/v1/automations/{automation_id}/state/{key}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"value\": {\n \"week_ending\": \"2026-11-01\",\n \"bookings\": 42\n }\n}"
response = http.request(request)
puts response.read_body{
"key": "last_summary",
"value": {
"week_ending": "2026-11-01",
"bookings": 42
}
}{
"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": "not_found",
"message": "unknown automation",
"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_…
Path Parameters
The automation id.
Maximum string length:
64The state key.
Body
application/json
Any JSON object.
⌘I