---
title: "Commit a prompt version"
method: POST
path: "/api/prompts/{prompt_id}/commits/"
tags: ["prompts"]
---

# Commit a prompt version

`POST /api/prompts/{prompt_id}/commits/`

Commit the current draft version. This creates a readonly snapshot and advances the draft workflow.

## Path parameters

- `prompt_id` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `description` string — Optional commit message describing the changes.

## Response `201`

Committed version created.

- PromptsCommitPromptVersionResponse201
  - `id` string
  - `prompt_version_id` string
  - `version` integer
  - `description` string, nullable
  - `messages` object[]
  - `model` string
  - `readonly` boolean
  - `is_deployed` boolean
  - `edited_by` ApiPromptsPromptIdCommitsPostResponsesContentApplicationJsonSchemaEditedBy
    - `id` integer
    - `email` string
    - `first_name` string
    - `last_name` string
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400` — Bad Request
- `401` — Unauthorized - Missing/invalid authentication
- `404` — Prompt not found

## Changes

- **2026-08-13** `4e064cf81dae` — 1 breaking, 27 warning, 4 info
  - removed the success response with the status `200`
  - removed the request property `created_at`
  - removed the request property `edited_by`
  - removed the request property `fallback_models`
  - …28 more
- **2026-07-31** `c26d550029f8` — 2 breaking, 30 info
  - added the new required request property `prompt`
  - removed the success response with the status `201`
  - added the new optional request property `created_at`
  - added the new optional request property `edited_by`
  - …28 more

[Change history](https://skmtc.dev/keywordsai/apis/api-reference/changes/api/prompts/:prompt_id/commits/post.md)

---

[API](https://skmtc.dev/keywordsai/apis/api-reference.md) · [All operations](https://skmtc.dev/keywordsai/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/keywordsai/api-reference/revisions/c61efaf24756/schema)
