---
title: "Set script evals active"
method: POST
path: "/api/scripts/{handle}/{host}/{slug}/evals/active"
---

# Set script evals active

`POST /api/scripts/{handle}/{host}/{slug}/evals/active`

## Request

- Base URL: `https://reduck.ai`
- URL: `https://reduck.ai/api/scripts/{handle}/{host}/{slug}/evals/active`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

Switch evals on or off. An inactive eval is kept with its history, but it is not run and does not gate a promote.

## Path parameters

- `handle` string, required: The owner a resource is addressed under: "@username" for a personal scope, or a bare slug for a project.
- `host` string, required: The site the script automates, as a hostname.
- `slug` string, required: The script's unique identifier within its host, unique per owner.

## Request body

- object
  - `eval_ids` string[], required
  - `active` boolean, required

## Response `200`

OK

- object
  - `data` ScriptEval[], required
    - `id` string, required
    - `args` Recordstringunknown, required
    - `browser` 'extension' | 'managed', required
    - `region` string, required
    - `country` string, required
    - `validation_code` string, nullable, required
    - `note` string, nullable, required
    - `active` boolean, required: An inactive eval is kept but not run, and does not gate a promote.
    - `created_at` string, required
    - `latest` EvalVerdict, required
      - `run_id` string, required
      - `version_id` string, nullable, required: The version the run executed; null once that version was deleted.
      - `status` union, required
        - 'infra' | 'pass' | 'script' | 'validation'
        - 'pending'
      - `detail` string, nullable, required: Why the status is not `pass`.
      - `created_at` string, required
    - `args_error` string, nullable: Only when the list was asked for a `version_id` of this script: why the input schema of that version refuses the args of this eval, or null when it takes them. A version is not promoted while an active eval has one.

## Other responses

- `400`: Invalid request
- `401`: Not authenticated
- `403`: You may not edit this script.
- `404`: An id is not an eval of this script.

---

[API](https://skmtc.dev/reduck/apis/reduck-api.md) · [All operations](https://skmtc.dev/reduck/apis/reduck-api/llms.txt) · [OpenAPI document](https://skmtc.dev/reduck/apis/reduck-api/revisions/a573b91206d6?raw)
