# Variable PromptTemplatesApi`Const`

PromptTemplatesApi: {
_defaultBasePath: undefined;
createUpdatePromptTemplate: (
body: PromptTemplatePostRequest,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplatePostResponse>;
deletePromptTemplate: (
promptTemplateId: string,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateDeleteResponse>;
exportPromptTemplate: (
promptTemplateId: string,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<Blob>;
getPromptTemplateByUuid: (
promptTemplateId: string,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateGetResponse>;
importPromptTemplate: (
body: { file?: Blob } & Record<string, any> | undefined,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplatePostResponse>;
listPromptTemplateHistory: (
scenario: string,
version: string,
name: string,
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateListResponse>;
listPromptTemplates: (
queryParameters?: {
includeSpec?: boolean;
name?: string;
retrieve?: string;
scenario?: string;
version?: string;
},
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateListResponse>;
parsePromptTemplateById: (
promptTemplateId: string,
body: PromptTemplateSubstitutionRequest | undefined,
queryParameters?: { metadata?: boolean },
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateSubstitutionResponse>;
parsePromptTemplateByNameVersion: (
scenario: string,
version: string,
name: string,
body: PromptTemplateSubstitutionRequest | undefined,
queryParameters?: { metadata?: boolean },
headerParameters?: {
"AI-Resource-Group"?: string;
"AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
},
) => OpenApiRequestBuilder<PromptTemplateSubstitutionResponse>;
}

Representation of the 'PromptTemplatesApi'. This API is part of the 'prompt-registry' service.

#### Type Declaration

- ##### _defaultBasePath: undefined

- ##### createUpdatePromptTemplate: (
  body: PromptTemplatePostRequest,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplatePostResponse>

  Create or update a prompt template

- ##### deletePromptTemplate: (
  promptTemplateId: string,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateDeleteResponse>

  Delete prompt template

- ##### exportPromptTemplate: (
  promptTemplateId: string,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<Blob>

  Export prompt template

- ##### getPromptTemplateByUuid: (
  promptTemplateId: string,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateGetResponse>

  Get prompt template by UUID

- ##### importPromptTemplate: (
  body: { file?: Blob } & Record<string, any> | undefined,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplatePostResponse>

  Import prompt template

- ##### listPromptTemplateHistory: (
  scenario: string,
  version: string,
  name: string,
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateListResponse>

  List prompt template history

- ##### listPromptTemplates: (
  queryParameters?: {
  includeSpec?: boolean;
  name?: string;
  retrieve?: string;
  scenario?: string;
  version?: string;
  },
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateListResponse>

  List prompt templates

- ##### parsePromptTemplateById: (
  promptTemplateId: string,
  body: PromptTemplateSubstitutionRequest | undefined,
  queryParameters?: { metadata?: boolean },
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateSubstitutionResponse>

  Parse prompt template by ID

- ##### parsePromptTemplateByNameVersion: (
  scenario: string,
  version: string,
  name: string,
  body: PromptTemplateSubstitutionRequest | undefined,
  queryParameters?: { metadata?: boolean },
  headerParameters?: {
  "AI-Resource-Group"?: string;
  "AI-Resource-Group-Scope"?: "true" | "True" | "false" | "False";
  },
  ) => OpenApiRequestBuilder<PromptTemplateSubstitutionResponse>

  Parse prompt template by name and version

  Copyright Ⓒ 2026 SAP SE or an SAP affiliate company. All rights reserved.

- Defined in packages/prompt-registry/dist/client/prompt-registry/prompt-templates-api.d.ts:7