---
title: "Create Prompt Version Agent Scoped"
method: POST
path: "/v1/agents/{agent_id}/prompts/versions"
tags: ["Prompts"]
---

# Create Prompt Version Agent Scoped

`POST /v1/agents/{agent_id}/prompts/versions`

create a new prompt version under /agents/{agent_id}/prompts/versions.

## Path parameters

- `agent_id` integer, required

## Headers

- `X-API-Key` string, required

## Request body

- CreatePromptVersionBody — body for agent-scoped create version endpoint (agent_id in path).
  - `prompt_text` string, required
  - `commit_message` string, nullable
  - `labels` string[], nullable
  - `metadata` object, nullable

## Response `200`

Successful Response

- PromptResponse — response model for prompt without created_at.
  - `id` string, uuid, nullable — the id of the prompt
  - `prompt_text` string, required — the prompt content
  - `commit_message` string, nullable
  - `labels` string[], nullable — labels associated with the prompt
  - `metadata` object, nullable — arbitrary JSON metadata
  - `version` integer, required — the version number of the prompt
  - `agent_id` integer, required — id of the agent that owns this prompt

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/getbluejay/apis/bluejay-api.md) · [All operations](https://skmtc.net/getbluejay/apis/bluejay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getbluejay/bluejay-api/revisions/b5daa886f4ee/schema)
