Skip to main content

Delete Prompt Version

Endpoint: DELETE /api/prompts/{name}/versions/{version}

Deletes a specific version of a prompt. If it is the last remaining version, all associated tags and access control entries are also removed.

To delete all versions, use DELETE /api/prompts/{name}.

Path parameters

ParameterDescriptionTypeRequired/ Optional
nameThe name of the prompt to delete.stringRequired.
versionThe version of the prompt to delete.integerRequired.

Response

  • Returns 200 OK with no response body on success.
  • Returns 401 if authentication is required.
  • Returns 403 if the caller does not have DELETE permission on the prompt.

Examples

Delete a specific prompt version

Request

curl -X 'DELETE' \
'https://<YOUR-SERVER-URL>/api/prompts/population-prompt/versions/2' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'

Response

Returns 200 OK, indicating that the specific prompt version was deleted successfully.