POST
/
v1
/
agent-tasks
Create a task
curl --request POST \
  --url https://platform.jobbit.uk/v1/agent-tasks \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "goal": "Write a headline and meta description for the Kent Physio home page.",
  "input": {
    "site": "https://kentphysio.co.uk",
    "tone": "warm and plain"
  },
  "output_schema": {
    "type": "object",
    "properties": {
      "headline": {
        "type": "string"
      },
      "meta_description": {
        "type": "string",
        "maxLength": 160
      }
    },
    "required": [
      "headline",
      "meta_description"
    ]
  },
  "workspace": {
    "key": "kent-physio-site",
    "title": "Kent Physio website"
  },
  "model": "jobbit/pro",
  "effort": "high",
  "limits": {
    "max_credits": 200,
    "max_minutes": 20
  },
  "on_question": "fail",
  "idempotency_key": "kp-home-copy-2026-11-05",
  "source": {
    "ticket": "KP-142"
  }
}
'
import requests

url = "https://platform.jobbit.uk/v1/agent-tasks"

payload = {
"goal": "Write a headline and meta description for the Kent Physio home page.",
"input": {
"site": "https://kentphysio.co.uk",
"tone": "warm and plain"
},
"output_schema": {
"type": "object",
"properties": {
"headline": { "type": "string" },
"meta_description": {
"type": "string",
"maxLength": 160
}
},
"required": ["headline", "meta_description"]
},
"workspace": {
"key": "kent-physio-site",
"title": "Kent Physio website"
},
"model": "jobbit/pro",
"effort": "high",
"limits": {
"max_credits": 200,
"max_minutes": 20
},
"on_question": "fail",
"idempotency_key": "kp-home-copy-2026-11-05",
"source": { "ticket": "KP-142" }
}
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({
goal: 'Write a headline and meta description for the Kent Physio home page.',
input: {site: 'https://kentphysio.co.uk', tone: 'warm and plain'},
output_schema: {
type: 'object',
properties: {headline: {type: 'string'}, meta_description: {type: 'string', maxLength: 160}},
required: ['headline', 'meta_description']
},
workspace: {key: 'kent-physio-site', title: 'Kent Physio website'},
model: 'jobbit/pro',
effort: 'high',
limits: {max_credits: 200, max_minutes: 20},
on_question: 'fail',
idempotency_key: 'kp-home-copy-2026-11-05',
source: {ticket: 'KP-142'}
})
};

fetch('https://platform.jobbit.uk/v1/agent-tasks', 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/agent-tasks",
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([
'goal' => 'Write a headline and meta description for the Kent Physio home page.',
'input' => [
'site' => 'https://kentphysio.co.uk',
'tone' => 'warm and plain'
],
'output_schema' => [
'type' => 'object',
'properties' => [
'headline' => [
'type' => 'string'
],
'meta_description' => [
'type' => 'string',
'maxLength' => 160
]
],
'required' => [
'headline',
'meta_description'
]
],
'workspace' => [
'key' => 'kent-physio-site',
'title' => 'Kent Physio website'
],
'model' => 'jobbit/pro',
'effort' => 'high',
'limits' => [
'max_credits' => 200,
'max_minutes' => 20
],
'on_question' => 'fail',
'idempotency_key' => 'kp-home-copy-2026-11-05',
'source' => [
'ticket' => 'KP-142'
]
]),
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/agent-tasks"

payload := strings.NewReader("{\n \"goal\": \"Write a headline and meta description for the Kent Physio home page.\",\n \"input\": {\n \"site\": \"https://kentphysio.co.uk\",\n \"tone\": \"warm and plain\"\n },\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"meta_description\": {\n \"type\": \"string\",\n \"maxLength\": 160\n }\n },\n \"required\": [\n \"headline\",\n \"meta_description\"\n ]\n },\n \"workspace\": {\n \"key\": \"kent-physio-site\",\n \"title\": \"Kent Physio website\"\n },\n \"model\": \"jobbit/pro\",\n \"effort\": \"high\",\n \"limits\": {\n \"max_credits\": 200,\n \"max_minutes\": 20\n },\n \"on_question\": \"fail\",\n \"idempotency_key\": \"kp-home-copy-2026-11-05\",\n \"source\": {\n \"ticket\": \"KP-142\"\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/agent-tasks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"goal\": \"Write a headline and meta description for the Kent Physio home page.\",\n \"input\": {\n \"site\": \"https://kentphysio.co.uk\",\n \"tone\": \"warm and plain\"\n },\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"meta_description\": {\n \"type\": \"string\",\n \"maxLength\": 160\n }\n },\n \"required\": [\n \"headline\",\n \"meta_description\"\n ]\n },\n \"workspace\": {\n \"key\": \"kent-physio-site\",\n \"title\": \"Kent Physio website\"\n },\n \"model\": \"jobbit/pro\",\n \"effort\": \"high\",\n \"limits\": {\n \"max_credits\": 200,\n \"max_minutes\": 20\n },\n \"on_question\": \"fail\",\n \"idempotency_key\": \"kp-home-copy-2026-11-05\",\n \"source\": {\n \"ticket\": \"KP-142\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://platform.jobbit.uk/v1/agent-tasks")

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 \"goal\": \"Write a headline and meta description for the Kent Physio home page.\",\n \"input\": {\n \"site\": \"https://kentphysio.co.uk\",\n \"tone\": \"warm and plain\"\n },\n \"output_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"headline\": {\n \"type\": \"string\"\n },\n \"meta_description\": {\n \"type\": \"string\",\n \"maxLength\": 160\n }\n },\n \"required\": [\n \"headline\",\n \"meta_description\"\n ]\n },\n \"workspace\": {\n \"key\": \"kent-physio-site\",\n \"title\": \"Kent Physio website\"\n },\n \"model\": \"jobbit/pro\",\n \"effort\": \"high\",\n \"limits\": {\n \"max_credits\": 200,\n \"max_minutes\": 20\n },\n \"on_question\": \"fail\",\n \"idempotency_key\": \"kp-home-copy-2026-11-05\",\n \"source\": {\n \"ticket\": \"KP-142\"\n }\n}"

response = http.request(request)
puts response.read_body
{
  "task_id": "c41d7e0a-5b92-4f63-8e1a-3a9d2f6b7c10",
  "status": "queued",
  "reason": null,
  "goal_completed": null,
  "output": null,
  "text": null,
  "artifacts": [],
  "files": [],
  "error": null,
  "metrics": {
    "cost_credits": null,
    "cost_usd": null,
    "turns": null,
    "duration_seconds": null
  },
  "chat_id": "9a2f6d1e-83c4-4b05-a7e9-0c5d1b4f2e68",
  "workspace": "kent-physio-site",
  "model": "jobbit/pro",
  "effort": "high",
  "on_question": "fail",
  "question": null,
  "questions_asked": 0,
  "budget_credits": 200,
  "source": {
    "ticket": "KP-142"
  },
  "created_at": "2026-11-05T14:02:11+00:00",
  "started_at": null,
  "finished_at": null
}
{
"error": {
"code": "invalid_key",
"message": "the API key is missing or invalid",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "insufficient_credits",
"message": "not enough credits to run this request",
"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": "file_not_found",
"message": "file e2f0a9b4-6d17-4c3a-95be-1f8a7d3c6420 not found",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "idempotency_conflict",
"message": "this idempotency_key was already used with a different request",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "input_too_large",
"message": "input is larger than 262144 bytes",
"request_id": "5d3f0b7c8a2e4e19b6c47a90d1e2f3a4"
}
}
{
"error": {
"code": "invalid_callback",
"message": "callback url must use https",
"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_…

Body

application/json
goal
string
required

What to do and when the job counts as done.

Required string length: 1 - 4000
input
any

Data for the task, up to 256 KiB of JSON. The agent treats it as data, not as instructions.

files
string[]

Ids of files from POST /v1/files, up to 20. The key also needs files:read.

Maximum array length: 20
Required string length: 1 - 64
output_schema
object

A JSON Schema (draft 2020-12, up to 64 KiB) the result must follow. The task fails with invalid_output if the agent cannot meet it.

project_id
string

A project to run the task in. You need to be an editor of it.

Maximum string length: 64
workspace
object
model
string

A model id, such as jobbit/pro. Defaults to the default for the account's plan.

Maximum string length: 100
effort
enum<string>
default:high

How hard the agent thinks.

Available options:
none,
low,
medium,
high,
xhigh,
max
limits
object
on_question
enum<string>
default:fail

fail: the agent decides for itself. ask: it may stop with a question and wait in waiting_input.

Available options:
fail,
ask
callback
object
idempotency_key
string

Repeating a create with the same key and the same body returns the first task; the same key with a different body is a conflict.

Required string length: 1 - 200
source
object

Your own labels, up to 4 KiB. They are stored on the task and returned unchanged.

Response

The task was created. A repeated idempotency_key returns the existing task with status 200 instead.

task_id
string
required

The task id.

status
enum<string>
required

Where the task is.

Available options:
queued,
running,
waiting_input,
succeeded,
failed,
cancelled
reason
string | null

Why the task is in this state: completed, cancelled, question, invalid_output, budget_exceeded, timed_out, goal_unreachable, worker_stopped, insufficient_credits or run_failed.

goal_completed
boolean | null

Whether the agent reports that the goal was met.

output
any

The result following your output_schema. Only set when the task succeeded and a schema was given.

text
string | null

The agent's final answer as text.

artifacts
object[]

Files the agent made.

files
string[]

Ids of the files handed to the task.

error
string | null

What went wrong, for a failed task.

metrics
object
chat_id
string | null

The id of the chat in the Jobbit app where the work happens.

workspace
string | null

The workspace key, if one was given.

model
string

The model the task runs on.

effort
string

The effort level.

on_question
enum<string>

Whether the task may ask questions.

Available options:
fail,
ask
question
object | null

The open question, while the status is waiting_input.

questions_asked
integer

How many questions the task has asked.

budget_credits
number

The most credits the task may spend.

source
object

Your source labels.

created_at
string<date-time>

When the task was created.

started_at
string<date-time> | null

When it started running.

finished_at
string<date-time> | null

When it finished.