v1

latestOpenAPI 3.1.02026-07-2295105298.6 KB
Basics

Update Prompt

Updates a prompt's metadata (text, type, volume, topic, geography, locations). Only the supplied fields change. Returns a before/after snapshot.

A prompt's text (prompt) can only be changed while the prompt has not streamed any responses yet. Once it has responses, sending a changed prompt returns 400 — delete the prompt and create a new one instead. All other fields (type, volume, topic, geography, locations) remain editable at any time, and re-sending the existing text unchanged is always allowed.

patch/api/v1/prompts/{prompt_id}

Path parameters

prompt_idstring uuid required

The prompt to update.

Request body

website_idstring uuid required

Website that owns the prompt.

promptstring

New prompt text. Trimmed; blank is rejected. Editable only while the prompt has no responses yet — changing it after responses have streamed returns 400. Re-sending the current text unchanged (e.g. in a full-object PATCH) is always allowed, as are metadata-only edits.

type'discovery' | 'high_intent' nullable
volumestring nullable
topic_idstring uuid nullable
countriesstring[]
primary_countrystring nullable

When countries is non-empty it must be one of them.

location_idsstring[]

Response

Prompt updated

idstring uuid
textstring
typestring nullable
volumestring nullable
topic_idstring nullable
countriesstring[]