Tree BG 1
Tree
Tree
TreeLeaves
TreeLeaves
Cat IdleGrassGrassRockRock

Workflows

API Workflows.

Obtenir les Workflows

GET /v1/workflows#

Obtenir les workflows

200

Réponse réussie

next_cursor#
*string|null

Une liste de workflows

Playground

Testez les endpoints en direct

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"
    }
  ]
}

Obtenir les inscriptions de workflow

GET /v1/workflows/registrations#

Obtenir les enregistrements de workflow

200

Réponse réussie

next_cursor#
*string|null
workflow_registrations#
*array<WorkflowRegistration>

Une liste d'enregistrements de workflows

workflow_versions#
*array<WorkflowRegistration>

Une liste d'enregistrements de workflows

Playground

Testez les endpoints en direct

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"
    }
  ]
}

Exécuter un workflow

POST /v1/workflows/{workflow_identifier}/execute#

Exécuter un workflow

200

Réponse réussie

WorkflowExecutionResponse#

{object}

WorkflowExecutionSyncResponse#

{object}

Playground

Testez les endpoints en direct

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"
}

Exécuter l'inscription de workflow

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

Exécuter un enregistrement de workflow

200

Réponse réussie

WorkflowExecutionResponse#

{object}

WorkflowExecutionSyncResponse#

{object}

Playground

Testez les endpoints en direct

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"
}

Obtenir un workflow

GET /v1/workflows/{workflow_identifier}#

Obtenir un workflow

200

Réponse réussie

Playground

Testez les endpoints en direct

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"
  }
}

Mettre à jour un workflow

PUT /v1/workflows/{workflow_identifier}#

Mettre à jour un workflow

200

Réponse réussie

workflow#
*Workflow|null

Workflow de l'enregistrement du workflow

Playground

Testez les endpoints en direct

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
}

Obtenir l'inscription de workflow

GET /v1/workflows/registrations/{workflow_registration_id}#

Obtenir un enregistrement de workflow

200

Réponse réussie

Playground

Testez les endpoints en direct

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"
  }
}

Archivage en masse des Workflows

PUT /v1/workflows/archive#

Archiver des workflows en masse

200

Réponse réussie

archived#
*array<Workflow|null>

Workflows qui ont été archivés avec succès ou étaient déjà archivés

Workflows qui n'ont pas pu être archivés et les messages d'erreur correspondants

Playground

Testez les endpoints en direct

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
  ]
}

Désarchiver des workflows en masse

PUT /v1/workflows/unarchive#

Désarchiver des workflows en masse

200

Réponse réussie

Workflows qui n'ont pas pu être archivés et les messages d'erreur correspondants

unarchived#
*array<Workflow|null>

Workflows qui ont été archivés avec succès ou étaient déjà archivés

Playground

Testez les endpoints en direct

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
  ]
}

Archiver un workflow

PUT /v1/workflows/{workflow_identifier}/archive#

Archiver un workflow

200

Réponse réussie

workflow#
*Workflow|null

Workflow de l'enregistrement du workflow

Playground

Testez les endpoints en direct

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
}

Désarchiver un workflow

PUT /v1/workflows/{workflow_identifier}/unarchive#

Désarchiver un workflow

200

Réponse réussie

workflow#
*Workflow|null

Workflow de l'enregistrement du workflow

Playground

Testez les endpoints en direct

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
}