Skip to main content
PUT
/
api
/
v1
/
preprompts
/
{id}
Update a pre-prompt
curl --request PUT \
  --url https://handauncle-backend-prod-205012263523.asia-south1.run.app/api/v1/preprompts/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "publicValue": "<string>",
  "maskedValue": "<string>",
  "description": "<string>",
  "tags": [
    "<string>"
  ]
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "key": "<string>",
    "publicValue": "<string>",
    "maskedValue": "<string>",
    "isDeleted": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "description": "<string>",
    "tags": [
      "<string>"
    ]
  },
  "meta": {
    "timestamp": "2023-11-07T05:31:56Z",
    "requestId": "<string>"
  }
}
Modify any combination of key, publicValue, maskedValue, description, or tags for an existing pre-prompt. Authenticate with BACKEND_SECRET headers.

Request Body

All fields are optional. Only include the fields you want to update.
FieldTypeDescription
keystringUnique identifier (2-64 chars)
publicValuestringUser-facing label (1-512 chars)
maskedValuestringHidden prompt (1-4000 chars)
descriptionstringOptional description
tagsstring[]Optional tags array

Headers

X-Backend-Secret
string

Backend secret token required for admin-only endpoints. Provide either this header or Authorization: Bearer <secret>.

Path Parameters

id
string
required

PrePrompt identifier (UUID).

Required string length: 8 - 64

Body

application/json
key
string
Required string length: 2 - 64
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_-]{1,63}$
publicValue
string
Required string length: 1 - 512
maskedValue
string
Required string length: 1 - 4000
description
string | null
Maximum string length: 500
tags
string[] | null
Maximum array length: 16
Maximum string length: 50

Response

PrePrompt updated.

success
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required