---
title: "Update prompt"
method: PUT
path: "/api/users/prompts/{id}"
tags: ["users/prompts"]
---

# Update prompt

`PUT /api/users/prompts/{id}`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/users/prompts/{id}`
- Auth: `bearer` (a scheme the document does not define)

## Path parameters

- `id` string, required

## Request body

- UpdatePromptDto
  - `title` string: Prompt title
  - `description` string: Optional description
  - `template` string: Prompt template with {{variables}}

## Response `200`

- PromptResponseDto
  - `id` string, required
  - `userId` string, required
  - `title` string, required
  - `description` object
  - `template` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `401`: Unauthorized
- `404`: Prompt not found

---

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