swagger: "2.0"
schemes:
  - https
host: management.azure.com
info:
  description: Use these REST APIs for performing operations on Email Templates associated with your Azure API Management deployment.
  title: ApiManagementClient
  version: 2018-06-01-preview
  x-apisguru-categories:
    - cloud
  x-logo:
    url: https://api.apis.guru/v2/cache/logo/https_assets.onestore.ms_cdnfiles_onestorerolling-1606-01000_shell_v3_images_logo_microsoft.png
  x-origin:
    - format: swagger
      url: https://raw.githubusercontent.com/Azure/azure-rest-api-specs/master/specification/apimanagement/resource-manager/Microsoft.ApiManagement/preview/2018-06-01-preview/apimemailtemplates.json
      version: "2.0"
  x-preferred: false
  x-providerName: azure.com
  x-serviceName: apimanagement-apimemailtemplates
  x-tags:
    - Azure
    - Microsoft
consumes:
  - application/json
produces:
  - application/json
securityDefinitions:
  azure_auth:
    authorizationUrl: https://login.microsoftonline.com/common/oauth2/authorize
    description: Azure Active Directory OAuth2 Flow.
    flow: implicit
    scopes:
      user_impersonation: impersonate your user account
    type: oauth2
security:
  - azure_auth:
      - user_impersonation
parameters: {}
paths:
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates":
    get:
      description: Lists a collection of properties defined within a service instance.
      operationId: EmailTemplate_ListByService
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: "| Field       | Supported operators    | Supported functions               |

            |-------------|------------------------|-----------------------------------|

            \r

            |name | ge, le, eq, ne, gt, lt | substringof, contains, startswith, endswith|\n"
          in: query
          name: $filter
          required: false
          type: string
        - description: Number of records to return.
          format: int32
          in: query
          minimum: 1
          name: $top
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Number of records to skip.
          format: int32
          in: query
          minimum: 0
          name: $skip
          required: false
          type: integer
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: A Collection of the Email Template for the specified API Management service instance.
          schema:
            description: Paged email template list representation.
            properties:
              nextLink:
                description: Next page link if any.
                type: string
              value:
                description: Page values.
                items:
                  allOf:
                    - description: The Resource definition.
                      properties:
                        id:
                          description: Resource ID.
                          readOnly: true
                          type: string
                        name:
                          description: Resource name.
                          readOnly: true
                          type: string
                        type:
                          description: Resource type for API Management resource.
                          readOnly: true
                          type: string
                      x-ms-azure-resource: true
                  description: Email Template details.
                  properties:
                    properties:
                      description: Email Template Contract properties.
                      properties:
                        body:
                          description: Email Template Body. This should be a valid XDocument
                          minLength: 1
                          type: string
                        description:
                          description: Description of the Email Template.
                          type: string
                        isDefault:
                          description: Whether the template is the default template provided by Api Management or has been edited.
                          readOnly: true
                          type: boolean
                        parameters:
                          description: Email Template Parameter values.
                          items:
                            description: Email Template Parameter contract.
                            properties:
                              description:
                                description: Template parameter description.
                                maxLength: 256
                                minLength: 1
                                pattern: ^[A-Za-z0-9-._]+$
                                type: string
                              name:
                                description: Template parameter name.
                                maxLength: 256
                                minLength: 1
                                pattern: ^[A-Za-z0-9-._]+$
                                type: string
                              title:
                                description: Template parameter title.
                                maxLength: 4096
                                minLength: 1
                                type: string
                          type: array
                        subject:
                          description: Subject of the Template.
                          maxLength: 1000
                          minLength: 1
                          type: string
                        title:
                          description: Title of the Template.
                          type: string
                      required:
                        - body
                        - subject
                type: array
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplate
      x-ms-examples:
        ApiManagementListEmailTemplates:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
          responses:
            "200":
              body:
                nextLink: ""
                value:
                  - id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/ApplicationApprovedNotificationMessage
                    name: ApplicationApprovedNotificationMessage
                    properties:
                      body: "<!DOCTYPE html >\r

                        <html>\r

                        \  <head />\r

                        \  <body>\r

                        \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r

                        \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r

                        \          We are happy to let you know that your request to publish the $AppName application in the application gallery has been approved. Your application has been published and can be viewed <a href=\"http://$DevPortalUrl/Applications/Details/$AppId\">here</a>.\r

                        \        </p>\r

                        \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r

                        \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r

                        \  </body>\r

                        </html>"
                      description: Developers who submitted their application for publication in the application gallery on the developer portal receive this email after their submission is approved.
                      isDefault: true
                      parameters:
                        - name: AppId
                          title: Application id
                        - name: AppName
                          title: Application name
                        - name: DevFirstName
                          title: Developer first name
                        - name: DevLastName
                          title: Developer last name
                        - name: OrganizationName
                          title: Organization name
                        - name: DevPortalUrl
                          title: Developer portal URL
                      subject: Your application $AppName is published in the application gallery
                      title: Application gallery submission approved
                    type: Microsoft.ApiManagement/service/templates
      x-ms-pageable:
        nextLinkName: nextLink
  "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ApiManagement/service/{serviceName}/templates/{templateName}":
    delete:
      description: Reset the Email Template to default template provided by the API Management service instance.
      operationId: EmailTemplate_Delete
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Email Template Name Identifier.
          enum:
            - applicationApprovedNotificationMessage
            - accountClosedDeveloper
            - quotaLimitApproachingDeveloperNotificationMessage
            - newDeveloperNotificationMessage
            - emailChangeIdentityDefault
            - inviteUserNotificationMessage
            - newCommentNotificationMessage
            - confirmSignUpIdentityDefault
            - newIssueNotificationMessage
            - purchaseDeveloperNotificationMessage
            - passwordResetIdentityDefault
            - passwordResetByAdminNotificationMessage
            - rejectDeveloperNotificationMessage
            - requestDeveloperNotificationMessage
          in: path
          name: templateName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: TemplateName
          x-ms-parameter-location: method
        - description: ETag of the Entity. ETag should match the current entity state from the header response of the GET request or it should be * for unconditional update.
          in: header
          name: If-Match
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Email Template was successfully reset to default.
        "204":
          description: Email Template was successfully reset to default.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplates
      x-ms-examples:
        ApiManagementDeleteEmailTemplate:
          parameters:
            If-Match: "*"
            api-version: 2018-06-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            templateName: newIssueNotificationMessage
          responses:
            "200": {}
            "204": {}
    get:
      description: Gets the details of the email template specified by its identifier.
      operationId: EmailTemplate_Get
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Email Template Name Identifier.
          enum:
            - applicationApprovedNotificationMessage
            - accountClosedDeveloper
            - quotaLimitApproachingDeveloperNotificationMessage
            - newDeveloperNotificationMessage
            - emailChangeIdentityDefault
            - inviteUserNotificationMessage
            - newCommentNotificationMessage
            - confirmSignUpIdentityDefault
            - newIssueNotificationMessage
            - purchaseDeveloperNotificationMessage
            - passwordResetIdentityDefault
            - passwordResetByAdminNotificationMessage
            - rejectDeveloperNotificationMessage
            - requestDeveloperNotificationMessage
          in: path
          name: templateName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: TemplateName
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: The response body contains the specified Email template.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Email Template details.
            properties:
              properties:
                description: Email Template Contract properties.
                properties:
                  body:
                    description: Email Template Body. This should be a valid XDocument
                    minLength: 1
                    type: string
                  description:
                    description: Description of the Email Template.
                    type: string
                  isDefault:
                    description: Whether the template is the default template provided by Api Management or has been edited.
                    readOnly: true
                    type: boolean
                  parameters:
                    description: Email Template Parameter values.
                    items:
                      description: Email Template Parameter contract.
                      properties:
                        description:
                          description: Template parameter description.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        name:
                          description: Template parameter name.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        title:
                          description: Template parameter title.
                          maxLength: 4096
                          minLength: 1
                          type: string
                    type: array
                  subject:
                    description: Subject of the Template.
                    maxLength: 1000
                    minLength: 1
                    type: string
                  title:
                    description: Title of the Template.
                    type: string
                required:
                  - body
                  - subject
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplates
      x-ms-examples:
        ApiManagementGetEmailTemplate:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            templateName: newIssueNotificationMessage
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage
                name: NewIssueNotificationMessage
                properties:
                  body: "<!DOCTYPE html >\r

                    <html>\r

                    \  <head />\r

                    \  <body>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r

                    \          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r

                    \        </p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r

                    \  </body>\r

                    </html>"
                  description: This email is sent to developers after they create a new topic on the Issues page of the developer portal.
                  isDefault: true
                  parameters:
                    - name: DevFirstName
                      title: Developer first name
                    - name: DevLastName
                      title: Developer last name
                    - name: IssueId
                      title: Issue id
                    - name: IssueName
                      title: Issue name
                    - name: OrganizationName
                      title: Organization name
                    - name: DevPortalUrl
                      title: Developer portal URL
                  subject: Your request $IssueName was received
                  title: New issue received
                type: Microsoft.ApiManagement/service/templates
    head:
      description: Gets the entity state (Etag) version of the email template specified by its identifier.
      operationId: EmailTemplate_GetEntityTag
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Email Template Name Identifier.
          enum:
            - applicationApprovedNotificationMessage
            - accountClosedDeveloper
            - quotaLimitApproachingDeveloperNotificationMessage
            - newDeveloperNotificationMessage
            - emailChangeIdentityDefault
            - inviteUserNotificationMessage
            - newCommentNotificationMessage
            - confirmSignUpIdentityDefault
            - newIssueNotificationMessage
            - purchaseDeveloperNotificationMessage
            - passwordResetIdentityDefault
            - passwordResetByAdminNotificationMessage
            - rejectDeveloperNotificationMessage
            - requestDeveloperNotificationMessage
          in: path
          name: templateName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: TemplateName
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Specified email template entity exists and current entity state version is present in the ETag header.
          headers:
            ETag:
              description: Current entity state version. Should be treated as opaque and used to make conditional HTTP requests.
              type: string
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplates
      x-ms-examples:
        ApiManagementHeadEmailTemplate:
          parameters:
            api-version: 2018-06-01-preview
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            templateName: newIssueNotificationMessage
          responses:
            "200":
              headers:
                etag: AAAAAAAAAAa=
    patch:
      description: Updates the specific Email Template.
      operationId: EmailTemplate_Update
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Email Template Name Identifier.
          enum:
            - applicationApprovedNotificationMessage
            - accountClosedDeveloper
            - quotaLimitApproachingDeveloperNotificationMessage
            - newDeveloperNotificationMessage
            - emailChangeIdentityDefault
            - inviteUserNotificationMessage
            - newCommentNotificationMessage
            - confirmSignUpIdentityDefault
            - newIssueNotificationMessage
            - purchaseDeveloperNotificationMessage
            - passwordResetIdentityDefault
            - passwordResetByAdminNotificationMessage
            - rejectDeveloperNotificationMessage
            - requestDeveloperNotificationMessage
          in: path
          name: templateName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: TemplateName
          x-ms-parameter-location: method
        - description: Update parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Email Template update Parameters.
            properties:
              properties:
                description: Email Template Update Contract properties.
                properties:
                  body:
                    description: Email Template Body. This should be a valid XDocument
                    minLength: 1
                    type: string
                  description:
                    description: Description of the Email Template.
                    type: string
                  parameters:
                    description: Email Template Parameter values.
                    items:
                      description: Email Template Parameter contract.
                      properties:
                        description:
                          description: Template parameter description.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        name:
                          description: Template parameter name.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        title:
                          description: Template parameter title.
                          maxLength: 4096
                          minLength: 1
                          type: string
                    type: array
                  subject:
                    description: Subject of the Template.
                    maxLength: 1000
                    minLength: 1
                    type: string
                  title:
                    description: Title of the Template.
                    type: string
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "204":
          description: Email Template was successfully updated.
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplates
      x-ms-examples:
        ApiManagementUpdateEmailTemplate:
          parameters:
            If-Match: "*"
            api-version: 2018-06-01-preview
            parameters:
              properties:
                body: "<!DOCTYPE html >\r

                  <html>\r

                  \  <head />\r

                  \  <body>\r

                  \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r

                  \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r

                  \          We are happy to let you know that your request to publish the $AppName application in the gallery has been approved. Your application has been published and can be viewed <a href=\"http://$DevPortalUrl/Applications/Details/$AppId\">here</a>.\r

                  \        </p>\r

                  \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r

                  \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r

                  \  </body>\r

                  </html>"
                subject: Your application $AppName is published in the gallery
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            templateName: applicationApprovedNotificationMessage
          responses:
            "204": {}
    put:
      description: Updates an Email Template.
      operationId: EmailTemplate_CreateOrUpdate
      parameters:
        - description: The name of the resource group.
          in: path
          name: resourceGroupName
          required: true
          type: string
          x-ms-parameter-location: method
        - description: The name of the API Management service.
          in: path
          maxLength: 50
          minLength: 1
          name: serviceName
          pattern: ^[a-zA-Z](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?$
          required: true
          type: string
          x-ms-parameter-location: method
        - description: Email Template Name Identifier.
          enum:
            - applicationApprovedNotificationMessage
            - accountClosedDeveloper
            - quotaLimitApproachingDeveloperNotificationMessage
            - newDeveloperNotificationMessage
            - emailChangeIdentityDefault
            - inviteUserNotificationMessage
            - newCommentNotificationMessage
            - confirmSignUpIdentityDefault
            - newIssueNotificationMessage
            - purchaseDeveloperNotificationMessage
            - passwordResetIdentityDefault
            - passwordResetByAdminNotificationMessage
            - rejectDeveloperNotificationMessage
            - requestDeveloperNotificationMessage
          in: path
          name: templateName
          required: true
          type: string
          x-ms-enum:
            modelAsString: true
            name: TemplateName
          x-ms-parameter-location: method
        - description: Email Template update parameters.
          in: body
          name: parameters
          required: true
          schema:
            description: Email Template update Parameters.
            properties:
              properties:
                description: Email Template Update Contract properties.
                properties:
                  body:
                    description: Email Template Body. This should be a valid XDocument
                    minLength: 1
                    type: string
                  description:
                    description: Description of the Email Template.
                    type: string
                  parameters:
                    description: Email Template Parameter values.
                    items:
                      description: Email Template Parameter contract.
                      properties:
                        description:
                          description: Template parameter description.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        name:
                          description: Template parameter name.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        title:
                          description: Template parameter title.
                          maxLength: 4096
                          minLength: 1
                          type: string
                    type: array
                  subject:
                    description: Subject of the Template.
                    maxLength: 1000
                    minLength: 1
                    type: string
                  title:
                    description: Title of the Template.
                    type: string
        - description: ETag of the Entity. Not required when creating an entity, but required when updating an entity.
          in: header
          name: If-Match
          required: false
          type: string
          x-ms-parameter-location: method
        - description: Version of the API to be used with the client request.
          in: query
          name: api-version
          required: true
          type: string
        - description: Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.
          in: path
          name: subscriptionId
          required: true
          type: string
      responses:
        "200":
          description: Email Template was successfully updated.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Email Template details.
            properties:
              properties:
                description: Email Template Contract properties.
                properties:
                  body:
                    description: Email Template Body. This should be a valid XDocument
                    minLength: 1
                    type: string
                  description:
                    description: Description of the Email Template.
                    type: string
                  isDefault:
                    description: Whether the template is the default template provided by Api Management or has been edited.
                    readOnly: true
                    type: boolean
                  parameters:
                    description: Email Template Parameter values.
                    items:
                      description: Email Template Parameter contract.
                      properties:
                        description:
                          description: Template parameter description.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        name:
                          description: Template parameter name.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        title:
                          description: Template parameter title.
                          maxLength: 4096
                          minLength: 1
                          type: string
                    type: array
                  subject:
                    description: Subject of the Template.
                    maxLength: 1000
                    minLength: 1
                    type: string
                  title:
                    description: Title of the Template.
                    type: string
                required:
                  - body
                  - subject
        "201":
          description: Email Template was successfully updated.
          schema:
            allOf:
              - description: The Resource definition.
                properties:
                  id:
                    description: Resource ID.
                    readOnly: true
                    type: string
                  name:
                    description: Resource name.
                    readOnly: true
                    type: string
                  type:
                    description: Resource type for API Management resource.
                    readOnly: true
                    type: string
                x-ms-azure-resource: true
            description: Email Template details.
            properties:
              properties:
                description: Email Template Contract properties.
                properties:
                  body:
                    description: Email Template Body. This should be a valid XDocument
                    minLength: 1
                    type: string
                  description:
                    description: Description of the Email Template.
                    type: string
                  isDefault:
                    description: Whether the template is the default template provided by Api Management or has been edited.
                    readOnly: true
                    type: boolean
                  parameters:
                    description: Email Template Parameter values.
                    items:
                      description: Email Template Parameter contract.
                      properties:
                        description:
                          description: Template parameter description.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        name:
                          description: Template parameter name.
                          maxLength: 256
                          minLength: 1
                          pattern: ^[A-Za-z0-9-._]+$
                          type: string
                        title:
                          description: Template parameter title.
                          maxLength: 4096
                          minLength: 1
                          type: string
                    type: array
                  subject:
                    description: Subject of the Template.
                    maxLength: 1000
                    minLength: 1
                    type: string
                  title:
                    description: Title of the Template.
                    type: string
                required:
                  - body
                  - subject
        default:
          description: Error response describing why the operation failed.
          schema:
            description: Error Response.
            properties:
              error:
                description: Error Body contract.
                properties:
                  code:
                    description: Service-defined error code. This code serves as a sub-status for the HTTP error code specified in the response.
                    type: string
                  details:
                    description: The list of invalid fields send in request, in case of validation error.
                    items:
                      description: Error Field contract.
                      properties:
                        code:
                          description: Property level error code.
                          type: string
                        message:
                          description: Human-readable representation of property-level error.
                          type: string
                        target:
                          description: Property name.
                          type: string
                    type: array
                  message:
                    description: Human-readable representation of the error.
                    type: string
      tags:
        - EmailTemplates
      x-ms-examples:
        ApiManagementCreateEmailTemplate:
          parameters:
            api-version: 2018-06-01-preview
            parameters:
              properties:
                subject: Your request for $IssueName was successfully received.
            resourceGroupName: rg1
            serviceName: apimService1
            subscriptionId: subid
            templateName: newIssueNotificationMessage
          responses:
            "200":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage
                name: NewIssueNotificationMessage
                properties:
                  body: "<!DOCTYPE html >\r

                    <html>\r

                    \  <head />\r

                    \  <body>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r

                    \          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r

                    \        </p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r

                    \  </body>\r

                    </html>"
                  description: This email is sent to developers after they create a new topic on the Issues page of the developer portal.
                  isDefault: false
                  parameters:
                    - name: DevFirstName
                      title: Developer first name
                    - name: DevLastName
                      title: Developer last name
                    - name: IssueId
                      title: Issue id
                    - name: IssueName
                      title: Issue name
                    - name: OrganizationName
                      title: Organization name
                    - name: DevPortalUrl
                      title: Developer portal URL
                  subject: Your request for $IssueName was successfully received.
                  title: New issue received
                type: Microsoft.ApiManagement/service/templates
            "201":
              body:
                id: /subscriptions/subid/resourceGroups/rg1/providers/Microsoft.ApiManagement/service/apimService1/templates/NewIssueNotificationMessage
                name: NewIssueNotificationMessage
                properties:
                  body: "<!DOCTYPE html >\r

                    <html>\r

                    \  <head />\r

                    \  <body>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Dear $DevFirstName $DevLastName,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Thank you for contacting us. Our API team will review your issue and get back to you soon.</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">\r

                    \          Click this <a href=\"http://$DevPortalUrl/issues/$IssueId\">link</a> to view or edit your request.\r

                    \        </p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">Best,</p>\r

                    \    <p style=\"font-size:12pt;font-family:'Segoe UI'\">The $OrganizationName API Team</p>\r

                    \  </body>\r

                    </html>"
                  description: This email is sent to developers after they create a new topic on the Issues page of the developer portal.
                  isDefault: false
                  parameters:
                    - name: DevFirstName
                      title: Developer first name
                    - name: DevLastName
                      title: Developer last name
                    - name: IssueId
                      title: Issue id
                    - name: IssueName
                      title: Issue name
                    - name: OrganizationName
                      title: Organization name
                    - name: DevPortalUrl
                      title: Developer portal URL
                  subject: Your request for $IssueName was successfully received.
                  title: New issue received
                type: Microsoft.ApiManagement/service/templates
definitions: {}
