Update AI Prompt-Decorator Preset
Endpoint
PUT /apiops/settings/ai-prompt-decorator-presets/{presetName}/
Authentication
Requires a Personal API Access Token with admin privileges.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| presetName | string | Yes | Name of the preset to update. Must match the name in the body when that field is present. |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope the preset lives in. Omit for the admin/global scope. |
Request Body
{
"name": "support-tone",
"content": "Answer in a calm, professional tone, always offer a next step, and never promise a delivery date.",
"role": "system",
"position": "PREPEND",
"category": "tone",
"description": "House style for support assistants",
"enabled": true
}
The body carries the same fields as Create AI Prompt-Decorator Preset. The whole preset is replaced, so send every field you want to keep — an omitted optional field is cleared, not preserved.
Response
Success Response (200 OK)
{
"status": "SUCCESS"
}
Error Response (400 Bad Request)
Returned when the preset does not exist in the scope, the path and body names disagree, content is missing, role/position is invalid, the target is a built-in preset, or the caller lacks the ADMIN role.
{
"status": "FAILURE",
"resultMessage": "AI prompt-decorator preset (name: support-tone) was not found!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/settings/ai-prompt-decorator-presets/support-tone/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "Answer in a calm, professional tone, always offer a next step, and never promise a delivery date.",
"role": "system",
"position": "PREPEND",
"enabled": true
}'
Notes and Warnings
- Must Already Exist:
- Unlike
POST, this endpoint does not create a missing preset — it reports not-found instead
- Unlike
- Full Replacement:
- Optional fields left out of the body are cleared
- Built-in Presets:
- Rows with
builtIn: trueare read-only and reject this call
- Rows with
- No Redeploy Implied:
- Blocks BOUND to this preset are updated in place with the new position, role and content, and the affected deployments are flagged
redeployRequiredso the change ships on the next deploy - Blocks that were localized (detached from the catalog) are skipped and keep their own content
- Renaming the preset, or editing only its category or description, propagates nothing — those fields do not belong to a block
- Blocks BOUND to this preset are updated in place with the new position, role and content, and the affected deployments are flagged
Related Documentation
- Create AI Prompt-Decorator Preset - Create or upsert a preset
- Get AI Prompt-Decorator Preset - Get a single preset by name
- AI Prompt-Decorator Presets API - Resource overview