POST
/
v1
/
prompt-2025
/
update
curl -X POST "https://api.helicone.ai/v1/prompt-2025/update" \
  -H "Authorization: Bearer $HELICONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "promptId": "prompt_123",
    "promptVersionId": "version_456",
    "newMajorVersion": true,
    "setAsProduction": true,
    "commitMessage": "Updated system prompt for better customer interactions",
    "promptBody": {
      "model": "gpt-4",
      "messages": [
        {
          "role": "system",
          "content": "You are an expert customer support assistant with deep knowledge of our products."
        }
      ],
      "temperature": 0.7
    }
  }'
{
  "id": "version_789"
}
Creates a new version of an existing prompt with updated content. Can create either a major or minor version.

Request Body

promptId
string
required
The unique identifier of the prompt to update
promptVersionId
string
required
The unique identifier of the current prompt version to base the update on
newMajorVersion
boolean
required
Whether to create a new major version (true) or minor version (false)
setAsProduction
boolean
required
Whether to set this new version as the production version
commitMessage
string
required
A description of the changes made in this version
promptBody
OpenAIChatRequest
required
The updated prompt body following OpenAI chat completion format

Response

id
string
Unique identifier of the new prompt version
curl -X POST "https://api.helicone.ai/v1/prompt-2025/update" \
  -H "Authorization: Bearer $HELICONE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "promptId": "prompt_123",
    "promptVersionId": "version_456",
    "newMajorVersion": true,
    "setAsProduction": true,
    "commitMessage": "Updated system prompt for better customer interactions",
    "promptBody": {
      "model": "gpt-4",
      "messages": [
        {
          "role": "system",
          "content": "You are an expert customer support assistant with deep knowledge of our products."
        }
      ],
      "temperature": 0.7
    }
  }'
{
  "id": "version_789"
}