---
title: "Function Conditional Rollback"
method: POST
path: "/functions/{function_id}/rollback/conditional"
tags: ["functions"]
---

# Function Conditional Rollback

`POST /functions/{function_id}/rollback/conditional`

## Request

- Base URL: `https://api.notte.cc` (the document declares no server; this is the origin it was published from)
- URL: `https://api.notte.cc/functions/{function_id}/rollback/conditional`
- Auth: OAuth 2
  - Password
  - Token URL: `token`

## Path parameters

- `function_id` string, required

## Query parameters

- `restricted` boolean: Whether to restrict the function code

## Headers

- `x-notte-request-origin` string, nullable
- `x-notte-sdk-version` string, nullable

## Request body

- ConditionalFunctionRollbackRequest
  - `version` string, required: A version from the function's `versions` history to restore
  - `expected_current_version` string, required: Restore only if the function still serves this version at the final atomic update

## Response `200`

Successful Response

- FunctionResponse
  - `default_runtime` 'standard' | 'extended'
  - `sdk_generation` 'v19' | 'v110'
  - `upload_sdk_version` string, nullable
  - `function_id` string, required: The ID of the function
  - `variables` ParameterInfo[], nullable: The variables to run the function with
    - `name` string, required
    - `type` string, nullable
    - `default` string, nullable
  - `created_at` string, date-time, required: The creation time of the function
  - `updated_at` string, date-time, required: The last update time of the function
  - `latest_version` string, required: The version of the function
  - `versions` string[], required: The versions of the function
  - `status` string, required: The status of the function
  - `name` string, nullable: The name of the function
  - `description` string, nullable: The description of the function
  - `shared` boolean: Whether the function is public and can beshared with other users
  - `reference_workflow_id` string, nullable: The ID of the reference function (i.e whether the function was forked from another function or not)
  - `published` boolean
  - `required_secrets` string[]
  - `source` string, nullable: Where the function was created from, stamped at creation. Read-only.
  - `self_healing` boolean: Whether the build is finished and the function may be healed automatically. Can only be enabled on a function that has a thread for self-heal to resume.
  - `domain` string, nullable: The site this function drives, used to group endpoints in the console. Null when the function never named a site.
  - `instructions` string, nullable: Builder's operating notes: typical run duration, known failure modes, which parameters matter.
  - `response_format` object, nullable: JSON Schema of the value run() returns, or null when the author never documented one.
  - `schedule_cron` string, nullable: Cron expression the function runs on, or null if it is not scheduled.
  - `schedule_variables` object, nullable: Variables passed to each scheduled run, or null if it is not scheduled.
  - `schedule_state` 'enabled' | 'paused', nullable: 'enabled' while the schedule fires, 'paused' once the backend disabled it after a deterministic failure (exhausted credit, or an inactive function), null when there is no schedule.
  - `workflow_id` string, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-29** `205fbca32e48`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/notte/apis/notte-api/changes/functions/:function_id/rollback/conditional/post.md)

---

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