Skip to main content
PUT
/
prompts
/
{id}
cURL
curl --request PUT \
  --url https://www.greenflash.ai/api/v1/prompts/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Updated Customer Support Prompt",
  "description": "Updated description",
  "components": [
    {
      "content": "You are a helpful assistant for {{productName}}. Always be polite to {{userName}}.",
      "type": "system",
      "source": "customer",
      "name": "Base Instructions V2"
    }
  ]
}
'
{
  "promptId": "123e4567-e89b-12d3-a456-426614174004",
  "versionId": "123e4567-e89b-12d3-a456-426614174005"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

The prompt ID to update

Body

application/json
name
string

Updated prompt name.

description
string

Updated prompt description.

role
string

Role key in the product mapping.

source
enum<string>
default:customer

Prompt source.

Available options:
customer,
participant,
greenflash,
agent
components
object[]

Updated components (if provided, creates new immutable prompt and version).

Response

Prompt updated successfully

promptId
string<uuid>
required

The updated prompt ID.

versionId
string<uuid> | null
required

The version ID. Version is created/updated but not activated (activation happens via UI). Null if only prompt metadata was updated without components.

externalPromptId
string

The external prompt ID.