Create a prompt
/v1/promptsCreate a prompt.
Creates an empty prompt (no versions yet) in a workspace and returns it with its slug. Add versions with POST /v1/prompts/{slug/versions}. Requires an organization admin, or an admin of the workspace in workspace_id.
Errors: 402 when the plan's prompt limit for the workspace is reached; 403 without access; 409 when the organization already has a prompt with this name.
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.
Request body application/json
the prompt to create
namestringrequiredDisplay name (required), unique within the organization (409 otherwise). The slug is derived from it.
organizationstringrequiredSlug of the organization that will own the prompt (required).
workspace_idstring<uuid>requiredId (UUID) of the workspace the prompt belongs to (required). It must belong to the organization.
descriptionstringFree-text description. Optional.
Responses
Created
idstringThe prompt's unique id (UUID).
slugstringThe prompt's identifier in URLs and in the
x-prompt-slugheader. Generated at creation from the name (lower case, every run of other characters as one dash, at most 40 characters) plus a dash and 8 random hex characters, for examplesupport-reply-3f9a1c2b. It never changes.namestringDisplay name, unique within the organization.
descriptionstringFree-text description. Null when none is set.
organizationstringSlug of the organization that owns the prompt.
workspace_idstring<uuid>Id (UUID) of the workspace the prompt belongs to.
created_atstring<date-time>When the prompt was created (ISO 8601).
updated_atstring<date-time>When the prompt was created or its name or description last changed (ISO 8601). Saving versions does not change it.