openapi: 3.2.0 info: title: Email Template API version: v1 servers: - url: https://rls.congacloud.com security: - Bearer: [] tags: - name: Email Template paths: /api/email/v1/email-templates: get: tags: - Email Template summary: Get the list of email templates based on filter and sort criteria description: Returns a list of email templates filtered by access type or category, with support for sorting and pagination. parameters: - name: searchBy in: query description: Search by AccessType or CategoryId schema: $ref: '#/components/schemas/EmailTemplateSearchType' - name: searchValue in: query description: Search value schema: type: string default: private - name: sortField in: query description: Name of the field to be sorted. schema: type: string default: EmailTemplateCategory.Name - name: pageSize in: query description: Number of email templates in each page. schema: type: integer format: int32 default: 100 - name: pageNumber in: query description: Number of page for which email templates to be fetched. schema: type: integer format: int32 default: 1 - name: sortDirection in: query description: Sort direction of the data schema: $ref: '#/components/schemas/SortDirection' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateResponseAPIResponse' '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error post: tags: - Email Template summary: Create an email template description: Creates an email template based on the information passed in the request body. requestBody: description: 'The email field information for creating the email template
' content: application/json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 65080654-272d-48c4-856f-2a88ac4352ef Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null text/json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 65080654-272d-48c4-856f-2a88ac4352ef Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null application/*+json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 65080654-272d-48c4-856f-2a88ac4352ef Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateAPIResponse' example: Success: true Data: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! - Updated OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: e925ba24-39a2-41e7-a51f-7bd1ad5e62b3 Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/render: post: tags: - Email Template summary: Render an unsaved email template description: Fetches the email template information based on the template render request. This API allows you to see a preview of an unsaved email template. requestBody: description: 'The email template render request:
' content: application/json: schema: $ref: '#/components/schemas/EmailTemplatePreviewRequest' text/json: schema: $ref: '#/components/schemas/EmailTemplatePreviewRequest' application/*+json: schema: $ref: '#/components/schemas/EmailTemplatePreviewRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateRenderResponseAPIResponse' example: Success: true Data: Id: bdd276f2-3cc4-408d-9395-f1ed3ea7ea48 Name: SampleTemplate Subject: Test Subject HtmlBody: Hi, Check out this email! PlainTextBody: Hi Test User, Regards Someone TemplateAttachments: null StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/search: get: tags: - Email Template summary: Get the list of email templates based on search criteria description: Returns a list of email templates that match the specified search criteria, with support for sorting and pagination. parameters: - name: criteria in: query description: "\n Required\n Search criteria" schema: type: string - name: sortField in: query description: Name of the field to be sorted. schema: type: string default: EmailTemplateCategory.Name - name: pageSize in: query description: Number of email templates in each page. schema: type: integer format: int32 default: 100 - name: pageNumber in: query description: Number of page for which email templates to be fetched. schema: type: integer format: int32 default: 1 - name: sortDirection in: query description: Sort direction of the data schema: $ref: '#/components/schemas/SortDirection' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateResponseAPIResponse' '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/{id}: delete: tags: - Email Template summary: Delete an email template description: Removes the email template based on the email template ID. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/StringAPIResponse' example: Success: true Data: EmailTemplate 673acf95-1a83-46f1-86aa-d07e46f9b0d4 is deleted successfully. StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error get: tags: - Email Template summary: Get an email template by ID description: Retrieves the email template based on the email template ID. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateAPIResponse' example: Success: true Data: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! - Updated OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: null DefaultForProducts: null DependentMergeFields: null AttachmentFileNames: null Id: 61b714cf-c3e4-42a0-b06b-0e6b95b3c5c2 Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error post: tags: - Email Template summary: Create a template attachment for a given template ID description: Creates a template attachment for the given template ID based on the email attachment information passed in the request body. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string requestBody: description: 'Provide the following details to create an attachment for a given email template ID: ' content: application/json: schema: $ref: '#/components/schemas/EmailAttachment' text/json: schema: $ref: '#/components/schemas/EmailAttachment' application/*+json: schema: $ref: '#/components/schemas/EmailAttachment' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/CreateFileResponseAPIResponse' '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error put: tags: - Email Template summary: Update an email template description: Updates the email template based on the email template ID and updated email template information. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string requestBody: description: 'Email template information to be updated:
' content: application/json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 89ab2a17-09a4-4147-8863-bbce3258961e Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null text/json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 89ab2a17-09a4-4147-8863-bbce3258961e Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null application/*+json: schema: $ref: '#/components/schemas/EmailTemplate' example: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: - Default - Test DefaultForProducts: - esign - review DependentMergeFields: null AttachmentFileNames: null Id: 89ab2a17-09a4-4147-8863-bbce3258961e Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/BooleanNullableAPIResponse' example: Success: true Data: true StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/{id}/clone: post: tags: - Email Template summary: Clone the email template description: Clones the email template based on the email template ID, with a new email template ID. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateAPIResponse' example: Success: true Data: IsActive: true IsDeleted: false ObjectName: SampleObjectName TemplateType: html Body: "Dear {{TestObjectName1.Name}} ,\n some content Regards UnitTest." HtmlValue:

Hello {{TestObjectName1.Name}} ,

some content Regards UnitTest.

Subject: Greetings, {{TestObjectName1.Name}}! - Updated OwnerId: null EmailTemplateCategory: null AccessType: null Description: null CustomCodeUrl: null Tags: null DefaultForProducts: null DependentMergeFields: null AttachmentFileNames: null Id: 504d1b23-bd06-4d6f-984a-507b5b7ad761 Name: SampleTemplate CreatedBy: null CreatedDate: '0001-01-01T00:00:00' ModifiedBy: null ModifiedDate: '0001-01-01T00:00:00' ExternalId: null ETag: null StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/{id}/delete: delete: tags: - Email Template summary: Delete all template attachments for a given template id at once description: Removes all template attachments for the given email template ID. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeleteFileResponseListAPIResponse' '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/{id}/render: post: tags: - Email Template summary: Render an email template description: Fetches the email template information based on the email template ID and template render request. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string requestBody: description: "The email template render request:\n
" content: application/json: schema: $ref: '#/components/schemas/EmailTemplateRenderRequest' text/json: schema: $ref: '#/components/schemas/EmailTemplateRenderRequest' application/*+json: schema: $ref: '#/components/schemas/EmailTemplateRenderRequest' responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/EmailTemplateRenderResponseAPIResponse' example: Success: true Data: Id: 31cbc1b1-f9e7-49cc-9ea1-d3501df23a3d Name: SampleTemplate Subject: Test Subject HtmlBody: Hi, Check out this email! PlainTextBody: Hi Test User, Regards Someone TemplateAttachments: null StatusCode: OK '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error /api/email/v1/email-templates/{id}/{fileName}/delete: delete: tags: - Email Template summary: Delete a template attachment for a given template ID description: Removes the template attachment for the given email template ID based on the file name. parameters: - name: id in: path description: The ID of the email template required: true schema: type: string - name: fileName in: path description: The name of the file required: true schema: type: string responses: '200': description: Success content: application/json: schema: $ref: '#/components/schemas/DeleteFileResponseAPIResponse' '400': description: Bad Request '404': description: Not Found '500': description: Internal Server Error components: schemas: EmailTemplateResponseAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: $ref: '#/components/schemas/EmailTemplateResponse' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false DeleteFileResponse: type: object properties: FileName: type: - string - 'null' FilePath: type: - string - 'null' IsDeleted: type: boolean additionalProperties: false DeleteFileResponseListAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: type: - array - 'null' items: $ref: '#/components/schemas/DeleteFileResponse' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false EmailTemplatePreviewRequest: type: object properties: EmailTemplateId: type: - string - 'null' RecipientType: type: - string - 'null' RecipientId: type: - string - 'null' ObjectName: type: - string - 'null' RecordId: type: - string - 'null' TemplateData: type: - object - 'null' additionalProperties: {} RecordDetails: type: - object - 'null' additionalProperties: {} Subject: type: - string - 'null' HtmlBody: type: - string - 'null' PlainTextBody: type: - string - 'null' additionalProperties: false EmailTemplateRenderRequest: type: object properties: EmailTemplateId: type: - string - 'null' RecipientType: type: - string - 'null' RecipientId: type: - string - 'null' ObjectName: type: - string - 'null' RecordId: type: - string - 'null' TemplateData: type: - object - 'null' additionalProperties: {} RecordDetails: type: - object - 'null' additionalProperties: {} additionalProperties: false EmailTemplateSearchType: enum: - AccessType - CategoryId type: string EmailAttachment: type: object properties: Name: type: - string - 'null' MimeType: type: - string - 'null' FileData: type: - string - 'null' deprecated: true FileContent: type: - string - 'null' format: byte File: type: - string - 'null' format: binary additionalProperties: false EmailTemplate: required: - Body - Subject - TemplateType type: object properties: Id: type: - string - 'null' Name: type: - string - 'null' CreatedBy: $ref: '#/components/schemas/LookupObject' CreatedDate: type: string format: date-time ModifiedBy: $ref: '#/components/schemas/LookupObject' ModifiedDate: type: string format: date-time ExternalId: type: - string - 'null' ETag: type: - string - 'null' IsActive: type: boolean IsDeleted: type: boolean ObjectName: type: - string - 'null' TemplateType: type: string Body: type: string HtmlValue: type: - string - 'null' Subject: type: string OwnerId: type: - string - 'null' EmailTemplateCategory: $ref: '#/components/schemas/LookupObject' AccessType: type: - string - 'null' Description: type: - string - 'null' CustomCodeUrl: type: - string - 'null' Tags: type: - array - 'null' items: type: string DefaultForProducts: type: - array - 'null' items: type: string DependentMergeFields: type: - string - 'null' AttachmentFileNames: type: - string - 'null' additionalProperties: {} CreateFileResponseAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: $ref: '#/components/schemas/CreateFileResponse' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false EmailTemplateRenderResponseAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: $ref: '#/components/schemas/EmailTemplateRenderResponse' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false EmailTemplateRenderResponse: type: object properties: Id: type: - string - 'null' Name: type: - string - 'null' Subject: type: - string - 'null' HtmlBody: type: - string - 'null' PlainTextBody: type: - string - 'null' TemplateAttachments: type: - array - 'null' items: $ref: '#/components/schemas/EmailAttachment' additionalProperties: false SortDirection: enum: - Ascending - Descending type: string ErrorDetail: type: object properties: Message: type: - string - 'null' additionalProperties: false EmailTemplateResponse: type: object properties: EmailTemplates: type: - array - 'null' items: $ref: '#/components/schemas/EmailTemplate' TotalRecordCount: type: - integer - 'null' format: int64 readOnly: true additionalProperties: false StringAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: type: - string - 'null' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false CreateFileResponse: type: object properties: FileName: type: - string - 'null' FilePath: type: - string - 'null' SharedURI: type: - string - 'null' additionalProperties: false EmailTemplateAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: $ref: '#/components/schemas/EmailTemplate' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false LookupObject: type: object properties: Id: type: - string - 'null' Name: type: - string - 'null' additionalProperties: false DeleteFileResponseAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: $ref: '#/components/schemas/DeleteFileResponse' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false BooleanNullableAPIResponse: type: object properties: Success: type: boolean RecordCount: type: - integer - 'null' format: int64 Data: type: - boolean - 'null' Errors: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' Profile: type: - string - 'null' TotalTime: type: number format: float StatusCode: $ref: '#/components/schemas/HttpStatusCode' HasMoreRecords: type: - boolean - 'null' NextCursor: type: - string - 'null' Warnings: type: - array - 'null' items: $ref: '#/components/schemas/ErrorDetail' additionalProperties: false HttpStatusCode: enum: - Continue - SwitchingProtocols - Processing - EarlyHints - OK - Created - Accepted - NonAuthoritativeInformation - NoContent - ResetContent - PartialContent - MultiStatus - AlreadyReported - IMUsed - MultipleChoices - MovedPermanently - Found - SeeOther - NotModified - UseProxy - Unused - TemporaryRedirect - PermanentRedirect - BadRequest - Unauthorized - PaymentRequired - Forbidden - NotFound - MethodNotAllowed - NotAcceptable - ProxyAuthenticationRequired - RequestTimeout - Conflict - Gone - LengthRequired - PreconditionFailed - RequestEntityTooLarge - RequestUriTooLong - UnsupportedMediaType - RequestedRangeNotSatisfiable - ExpectationFailed - MisdirectedRequest - UnprocessableEntity - Locked - FailedDependency - UpgradeRequired - PreconditionRequired - TooManyRequests - RequestHeaderFieldsTooLarge - UnavailableForLegalReasons - InternalServerError - NotImplemented - BadGateway - ServiceUnavailable - GatewayTimeout - HttpVersionNotSupported - VariantAlsoNegotiates - InsufficientStorage - LoopDetected - NotExtended - NetworkAuthenticationRequired type: string securitySchemes: Bearer: type: apiKey description: Please insert JWT with Bearer into field name: Authorization in: header