llm_prompts

patch/api/projects/{project_id}/llm_prompts/name/{prompt_name}/

Request

  • Base URL: https://us.posthog.com
  • URL: https://us.posthog.com/api/projects/{project_id}/llm_prompts/name/{prompt_name}/
  • Auth: HTTP bearer

Path parameters

project_idstring required

Project ID of the project you're trying to access. To find the ID of the project, make a call to /api/projects/.

prompt_namestring required

Request body

promptunknown
configobject nullable

JSON object with model parameters or any agent configuration to store with this version. If omitted, the current version's config is carried forward; pass null to clear it. Can be combined with either prompt or edits. Don't store secrets here: config is returned to anyone who can read the prompt.

base_versioninteger

Latest version you are editing from. Used for optimistic concurrency checks.

version_descriptionstring

Optional note describing what changed in this version. Shown in the version history.

Response

idstring uuid required
namestring required

Unique prompt name using letters, numbers, hyphens, and underscores only.

promptunknown required
configobject nullable

Optional JSON object with model parameters or any agent configuration (e.g. model, temperature, tools). Versioned with the prompt and returned as-is when fetching it. Don't store secrets here: config is returned to anyone who can read the prompt.

versioninteger required
version_descriptionstring nullable

Optional note describing what changed in this version. Set when the version is published.

created_atstring date-time required
updated_atstring date-time required
deletedboolean required
is_latestboolean required
latest_versioninteger required
version_countinteger required
first_version_created_atstring required
labelsstring[] required

Names of the labels currently pointing at this version.

activity_item_idstring required

Key for this prompt's rows in the activity log, e.g. for the History tab. Derived from the name, at most 72 characters.

Changes

No recorded changes to this operation across all 1 revision of this API.