Set a prompt label
/v1/prompts/{slug}/labels/{label}Set a prompt label.
Points the label at a version, creating the label or moving it from the version it pointed at. A request picks a labelled version with version_ref: "@label"; the production label decides the default version. Requires an admin of the prompt's workspace, or an organization admin.
Errors: 404 when the prompt or version does not exist; 409 when the version is not PUBLISHED.
Authorization
AuthorizationBearer va_A platform API key (
va_...), created under Settings > API keys. Scoped to an organization or one workspace, with an admin or member role. Used by the management API.
Path parameters
slugstringrequiredthe prompt's slug
labelstringrequiredthe label's name, for example
productionorstaging
Query parameters
organizationstringrequiredslug of the organization that owns it
Request body application/json
the version to point at
version_numberinteger<int32>requiredThe version to point the label at (required). It must be the prompt's PUBLISHED version (409 otherwise).
Responses
prompt_idstringId (UUID) of the prompt.
labelstringThe label's name.
version_numberinteger<int32>The version the label points at.
organizationstringSlug of the organization that owns the prompt.
updated_atstring<date-time>Not filled in by the current API: always null.