---
title: "Update a prompt"
method: PATCH
path: "/api/prompts/{prompt_id}/"
tags: ["Prompts"]
---

# Update a prompt

`PATCH /api/prompts/{prompt_id}/`

## Request

- Base URL: `https://api.respan.ai`
- URL: `https://api.respan.ai/api/prompts/{prompt_id}/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Update prompt metadata such as its name or description.

## Path parameters

- `prompt_id` string, required

## Request body

- object
  - `name` string: Updated prompt name.
  - `description` string: Updated prompt description.

## Response `200`

Prompt updated successfully.

- object
  - `id` string
  - `name` string
  - `description` string, nullable

## Other responses

- `400`: Bad Request
- `403`: The API key is missing, invalid or expired.
- `404`: Prompt not found

## Changes

- **2026-10-21** `c30bcb383ee8`: 2 breaking, 4 info
  - request body became required
  - the response property `description` became nullable for the status `200`
  - api operation id `prompts_updatePrompt` removed and replaced with `updatePrompt`
  - the endpoint scheme security `DashboardJwt` was added to the API
  - …2 more
- **2026-10-02** `b830b79cfd52`: 2 warning, 3 info
  - removed the optional property `error` from the response with the `404` status
  - removed the optional property `updated_at` from the response with the `200` status
  - added the non-success response with the status `403`
  - removed the non-success response with the status `401`
  - …1 more
- **2026-09-17** `6fa8242da8c2`: 1 warning, 1 info
  - deleted the `header` request parameter `Authorization`
  - the endpoint scheme security `RespanApiKey` was added to the API
- **2026-09-12** `22b868ef3f22`: 1 info
  - api operation id `update-prompt` removed and replaced with `prompts_updatePrompt`
- **2026-08-13** `4e064cf81dae`: 5 breaking, 15 warning, 4 info
  - the response property `description` became nullable for the status `200`
  - the response property `id` became optional for the status `200`
  - removed the required property `commit_count` from the response with the `200` status
  - removed the required property `organization` from the response with the `200` status
  - …20 more

[Operation history](https://skmtc.dev/keywordsai/apis/respan-api/changes/api/prompts/:prompt_id/patch.md)

---

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