Skip to main content
POST
Task Create

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Example: 'Authorization: Bearer {token}'

Body

application/json

Scheduled command create/update payload (reuses /api/task paths).

name
string
required

Command display name.

prompt
string
required

Prompt / command text to run via Copilot chat.

agent_id
string | null

Optional Copilot agent id to @-mention for the run.

chat_model
ChatModelRef · object | null

Optional chat model override {provider, model}.

mentions
Mentions · object[]

Optional mention snapshot (agent/mcp) for the headless run.

visibility
enum<string>
default:private

Command visibility: 'private' or 'public'

Available options:
private,
public
schedule
Schedule · object

Schedule information for the command

state
enum<string>
default:enabled

Command state: 'enabled' or 'disabled'

Available options:
disabled,
enabled
thread_policy
enum<string>
default:new_each_run

Whether each run creates a new chat thread or appends to thread_id

Available options:
new_each_run,
append
thread_id
string | null

Thread to append to when thread_policy is 'append'

Response

Successful Response

name
string
required

Command display name.

prompt
string
required

Prompt / command text.

created_by
string
required

User who created the command (email)

id
string | null

Unique identifier for the command

agent_id
string | null

Optional Copilot agent id.

chat_model
ChatModelRef · object | null

Optional model override.

mentions
Mentions · object[]
visibility
enum<string>
default:private
Available options:
private,
public
schedule
Schedule · object
state
enum<string>
default:enabled
Available options:
disabled,
enabled
thread_policy
enum<string>
default:new_each_run
Available options:
new_each_run,
append
thread_id
string | null
next_run
string<date-time>
default:1970-01-01T00:00:00

Next scheduled execution time (UTC)

last_run_at
string<date-time> | null
last_run_status
string | null
last_run_thread_id
string | null