---
title: "Create Prompt"
method: POST
path: "/admin/api/v1/prompts"
tags: ["Agent Configuration"]
---

# Create Prompt

`POST /admin/api/v1/prompts`

Create a new prompt version.

First write for a given ``promptId`` is version 1. Subsequent POSTs
with the same ``promptId`` allocate the next version. The whole
SELECT MAX + INSERT runs under ``_reload_mutex`` so concurrent
admin POSTs serialize.

## Request body

- StandalonePromptCreate — Body for POST /admin/api/v1/prompts. Creating a prompt with an existing ``prompt_id`` creates a new version at the DB layer (Phase 4+); the schema does not enforce uniqueness.
  - `promptId` string, required
  - `content` string, required
  - `tags` string[]

## Response `201`

Successful Response

- StandaloneMutationResponseStandalonePromptRead
  - `data` StandalonePromptRead, required — GET response and the data payload of POST/PATCH/DELETE responses.
    - `id` string, uuid, required
    - `promptId` string, required
    - `version` integer, required
    - `content` string, required
    - `tags` string[], required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `reload` StandaloneReloadResult, required — Reload outcome attached to every admin mutation response. ``reloaded`` means DB committed and runtime now uses the new config. ``restart_required`` means DB committed and process restart is needed. ``reload_failed`` means DB rolled back and runtime is unchanged.
    - `status` 'reloaded' | 'restart_required' | 'reload_failed', required — Outcome of a reload triggered by an admin mutation.
    - `message` string, required
    - `error` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/idun-group/apis/idun-agent-engine-server.md) · [All operations](https://skmtc.net/idun-group/apis/idun-agent-engine-server/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/idun-group/idun-agent-engine-server/versions/8909cd73cc1c/schema)
