Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Workflows Endpoints

Workflows API.

Get Workflows

GET /v1/workflows

Get Workflows

200

Successful Response

next_cursor
*string|null

A list of workflows

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.getWorkflows({});

  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.get_workflows(include_shared=True, order="asc", limit=50, active_only=False)

    while res is not None:
        # Handle items

        res = res.next()

curl https://api.mistral.ai/v1/workflows \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "next_cursor": null,
  "workflows": [
    {
      "archived": "false",
      "display_name": "My workflow",
      "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "name": "My resource"
    }
  ]
}

Get Workflow Registrations

GET /v1/workflows/registrations

Get Workflow Registrations

200

Successful Response

next_cursor
*string|null
workflow_registrations
*array<WorkflowRegistration>

A list of workflow registrations

workflow_versions
*array<WorkflowRegistration>

A list of workflow registrations

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.getWorkflowRegistrations({});

  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.get_workflow_registrations(active_only=False, include_shared=True, with_workflow=False, limit=50)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/registrations \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "next_cursor": null,
  "workflow_registrations": [
    {
      "definition": {
        "input_schema": [
          null
        ]
      },
      "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "workflow_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ],
  "workflow_versions": [
    {
      "definition": {
        "input_schema": [
          null
        ]
      },
      "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
      "workflow_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
    }
  ]
}

Execute Workflow

POST /v1/workflows/{workflow_identifier}/execute

Execute Workflow

200

Successful Response

WorkflowExecutionResponse

{object}

WorkflowExecutionSyncResponse

{object}

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.executeWorkflow({
    workflowIdentifier: "<value>",
    workflowExecutionRequest: {},
  });

  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.execute_workflow(workflow_identifier="<value>", wait_for_result=False)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/{workflow_identifier}/execute \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "end_time": null,
  "execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "result": null,
  "root_execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "start_time": "2025-12-17T10:25:07.818693Z",
  "status": "RUNNING",
  "workflow_name": "support-workflow"
}

Execute Workflow Registration

POST /v1/workflows/registrations/{workflow_registration_id}/execute

Execute Workflow Registration

200

Successful Response

WorkflowExecutionResponse

{object}

WorkflowExecutionSyncResponse

{object}

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.executeWorkflowRegistration({
    workflowRegistrationId: "de11d76a-e0fb-44dd-abd9-2e75fc275b94",
    workflowExecutionRequest: {},
  });

  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.execute_workflow_registration(workflow_registration_id="de11d76a-e0fb-44dd-abd9-2e75fc275b94", wait_for_result=False)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/registrations/{workflow_registration_id}/execute \
 -X POST \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "end_time": null,
  "execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "result": null,
  "root_execution_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
  "start_time": "2025-12-17T10:25:07.818693Z",
  "status": "RUNNING",
  "workflow_name": "support-workflow"
}

Get Workflow

GET /v1/workflows/{workflow_identifier}

Get Workflow

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.getWorkflow({
    workflowIdentifier: "<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.get_workflow(workflow_identifier="<value>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/{workflow_identifier} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "workflow": {
    "active": "true",
    "customer_id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
    "display_name": "My workflow",
    "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
    "name": "My resource",
    "type": "code",
    "workspace_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
  }
}

Update Workflow

PUT /v1/workflows/{workflow_identifier}

Update Workflow

200

Successful Response

workflow
*Workflow|null

Workflow of the workflow registration

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.updateWorkflow({
    workflowIdentifier: "<value>",
    workflowUpdateRequest: {},
  });

  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.update_workflow(workflow_identifier="<value>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/{workflow_identifier} \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{}'

200

{
  "workflow": null
}

Get Workflow Registration

GET /v1/workflows/registrations/{workflow_registration_id}

Get Workflow Registration

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.getWorkflowRegistration({
    workflowRegistrationId: "c4d86c40-960f-4e9a-9d6f-ad8342d7aa83",
  });

  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.get_workflow_registration(workflow_registration_id="c4d86c40-960f-4e9a-9d6f-ad8342d7aa83", with_workflow=False, include_shared=True)

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/registrations/{workflow_registration_id} \
 -X GET \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE'

200

{
  "workflow_registration": {
    "active": "true",
    "definition": {
      "input_schema": [
        null
      ]
    },
    "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
    "workflow_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
  },
  "workflow_version": {
    "active": "true",
    "definition": {
      "input_schema": [
        null
      ]
    },
    "id": "019b2bd7-96e7-7219-8c0b-45a73da50088",
    "workflow_id": "019b2bd7-96e7-7219-8c0b-45a73da50088"
  }
}

Bulk Archive Workflows

PUT /v1/workflows/archive

Bulk Archive Workflows

200

Successful Response

archived
*array<Workflow|null>

Workflows that were successfully archived or were already archived

Workflows that could not be archived and the corresponding error messages

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.bulkArchiveWorkflows({
    workflowIds: [],
  });

  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.bulk_archive_workflows(workflow_ids=[])

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/archive \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "workflow_ids": [
    "019b2bd7-96e7-7219-8c0b-45a73da50088"
  ]
}'

200

{
  "archived": [
    null
  ]
}

Bulk Unarchive Workflows

PUT /v1/workflows/unarchive

Bulk Unarchive Workflows

200

Successful Response

Workflows that could not be archived and the corresponding error messages

unarchived
*array<Workflow|null>

Workflows that were successfully archived or were already archived

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.bulkUnarchiveWorkflows({
    workflowIds: [],
  });

  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.bulk_unarchive_workflows(workflow_ids=[])

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/unarchive \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json' \
 -d '{
  "workflow_ids": [
    "019b2bd7-96e7-7219-8c0b-45a73da50088"
  ]
}'

200

{
  "unarchived": [
    null
  ]
}

Archive Workflow

PUT /v1/workflows/{workflow_identifier}/archive

Archive Workflow

200

Successful Response

workflow
*Workflow|null

Workflow of the workflow registration

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.archiveWorkflow({
    workflowIdentifier: "<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.archive_workflow(workflow_identifier="<value>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/{workflow_identifier}/archive \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json'

200

{
  "workflow": null
}

Unarchive Workflow

PUT /v1/workflows/{workflow_identifier}/unarchive

Unarchive Workflow

200

Successful Response

workflow
*Workflow|null

Workflow of the workflow registration

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.unarchiveWorkflow({
    workflowIdentifier: "<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.unarchive_workflow(workflow_identifier="<value>")

    # Handle response
    print(res)

curl https://api.mistral.ai/v1/workflows/{workflow_identifier}/unarchive \
 -X PUT \
 -H 'Authorization: Bearer YOUR_APIKEY_HERE' \
 -H 'Content-Type: application/json'

200

{
  "workflow": null
}