---
title: "Update a decider"
method: PATCH
path: "/v1/projects/{project_id}/deciders/{decider_id}"
tags: ["Deciders"]
---

# Update a decider

`PATCH /v1/projects/{project_id}/deciders/{decider_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/deciders/{decider_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Updates any of `name`, `description`, the backend and `questions`. Naming `agent_id` or `tool_id` replaces the current backend; naming both is `400`. Only a change to `questions` archives a new version; a rename, a new backend or a rewrite of the questions the decider already holds leaves `version` where it is. A new backend is held to the same rules as on create.

## Path parameters

- `decider_id` string, required

## Headers

- `If-Match` string

## Request body

- UpdateDeciderRequest
  - `name` string
  - `description` string, nullable
  - `agent_id` string: Replaces the backend with this agent
  - `tool_id` string: Replaces the backend with this tool
  - `questions` DeciderQuestion[]: The questions, in the order the model is shown them.
    - `type` 'predicate' | 'choice' | 'score', required
    - `name` string, required: Names the question's answer. Unique within the set; starts with a letter or underscore and holds only letters, digits and underscores (at most 64).
    - `instructions` string, required: What to judge
    - `choices` DeciderChoice[]: A `choice` question's options; required for `choice` only
      - `value` string, required: What a `choice` answer carries; unique within the question
      - `description` string, required
    - `levels` DeciderLevel[]: A `score` question's ordered levels; required for `score` only
      - `label` string, required
      - `description` string, required
  - `version_label` string: Optional tag for the version this write archives. Ignored when the write changes no question, since no version is archived.
  - `expected_version` integer, nullable: The version the caller believes the resource holds. When the resource is at any other version the write is refused with `409 VERSION_CONFLICT` and nothing is written; `meta.current_version` on that response names the version in force. Omit it to write unconditionally. Omitting it does not make the write unordered: two writes that reach the server together are still serialized, and the one whose version was taken first is refused the same way. What the field adds is refusing a write whose author read the resource some time ago and has not seen what happened since. The `If-Match` header carries the same precondition for a client that prefers the HTTP spelling. Sending both with different versions is `400 VALIDATION_FAILED`.

## Response `200`

Decider updated

- Decider
  - `id` string
  - `project_id` string
  - `name` string
  - `description` string, nullable
  - `agent_id` string, nullable: The tool-less agent that answers; null when a tool does
  - `tool_id` string, nullable: The http or pipeline tool that answers; null when an agent does
  - `version` integer: The question set's version. Bumped only by a write that changes `questions`.
  - `questions` DeciderQuestion[]: The questions, in the order the model is shown them.
    - `type` 'predicate' | 'choice' | 'score', required
    - `name` string, required: Names the question's answer. Unique within the set; starts with a letter or underscore and holds only letters, digits and underscores (at most 64).
    - `instructions` string, required: What to judge
    - `choices` DeciderChoice[]: A `choice` question's options; required for `choice` only
      - `value` string, required: What a `choice` answer carries; unique within the question
      - `description` string, required
    - `levels` DeciderLevel[]: A `score` question's ordered levels; required for `score` only
      - `label` string, required
      - `description` string, required
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Bad request — invalid questions, an unknown or tool-bearing agent
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Decider not found
- `409`: The resource has moved past the version this write read (`VERSION_CONFLICT`): a stated `expected_version` or `If-Match` no longer matches, or a concurrent write took the version first. `meta.current_version` names the version in force. Nothing is written.

---

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