# Update Prompt

> Create a new version of an existing prompt

`POST https://api.helicone.ai/v1/prompt-2025/update`

Creates a new version of an existing prompt with updated content. Can create either a major or minor version.

### Request Body

<ParamField body="promptId" type="string" required>
  The unique identifier of the prompt to update
</ParamField>

<ParamField body="promptVersionId" type="string" required>
  The unique identifier of the current prompt version to base the update on
</ParamField>

<ParamField body="newMajorVersion" type="boolean" required>
  Whether to create a new major version (true) or minor version (false)
</ParamField>

<ParamField body="environment" type="string">
  Optional environment to set for this new version (e.g., "production", "staging", "development")
</ParamField>

<ParamField body="commitMessage" type="string" required>
  A description of the changes made in this version
</ParamField>

<ParamField body="promptBody" type="OpenAIChatRequest" required>
  The updated prompt body following OpenAI chat completion format
</ParamField>

### Response

<ResponseField name="id" type="string">
  Unique identifier of the new prompt version
</ResponseField>
