Update AI Prompt Template
Endpoint
PUT /apiops/settings/ai-prompt-templates/{entryName}/
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 |
|---|---|---|---|
| entryName | string | Yes | Name of the entry (case-insensitive). Must match the name in the body when that field is present |
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| projectId | string | No | admin | Scope project id. Omit for the admin/global scope. |
Body
The entry object. Field definitions are on the AI Prompt Templates API overview page.
{
"id": "665f3b2d8c4f5b0013cd91dd",
"projectId": "admin",
"name": "support-summary",
"description": "Summarize a support thread into three bullet points",
"messages": [
{ "role": "system", "content": "You summarize support conversations." },
{ "role": "user", "content": "Summarize the following thread: {{thread}}" }
],
"parameters": [
{ "name": "thread", "required": true }
],
"enabled": true,
"builtIn": false
}
Response
Success Response (200 OK)
{
"status": "SUCCESS"
}
Error Response (400 Bad Request)
{
"status": "FAILURE",
"resultMessage": "AI Prompt Template name in path (support-summary) does not match name in body (other-name)!"
}
Error Response (401 Unauthorized)
{
"status": "FAILURE",
"resultMessage": "Token is not valid!"
}
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/settings/ai-prompt-templates/support-summary/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d @entry.json
Notes and Warnings
- Identified by name, never by id: the entry's id is server-owned; it is not accepted as a path or query parameter
- Name must agree: a blank
namein the body is filled from the path; a differing one is rejected - Must already exist: unlike
POST, this call reports not-found rather than creating the entry - Admin Only: a project-scoped
AI_DEVELOPMENTtoken is not sufficient on this surface
Related Documentation
- Get AI Prompt Template - Get a single entry by name
- AI Prompt Templates API - Resource overview