Create a prompt version
POST /dashboard/prompts/
Creates a new prompt template version. The combination of name and version must be unique per user. Returns 409 if that version already exists for this prompt name.
Request body
Prompt name used to group versions together (e.g.
"classify-intent").Integer version number. Increment this with each iteration of the prompt.
The full prompt text at this version.
Optional human-readable description of what changed in this version.
Response — 201
UUID of the new prompt template record.
Prompt name.
Version number.
The full prompt text.
Description of this version.
Whether this version is active. Always
true on creation.ISO 8601 creation timestamp.
Example response
List all prompt versions
GET /dashboard/prompts/
Returns all prompt template versions for the authenticated user, ordered by name then version descending (newest version first within each name).
Response — 200
An array of prompt template objects. Each object has the same fields as the create response.List versions of a named prompt
GET /dashboard/prompts/{name}/versions
Returns all versions of a named prompt ordered newest-first. Returns 404 if no prompt with this name exists for the authenticated user.
Path parameters
The prompt name (e.g.
"classify-intent").Response — 200
An array of prompt template objects for this prompt name.Compare versions
GET /dashboard/prompts/{name}/compare
Returns per-version analytics for a named prompt. Metrics are computed from all traces linked to each version via the record usage endpoint. Returns 404 if the prompt name does not exist for the authenticated user.
Path parameters
The prompt name to compare versions for.
Response — 200
Prompt name.
Per-version analytics, one entry per version.
Example response
Record prompt usage
POST /dashboard/prompts/usage
Records that a specific trace used a prompt template version. Call this after a trace completes to link it to the prompt used. This link powers the per-version analytics in the compare endpoint. The call is idempotent — calling it multiple times with the same arguments is safe.
Request body
Name of the prompt template that was used.
Version number of the prompt that was used.
UUID of the trace that used this prompt version.
UUID of the specific span within the trace where this prompt was used. Optional but recommended for multi-prompt traces.
Response — 201
Always
"recorded" on success.