Prompts

Update a user prompt

PUT
/api/prompts/{promptId}

Updates editable fields on a prompt the caller owns. Prompt text, name, description, temperature/responseTime, tools and toolConfigs are mutable here; versioning is handled separately via the /versions endpoints.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

promptId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/api/prompts/string" \  -H "Content-Type: application/json" \  -d '{    "name": "Leasing follow-up assistant (v2)",    "prompt": "<prompt><role>Leasing assistant</role><goal>Be friendly, concise, and confirm next steps.</goal></prompt>",    "description": "Refined tone; clearer next-step CTA.",    "temperature": 0.6,    "responseTime": 30,    "tools": [      {        "name": "book_tour"      }    ],    "toolConfigs": {      "book_tour": {        "requireApproval": true      }    }  }'
{  "message": "Prompt updated successfully",  "prompt": {    "_id": "64d2f9c5e8a1d4e001a0b1c2",    "name": "Maple Court - Tour confirm",    "prompt": "<prompt>updated body</prompt>",    "temperature": 0.4,    "lastEditedAt": "2026-05-20T15:04:01.135Z"  },  "versionSnapshot": {    "_id": "64d2f9c5e8a1d4e001a0b1d8",    "version": 6,    "displayVersion": "v1.5",    "createdAt": "2026-05-20T15:04:01.135Z"  }}