Skip to content

Turn the mission agent’s schedule off

PATCH
/v1/missions/{id}/agent/schedule
curl --request PATCH \
--url https://beta-api.plune.ai/v1/missions/example/agent/schedule \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "state": "off" }'

Anyone who may write turns it off — a person or a write token; the journal says who. Turning it on again is a person’s PUT. Ten a minute.

id
required
string

The mission’s id

Media type application/json
object
state
required
string
Allowed values: off
Example
{
"state": "off"
}

The schedule, off

Media type application/json
object
id
required
string
missionId
required
string
state
required

off: turned off by someone who may write; paused: its author left the project; a person setting it again turns it on

string
Allowed values: on off paused
pauseReason
string
Allowed values: author_left
budgetUsd
required
number
everyHours
required
integer
nextRunAt
required
string format: date-time
createdBy
required

The person who set it: its runs act for them

string
lastFiredAt
required
string format: date-time
nullable
lastRunId
required

The run its last time queued or resumed

string
nullable
lastOutcome
required

What its last time did: a run queued or resumed, or why none

string
nullable
Allowed values: queued resumed running mission_done budget_too_low
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Example
{
"id": "6c1d8e2a-3b4f-4a7e-8d21-5f9b0c3e7a42",
"missionId": "6f1c2b3a-0000-4000-8000-000000002188",
"state": "off",
"budgetUsd": 2,
"everyHours": 24,
"nextRunAt": "2026-11-15T06:00:00.000Z",
"createdBy": "6f1c2b3a-0000-4000-8000-0000000000a2",
"lastFiredAt": "2026-11-14T06:00:00.000Z",
"lastRunId": "0b6f3c2e-7d1a-4f0e-9a51-2c8e4b7d9f10",
"lastOutcome": "queued",
"createdAt": "2026-11-13T09:00:00.000Z",
"updatedAt": "2026-11-14T06:00:00.000Z"
}

Invalid JSON, or a state other than off

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No / invalid token or session

A reader, or a read token

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

No such mission in your project, or it has no schedule

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over