POST
/
v1
/
automations
/
{automation_id}
/
tables
/
{table}
/
rows
/
delete
Delete table rows
curl --request POST \
  --url https://platform.jobbit.uk/v1/automations/{automation_id}/tables/{table}/rows/delete \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "keys": [
    "bk_1042",
    "bk_1043"
  ]
}
'
import requests

url = "https://platform.jobbit.uk/v1/automations/{automation_id}/tables/{table}/rows/delete"

payload = { "keys": ["bk_1042", "bk_1043"] }
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({keys: ['bk_1042', 'bk_1043']})
};

fetch('https://platform.jobbit.uk/v1/automations/{automation_id}/tables/{table}/rows/delete', 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}/tables/{table}/rows/delete",
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([
'keys' => [
'bk_1042',
'bk_1043'
]
]),
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}/tables/{table}/rows/delete"

payload := strings.NewReader("{\n \"keys\": [\n \"bk_1042\",\n \"bk_1043\"\n ]\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/automations/{automation_id}/tables/{table}/rows/delete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"keys\": [\n \"bk_1042\",\n \"bk_1043\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.jobbit.uk/v1/automations/{automation_id}/tables/{table}/rows/delete")

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 \"keys\": [\n \"bk_1042\",\n \"bk_1043\"\n ]\n}"

response = http.request(request)
puts response.read_body
{
  "deleted": 2
}
{
"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": "payload_too_large",
"message": "table quota exceeded",
"details": {
"reason": "max_rows_per_table",
"message": "table quota exceeded"
},
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "error",
"message": "this automation has no table 'orders'; it declares: bookings",
"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
table
string
required

The table name. The automation must declare it.

Body

application/json
keys
string[]
required

Keys of the rows to delete, 1 to 500.

Required array length: 1 - 500 elements

Response

The rows were deleted.

deleted
integer
required

How many rows existed and were deleted.