Prompts

Commit a prompt version

Changed on

Commits the current draft as a read-only version. No new draft is created; create a version to keep editing.

post/api/prompts/{prompt_id}/commits/

Request

  • Base URL
    https://api.respan.ai
  • URL
    https://api.respan.ai/api/prompts/{prompt_id}/commits/
  • Auth
    • HTTP bearer
    • or HTTP bearer

Path parameters

prompt_idstring required

The unique prompt identifier.

Request body

descriptionstring

Optional commit message describing the changes.

Example request

{
  "description": "Improved tone and added error handling"
}

Response

Committed version created.

idstring
prompt_version_idstring
versioninteger
descriptionstring nullable
messagesobject[]
modelstring
readonlyboolean
created_atstring date-time
updated_atstring date-time

Example response

{
  "id": "pv_abc123",
  "prompt_version_id": "pv_abc123",
  "version": 3,
  "description": "Improved system prompt for better context handling",
  "messages": [
    {
      "role": "system",
      "content": "You are a helpful assistant. Context: {{context}}"
    }
  ],
  "model": "gpt-4o",
  "readonly": true,
  "is_deployed": false,
  "edited_by": {
    "id": 123,
    "email": "user@example.com",
    "first_name": "John",
    "last_name": "Doe"
  },
  "created_at": "2026-02-27T10:00:00Z",
  "updated_at": "2026-02-27T10:00:00Z"
}

Changes

    • breaking

      the response property became nullable for the status

    • info

      api operation id prompts_commitPromptVersion removed and replaced with commitPromptVersion

    • info

      the endpoint scheme security DashboardJwt was added to the API

    • info

      api tag Prompts added

    • info

      api tag prompts removed

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • warning

      removed the optional property from the response with the status

    • info

      added the non-success response with the status

    • info

      removed the non-success response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status