Skip to content

Summary Prompt Templates

List the summary prompt templates assigned to the authenticated Desktop Services user and update that user's assignment.

Internal API

The Desktop API is internal and must not be used for customer integrations. Compatibility is not guaranteed, and these endpoints may change without notice.

Base path: /api/v1/desktop-services/summary-prompt-templates

Method Endpoint Description
GET /api/v1/desktop-services/summary-prompt-templates List Assigned Templates
PATCH /api/v1/desktop-services/summary-prompt-templates/{templateId}/assignment Update an Assignment

List Assigned Templates

GET /api/v1/desktop-services/summary-prompt-templates

Requires Authentication - Scopes: desktop:app:use, ai:prompts:read

Return a page of user-role prompt templates assigned to the current user, including templates assigned globally.

Query Parameters
Parameter Type Required Default Description
page integer No 0 Zero-based page number. Minimum: 0.
size integer No 20 Page size. Range: 1–100.
curl "https://koldan.dixilang.com/api/v1/desktop-services/summary-prompt-templates?page=0&size=20" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
import requests

response = requests.get(
    "https://koldan.dixilang.com/api/v1/desktop-services/summary-prompt-templates",
    headers={"Authorization": f"Bearer {ACCESS_TOKEN}"},
    params={"page": 0, "size": 20},
)
response.raise_for_status()
print(response.json())
DesktopSummaryPromptTemplateListResponse
Field Type Nullable Description
items DesktopSummaryPromptTemplateResponse[] No Assigned templates in the current page. Default: empty array.
page integer No Requested zero-based page number. Default: 0.
size integer No Requested page size. Default: 20.
total integer No Total assigned templates across all pages. Default when none are assigned: 0.
DesktopSummaryPromptTemplateListResponse
{
  "items": [
    { "...": "..." }
  ],
  "page": 0,
  "size": 20,
  "total": 1
}
Status Description
200 OK Assigned templates returned.
400 Bad Request Pagination values are outside the supported range.
401 Unauthorized Access token is missing or invalid.
403 Forbidden A required scope is missing.
404 Not Found No Desktop profile exists for the authenticated user.

Update an Assignment

PATCH /api/v1/desktop-services/summary-prompt-templates/{templateId}/assignment

Requires Authentication - Scopes: desktop:app:use, ai:prompts:write

Assign or unassign a user-role prompt template for the current user, and optionally change whether it is the user's default template.

Path Parameters
Parameter Type Required Description
templateId string (UUID) Yes Prompt template identifier.
DesktopSummaryPromptTemplateAssignmentRequest
Field Type Required Description
assigned boolean No true assigns the template; false unassigns it. Omission leaves assignment unchanged. When a new assignment omits default, the default is false.
default boolean No Set or clear the default flag. Omission leaves the flag unchanged for an existing assignment. A template must be assigned before it can be made default.

For either field, JSON null has the same effect as omission. Omitting both fields returns the current assignment unchanged. When assigned is false, the template is unassigned and default is not applied.

DesktopSummaryPromptTemplateAssignmentRequest
{
  "assigned": true,
  "default": true
}
curl -X PATCH https://koldan.dixilang.com/api/v1/desktop-services/summary-prompt-templates/ea97bc12-b521-4b22-8f86-7b60b36ac529/assignment \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assigned": true}'
curl -X PATCH https://koldan.dixilang.com/api/v1/desktop-services/summary-prompt-templates/ea97bc12-b521-4b22-8f86-7b60b36ac529/assignment \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assigned": true, "default": true}'
curl -X PATCH https://koldan.dixilang.com/api/v1/desktop-services/summary-prompt-templates/ea97bc12-b521-4b22-8f86-7b60b36ac529/assignment \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"assigned": false}'
DesktopSummaryPromptTemplateResponse

Returns the current template and assignment properties after the operation.

Status Description
200 OK Assignment updated or already in the requested state.
400 Bad Request Request JSON or a field type is invalid.
401 Unauthorized Access token is missing or invalid.
403 Forbidden A required scope is missing or this template cannot be assigned by the current user.
404 Not Found User profile or visible prompt template was not found.
409 Conflict Requested assignment/default combination is not valid.

Data Models

DesktopSummaryPromptTemplateResponse

Field Type Nullable Description
id string (UUID) No Stable template identifier used in summary requests.
displayName string No User-facing template name.
description string No Template purpose.
level string enum No Template scope: USER, TENANT, APPLICATION, or UNKNOWN. Default when unavailable: UNKNOWN.
templateText string No Current prompt content. Default when no current content is available: empty string.
assigned boolean No Whether the template is assigned to the current user. This is always true in the list response; an assignment update can return false after unassignment. Default: false.
default boolean No Whether this is the current user's default assigned template. Default: false.
global boolean No Whether the template is available through global assignment. Default: false.
globalDefault boolean No Whether the globally assigned template is a global default. Default: false.
editable boolean No Whether the current user can edit the template through the AI Prompts API. Default: false.
DesktopSummaryPromptTemplateResponse
{
  "id": "ea97bc12-b521-4b22-8f86-7b60b36ac529",
  "displayName": "Clinical note",
  "description": "Creates a structured clinical note",
  "level": "TENANT",
  "templateText": "Create a concise clinical note from {{transcript}}.",
  "assigned": true,
  "default": true,
  "global": false,
  "globalDefault": false,
  "editable": false
}

Template creation and content editing are documented under AI Prompts.