Create Job
POST
/api/v3/projects/{project_id}/jobs
const url = 'https://example.com/api/v3/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jobs';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"agent":"example","context":{},"instructions":"example","max_tokens":2000,"name":"example","prompt":"example","response_format":"text","retry_policy":{},"schedule":{},"target":"candidate","target_channel":"example","user":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v3/projects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/jobs \ --header 'Content-Type: application/json' \ --data '{ "agent": "example", "context": {}, "instructions": "example", "max_tokens": 2000, "name": "example", "prompt": "example", "response_format": "text", "retry_policy": {}, "schedule": {}, "target": "candidate", "target_channel": "example", "user": "example" }'Create one job against an exact Agent, app user, and runtime target.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”project_id
required
Project Id
string format: uuid
Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
JobCreateRequestV3
object
agent
required
Agent
string
context
Context
object
key
additional properties
any
max_tokens
Max Tokens
integer
name
required
Name
string
prompt
required
Prompt
string
response_format
Response Format
string
retry_policy
Retry Policy
object
key
additional properties
any
schedule
required
Schedule
object
key
additional properties
any
target
DeploymentTarget
A mutable deployment pointer to an immutable Project release.
string
user
required
User
string
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
JobResponseV3
object
agent_id
required
Agent Id
string format: uuid
context
required
Context
object
key
additional properties
any
created_at
required
Created At
string format: date-time
id
required
Id
string format: uuid
max_tokens
required
Max Tokens
integer
name
required
Name
string
next_run_at
required
Next Run At
string format: date-time
project_id
required
Project Id
string format: uuid
prompt
required
Prompt
string
response_format
required
Response Format
string
retry_policy
required
Retry Policy
object
key
additional properties
any
schedule
required
Schedule
object
key
additional properties
any
status
required
Status
string
target
required
DeploymentTarget
A mutable deployment pointer to an immutable Project release.
string
target_app_user_id
required
Target App User Id
string
updated_at
required
Updated At
string format: date-time
user_id
required
User Id
string format: uuid
Example
{ "target": "candidate"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}