Skip to main content
POST
Create Job

Authorizations

Authorization
string
header
required

Enter your Kubiya API token (format: Bearer )

Body

application/json

Schema for creating a new job

name
string
required

Job name

Required string length: 1 - 255
trigger_type
string
required

Trigger type: 'cron', 'webhook', or 'manual'

prompt_template
string
required

Prompt template (can include {{variables}} for dynamic params)

description
string | null

Job description

enabled
boolean
default:true

Whether the job is enabled

cron_schedule
string | null

Cron expression (e.g., '0 17 * * *' for daily at 5pm)

cron_timezone
string | null
default:UTC

Timezone for cron schedule (e.g., 'America/New_York')

planning_mode
string
default:predefined_agent

Planning mode: 'on_the_fly', 'predefined_agent', 'predefined_team', or 'predefined_workflow'

entity_type
string | null

Entity type: 'agent', 'team', or 'workflow'

entity_id
string | null

Entity ID (agent_id, team_id, or workflow_id)

system_prompt
string | null

Optional system prompt

executor_type
string
default:auto

Executor routing: 'auto', 'specific_queue', or 'environment'

worker_queue_name
string | null

Worker queue name for 'specific_queue' executor type

environment_name
string | null

Environment name for 'environment' executor type

config
Config · object

Additional execution config (timeout, retry, etc.)

execution_environment
ExecutionEnvironment · object | null

Execution environment: env vars, secrets, integrations

Response

Successful Response

Schema for job response

id
string
required
organization_id
string
required
name
string
required
description
string | null
required
enabled
boolean
required
status
string
required
trigger_type
string
required
cron_schedule
string | null
required
cron_timezone
string | null
required
temporal_schedule_id
string | null
required
planning_mode
string
required
entity_type
string | null
required
entity_id
string | null
required
entity_name
string | null
required
prompt_template
string
required
system_prompt
string | null
required
executor_type
string
required
worker_queue_name
string | null
required
environment_name
string | null
required
config
Config · object
required
execution_environment
ExecutionEnvironment · object | null
required

Execution environment configuration for jobs

last_execution_id
string | null
required
last_execution_at
string<date-time> | null
required
next_execution_at
string<date-time> | null
required
total_executions
integer
required
successful_executions
integer
required
failed_executions
integer
required
execution_history
Execution History · object[]
required
created_by
string | null
required
updated_by
string | null
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
last_triggered_at
string<date-time> | null
required
webhook_url
string | null

Full webhook URL (generated from webhook_url_path)

webhook_secret
string | null

Webhook HMAC secret for signature verification

created_by_email
string | null

Email of the user who created the job (enriched)

updated_by_email
string | null

Email of the user who last updated the job (enriched)