---
title: "Save a new version"
method: POST
path: "/prompts/{prompt_id}"
tags: ["Prompts"]
---

# Save a new version

`POST /prompts/{prompt_id}`

## Request

- Base URL: `https://api.openscale.so/v1`
- URL: `https://api.openscale.so/v1/prompts/{prompt_id}`
- Auth: HTTP bearer

Save the body (as in Create a prompt) as the next version; earlier versions stay as they were. `name` renames the prompt.

## Request body

- object
  - `name` string
  - `instructions` string
  - `input` unknown
  - `model` string
  - `tools` object[]
  - `tool_choice` unknown
  - `text` object
  - `reasoning` object
  - `temperature` number
  - `top_p` number
  - `max_output_tokens` integer
  - `parallel_tool_calls` boolean
  - `truncation` 'auto' | 'disabled'

## Response `200`

The new version.

- object
  - `id` string, required
  - `object` 'prompt', required
  - `name` string, nullable
  - `version` string, required
  - `latest_version` string, required
  - `variables` string[], required
  - `created_at` integer
  - `version_created_at` integer

## Other responses

- `404`: No prompt with this id.

---

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