---
title: "Create a new cases job"
method: POST
path: "/cases/jobs"
tags: ["cases"]
---

# Create a new cases job

`POST /cases/jobs`

## Request body

- object
  - `case_template_id` string, required
  - `input_path` string, required — The input notebook path
  - `inputs` object[] — Parameter values the run is started with. When present, must cover the template's declared parameters exactly.
    - `value` string, required — The value written into the notebook.
    - `variable_name` string, required — Name of the template parameter.
  - `title` string, required — Human-readable name of the run. Empty only for runs created before the field existed.

## Response `201`

Succeeded

- object — A single case result.
  - `data` object, required
    - `case_template_id` string, required
    - `created_at` string, date-time, required
    - `error_message` string — Why result extraction failed (present only when status is failed)
    - `id` string, required
    - `inputs` object[], required — Parameter values the run was started with, in the order the template declares the parameters.
      - `definition` object, required
        - `choices` string[], required
        - `default_value` string, required
        - `description` string, required
        - `label` string, required
        - `max` number
        - `min` number
        - `unit` string
        - `value_type` 'number' | 'smiles' | 'string' | 'tuple' | 'array' | 'enum', required
        - `variable_name` string, required
      - `value` string, required — The value the run used, as written into the notebook
    - `outputs` object[], required — Values the run produced, in the order the template declares the outputs. Empty until the results are extracted.
      - `definition` object, required
        - `cell_index` integer
        - `description` string, required
        - `figure_index` integer
        - `name` string, required
        - `type` 'number' | 'image', required
        - `unit` string
        - `variable_name` string — Notebook variable the capture cell prints (type number; absent on rows stored before it was persisted)
      - `value` string, required — The value extracted from the executed notebook
    - `remotejob` object, required
      - `finished_at` string, date-time
      - `id` string, required
      - `input_path` string, required — Path to the input notebook
      - `output_path` string, required — Path to the output notebook
      - `started_at` string, date-time
      - `status` 'waiting' | 'initializing' | 'running' | 'completed' | 'failed' | 'oomkilled' | 'terminating' | 'canceled', required — Current status of the remote job executing the case
    - `status` 'pending' | 'succeeded' | 'failed' | 'canceled', required — Status of extracting results from the executed notebook, not of the job itself (that is remotejob.status). pending covers everything up to and including a finished job whose results are not extracted yet; canceled means the job was cancelled before it could produce results.
    - `title` string, required — Human-readable name of the run. Empty only for runs created before the field existed.
    - `updated_at` string, date-time, required
    - `validations` object[], required — Verdicts of the template's validations, in the order the template declares them. Empty until the results are extracted.
      - `definition` object, required
        - `cell_index` integer
        - `method` 'prompt', required
        - `name` string, required
        - `prompt` string, required
      - `reason` string, required — Why the validation reached that verdict. Empty when the run recorded no reason.
      - `result` boolean, required — Whether the validation passed

## Other responses

- `400` — Bad request
- `default` — Other error

---

[API](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api.md) · [All operations](https://skmtc.dev/matlantis/apis/matlantis-web-ui-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/matlantis/matlantis-web-ui-backend-api/revisions/b155f3a32673/schema)
