openapi: 3.2.0 info: title: Fenergo Email Template API version: '4.0' description: 'Operations tagged EmailTemplate across 2 of this provider''s published API definitions: fenergo-portaltenantcommand-v4-0-openapi.json, fenergo-portaltenantquery-v4-0-openapi.json. Each path carries the servers of the definition it was published in.' servers: - url: /portaltenantcommand - url: /portaltenantquery security: - Bearer: [] tags: - name: Email Template paths: /api/email-templates: post: tags: - Email Template summary: Creates a new Email Template description: 'Required permissions: Following permissions are required: PortalTenantEdit' operationId: AddEmailTemplate parameters: - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 requestBody: content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.AddEmailTemplateDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.String__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT get: tags: - Email Template summary: Gets all Email Templates for the tenant description: 'Required permissions: Following permissions are required: PortalTenantAccess' operationId: GetEmailTemplates parameters: - name: type in: query schema: type: string - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Collections.Generic.List_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null____System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.String__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT servers: - url: /portaltenantcommand /api/email-templates/{id}: put: tags: - Email Template summary: Updates an Email Template's content description: 'Required permissions: Following permissions are required: PortalTenantEdit' operationId: UpdateEmailTemplate parameters: - name: id in: path required: true schema: type: string format: uuid - name: portalUrl in: query required: true schema: type: string - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 requestBody: content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.UpdateEmailTemplateContentDto' responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: Not Found type: Error errorCode: Error Code '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.String__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT get: tags: - Email Template summary: Gets an Email Template by ID description: 'Required permissions: Following permissions are required: PortalTenantAccess' operationId: GetEmailTemplateById parameters: - name: id in: path required: true schema: type: string format: uuid - name: X-TENANT-ID in: header description: The UiD of the tenant representing organization required: true schema: type: string example: b11f8be3-f29b-4959-8964-956d4af7c468 responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null' '404': description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: Not Found type: Error errorCode: Error Code '500': description: Internal Server Error content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse' '401': description: User is not authorized to perform this request content: application/json: example: message: Unauthorized '403': description: Access to resource is forbidden. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: {} messages: - message: 'Access denied. Following permissions are required: Permission1, Permission2' type: Forbidden errorCode: Error Code '410': description: Endpoint marked as deprecated was terminated. This response will be present only if the endpoint was marked as deprecated and has reached the sunset date. During the deprecation period, the API will include additional 'sunset' and 'deprecation' headers. content: application/json: schema: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.String__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e' example: data: null messages: - message: This endpoint is obsolete and was terminated on yyyy-MM-dd type: Error errorCode: OBSOLETE_ENDPOINT servers: - url: /portaltenantcommand components: schemas: ? Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null : type: object properties: data: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto' messages: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage' description: List of Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage associated to the service response additionalProperties: false description: Service response data Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse: type: object properties: data: type: - string - 'null' description: The service response DTO messages: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage' description: List of Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage associated to the service response additionalProperties: false description: Service response data Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.UpdateEmailTemplateContentDto: required: - buttonText - mainText - subject - subText type: object properties: subject: maxLength: 200 minLength: 1 type: string mainText: maxLength: 5000 minLength: 1 type: string subText: maxLength: 5000 type: string buttonText: maxLength: 50 minLength: 1 type: string footerText: type: - string - 'null' isEnabled: type: - boolean - 'null' additionalProperties: false ? Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.String__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e : type: object properties: data: type: - string - 'null' description: The service response DTO messages: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage' description: List of Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage associated to the service response additionalProperties: false description: Service response data Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.AddEmailTemplateDto: required: - defaults - name - type type: object properties: name: maxLength: 200 minLength: 1 type: string type: minLength: 1 type: string defaults: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateContentDto' additionalProperties: false ? Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Object__System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e : type: object properties: data: description: The service response DTO messages: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage' description: List of Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage associated to the service response additionalProperties: false description: Service response data Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateContentDto: type: object properties: subject: type: - string - 'null' mainText: type: - string - 'null' subText: type: - string - 'null' buttonText: type: - string - 'null' footerText: type: - string - 'null' updatedAt: type: string format: date-time additionalProperties: false Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage: type: object properties: message: type: - string - 'null' description: The message example: Success type: type: - string - 'null' description: 'Type of the message One of Info, Warning, Error, Forbidden' example: Info errorCode: type: - string - 'null' description: Error Code example: INTERNAL_SERVER_ERROR additionalProperties: false description: The message associated to the service response Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto: type: object properties: id: type: string format: uuid templateKey: type: - string - 'null' name: type: - string - 'null' type: type: - string - 'null' isSystemTemplate: type: boolean isEnabled: type: - boolean - 'null' defaults: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateContentDto' brandOverrides: type: - object - 'null' additionalProperties: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateContentDto' createdAt: type: string format: date-time updatedAt: type: string format: date-time isValid: type: - boolean - 'null' validationError: type: - string - 'null' additionalProperties: false ? Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponse_1__System.Collections.Generic.List_1__Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto__Fenergo.Nebula.Portal.Tenant.Shared__Version_4.1.6.0__Culture_neutral__PublicKeyToken_null____System.Private.CoreLib__Version_8.0.0.0__Culture_neutral__PublicKeyToken_7cec85d7bea7798e : type: object properties: data: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Portal.Tenant.Shared.Dto.EmailTemplate.EmailTemplateDto' description: The service response DTO messages: type: - array - 'null' items: $ref: '#/components/schemas/Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage' description: List of Fenergo.Nebula.Platform.Core.Models.Response.ServiceResponseMessage associated to the service response additionalProperties: false description: Service response data securitySchemes: Bearer: type: apiKey description: Please insert JWT with Bearer into field name: Authorization in: header x-refined-from: - fenergo-portaltenantcommand-v4-0-openapi.json - fenergo-portaltenantquery-v4-0-openapi.json