Skip to main content
POST
Create prompt

Authorizations

Authorization
string
header
required

Use a JWT bearer token or a Veryfront API key in the Authorization header.

Path Parameters

project_reference
string
required

Project slug, UUID, or domain that identifies the project.

Query Parameters

source_target_kind
string

Where to write the prompt file: project (the default) or preview_branch. Other values are rejected.

target_branch_id
string<uuid> | null

Preview branch to use. Required for the preview_branch target; rejected for any other target.

Body

application/json
id
string
required

Prompt id, also the name of its source file.

Required string length: 1 - 128
Pattern: ^[a-z0-9][a-z0-9-]*$
content
string
required

Prompt text.

Minimum string length: 1
description
string | null

Prompt description. Omit it or send null for none.

source
string

Complete prompt source file. It must export a structured prompt whose id matches id; when omitted the file is generated from description and content.

Minimum string length: 1

Response

Created prompt document

id
string
required
name
string
required
description
string | null
required
content
string | null
required
source_path
string
required
source
string
required
edit_mode
enum<string>
required
Available options:
structured,
source_only
source_only_reasons
string[]
required