---
title: "Update a prompt"
method: PATCH
path: "/api/mcp/projects/{projectId}/prompts/{promptId}"
tags: ["Prompts"]
---

# Update a prompt

`PATCH /api/mcp/projects/{projectId}/prompts/{promptId}`

## Request

- Base URL: `https://app.searchable.com`
- URL: `https://app.searchable.com/api/mcp/projects/{projectId}/prompts/{promptId}`
- Auth: HTTP bearer

Edit a prompt's wording, intent, branded flag, or keyword metrics. Does NOT archive or restore it — use `POST .../tracking` for that. Requires the `prompt:draft` capability. `If-Match` (e.g. `"3"`) is the optimistic-concurrency guard: a stale value returns 409 `stale_revision`. A pitch project that is not currently active also refuses with 409 `INACTIVE_PITCH_PROMPT_MUTATION`. Supports `Idempotency-Key` replay; a reused key with a different body returns 409 `idempotency_conflict`.

## Path parameters

- `projectId` string, uuid, required
- `promptId` string, uuid, required

## Headers

- `If-Match` string
- `Idempotency-Key` string

## Request body

- UpdatePromptRequest
  - `text` string
  - `intentCategory` 'informational' | 'commercial' | 'transactional' | 'navigational' | 'post_purchase'
  - `isBranded` boolean
  - `keywordSearchVolume` number
  - `keywordDifficulty` number

## Response `200`

Prompt updated.

- PromptMutationResponse
  - `prompt` PromptRecord, required: The curated prompt shape update_prompt, the tracking endpoint, and restore_prompt_wording all return — never the raw internal row (no userId, workspaceId, or textEmbedding).
    - `id` string, uuid, required
    - `projectId` string, uuid, nullable
    - `text` string, required
    - `intentCategory` string, nullable: informational | commercial | transactional | navigational | post_purchase, or null when unclassified.
    - `promptType` string, nullable
    - `isBranded` boolean, nullable
    - `isTracked` boolean, nullable
    - `keywordSearchVolume` integer, nullable
    - `keywordDifficulty` integer, nullable
    - `currentRevision` integer, required: Optimistic-concurrency counter — pass as `If-Match` (PATCH) or `expectedRevision` on the next write to detect a concurrent change.
    - `createdAt` string, date-time, nullable
    - `updatedAt` string, date-time, nullable
  - `success` boolean, required

## Other responses

- `400`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `401`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `403`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `404`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `409`: Another request with the same `Idempotency-Key` is still executing. `Retry-After` (5 seconds) is always present — retry with the SAME key once it elapses.
- `429`: Rate limited. Usually the per-API-key REST limit (600 requests/minute); on Google-backed endpoints it can also relay an upstream Google rate limit. `Retry-After` (seconds) is present when the limit was applied by Searchable's own rate limiter; it may be absent when an upstream provider rate-limits.

## Changes

- **2026-11-03** `28a5e2a65cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/searchable/apis/searchable-rest-api/changes/api/mcp/projects/:projectId/prompts/:promptId/patch.md)

---

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