---
title: "Rewrite a saved prompt"
method: PATCH
path: "/assistant/prompts/{prompt_id}/"
tags: ["assistant-prompt"]
---

# Rewrite a saved prompt

`PATCH /assistant/prompts/{prompt_id}/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/assistant/prompts/{prompt_id}/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

## Path parameters

- `prompt_id` string, uuid, required

## Request body

- AssistantPromptUpdateSchema: Rewrite one of this workspace's own prompts.
  - `body` string, required: The message pressing the card puts in the composer.
  - `title` string, required: What the card is called.

## Response `200`

Successful Response

- AssistantPromptReadSchema: One prompt offered under the assistant's composer.
  - `body` string, required: The message pressing the card puts in the composer.
  - `built_in` boolean, required: Whether we wrote it. A built-in cannot be edited or deleted.
  - `created_at` string, date-time, nullable
  - `id` string, uuid, nullable: Null for a built-in prompt, which is defined in our code rather than saved.
  - `key` string, required: Stable identifier for this card across both kinds: the built-in's key, or the saved prompt's id.
  - `title` string, required: What the card is called.
  - `updated_at` string, date-time, nullable

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: No such prompt.
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
