Token for the next page of results













Workflows Schedules Endpoints
Workflows API - schedules.












Examples
Real world code examples
Get Schedules
GET /v1/workflows/schedules#
Get Schedules
200
Successful Response
next_page_token#
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.getSchedules();
for await (const page of result) {
console.log(page);
}
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.getSchedules();
for await (const page of result) {
console.log(page);
}
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.get_schedules()
while res is not None:
# Handle items
res = res.next()
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.get_schedules()
while res is not None:
# Handle items
res = res.next()
curl https://api.mistral.ai/v1/workflows/schedules \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/schedules \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"schedules": [
{
"input": "Example input.",
"paused": false,
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"workflow_name": "support-workflow"
}
]
}{
"schedules": [
{
"input": "Example input.",
"paused": false,
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"workflow_name": "support-workflow"
}
]
}Schedule Workflow
POST /v1/workflows/schedules#
Schedule Workflow
deployment_name#
Name of the deployment to route this schedule to
Specification of the times scheduled actions may occur.
The times are the union of :py:attr:calendars, :py:attr:intervals, and
:py:attr:cron_expressions excluding anything in :py:attr:skip.
Used for input where schedule_id is optional (can be provided or auto-generated).
schedule_id#
Allows you to specify a custom schedule ID. If not provided, a random ID will be generated.
workflow_version_id#
Deprecated: use workflow_registration_id
201
Successful Response
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.scheduleWorkflow({
schedule: {
input: "<value>",
},
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.scheduleWorkflow({
schedule: {
input: "<value>",
},
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.schedule_workflow(schedule={
"input": "<value>",
})
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.schedule_workflow(schedule={
"input": "<value>",
})
# Handle response
print(res)
curl https://api.mistral.ai/v1/workflows/schedules \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"schedule": {
"input": "Example input."
}
}'curl https://api.mistral.ai/v1/workflows/schedules \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"schedule": {
"input": "Example input."
}
}'201
{
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Get Schedule
GET /v1/workflows/schedules/{schedule_id}#
Get Schedule
200
Successful Response
cron_expressions#
Cron-based specification of times.
deployment_name#
Name of the deployment this schedule targets.
end_at#
Time after which no more actions will be run.
future_executions#
Upcoming scheduled executions (10 next executions, earliest first).
jitter#
Jitter to apply each action.
An action's scheduled time will be incremented by a random value between 0 and this value if present (but not past the next schedule).
note#
Human-readable note associated with the current pause or resume state.
Whether the schedule is currently paused.
policy#
recent_executions#
Most recent scheduled executions (10 most recent, newest last).
remaining_executions#
Remaining workflow executions before this schedule stops triggering automatically. null means unlimited; 0 means the limit has been reached and the schedule is exhausted.
start_at#
Time after which the first action may be run.
time_zone_name#
IANA time zone name, for example US/Central.
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.getSchedule({
scheduleId: "<id>",
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.getSchedule({
scheduleId: "<id>",
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.get_schedule(schedule_id="<id>")
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.get_schedule(schedule_id="<id>")
# Handle response
print(res)
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X GET \
-H 'Authorization: Bearer YOUR_APIKEY_HERE'200
{
"input": "Example input.",
"paused": false,
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"workflow_name": "support-workflow"
}{
"input": "Example input.",
"paused": false,
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
"workflow_name": "support-workflow"
}Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.unscheduleWorkflow({
scheduleId: "<id>",
});
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.unscheduleWorkflow({
scheduleId: "<id>",
});
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.unschedule_workflow(schedule_id="<id>")
# Use the SDK ...
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.unschedule_workflow(schedule_id="<id>")
# Use the SDK ...
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X DELETE \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json'Update Schedule
PATCH /v1/workflows/schedules/{schedule_id}#
Update Schedule
Schedule definition for partial updates.
All fields are optional (inherited from _ScheduleRequestBase). Only explicitly-set fields are applied during an update; unset fields preserve the existing schedule values.
200
Successful Response
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.updateSchedule({
scheduleId: "<id>",
workflowScheduleUpdateRequest: {
schedule: {},
},
});
console.log(result);
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
const result = await mistral.workflows.schedules.updateSchedule({
scheduleId: "<id>",
workflowScheduleUpdateRequest: {
schedule: {},
},
});
console.log(result);
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.update_schedule(schedule_id="<id>", schedule={})
# Handle response
print(res)
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
res = mistral.workflows.schedules.update_schedule(schedule_id="<id>", schedule={})
# Handle response
print(res)
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"schedule": {}
}'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id} \
-X PATCH \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d '{
"schedule": {}
}'200
{
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}{
"schedule_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
}Pause Schedule
POST /v1/workflows/schedules/{schedule_id}/pause#
Pause Schedule
WorkflowSchedulePauseRequest#
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.pauseSchedule({
scheduleId: "<id>",
});
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.pauseSchedule({
scheduleId: "<id>",
});
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.pause_schedule(schedule_id="<id>")
# Use the SDK ...
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.pause_schedule(schedule_id="<id>")
# Use the SDK ...
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/pause \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/pause \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'Resume Schedule
POST /v1/workflows/schedules/{schedule_id}/resume#
Resume Schedule
WorkflowSchedulePauseRequest#
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.resumeSchedule({
scheduleId: "<id>",
});
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.resumeSchedule({
scheduleId: "<id>",
});
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.resume_schedule(schedule_id="<id>")
# Use the SDK ...
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.resume_schedule(schedule_id="<id>")
# Use the SDK ...
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/resume \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/resume \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'Trigger Schedule
POST /v1/workflows/schedules/{schedule_id}/trigger#
Trigger Schedule
WorkflowScheduleTriggerRequest#
Playground
Test the endpoints live
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.triggerSchedule({
scheduleId: "<id>",
});
}
run();
import { Mistral } from "@mistralai/mistralai";
const mistral = new Mistral({
apiKey: "MISTRAL_API_KEY",
});
async function run() {
await mistral.workflows.schedules.triggerSchedule({
scheduleId: "<id>",
});
}
run();
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.trigger_schedule(schedule_id="<id>")
# Use the SDK ...
from mistralai.client import Mistral
import os
with Mistral(
api_key=os.getenv("MISTRAL_API_KEY", ""),
) as mistral:
mistral.workflows.schedules.trigger_schedule(schedule_id="<id>")
# Use the SDK ...
curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/trigger \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'curl https://api.mistral.ai/v1/workflows/schedules/{schedule_id}/trigger \
-X POST \
-H 'Authorization: Bearer YOUR_APIKEY_HERE' \
-H 'Content-Type: application/json' \
-d 'null'