Email Template (POST)

Create an email template. The Health Cloud Starter and Life Sciences Commercial Admin Permission Sets are required for accessing this API. To know more, see Email Template and Intelligent Content.

Resource 

1/connect/life-sciences/commercial/bulk-email-template

Resource Example 

Replace {yourInstance} with the My Domain name of your Salesforce org.

1https://{yourInstance}.salesforce.com/services/data/v68.0/connect/life-sciences/commercial/bulk-email-template

Available Version 

65.0

HTTP Methods 

POST

File Input Payload Size:

  • Overall API Payload Limit: The total request payload limit across APIs is 2 GB. When attaching single or multiple files as binary inputs using fileId, this 2 GB limit applies to the entire combined request payload.

Rate Limits:

    • Bulk Presentation (POST and PATCH): The rate limit is 200 API calls per org per hour.

Note

Request Body for POST 

1{
2    "emailSubject": "Welcome",
3    "contentDocumentId": "069xx0000004CAeAAM",
4    "name": "Welcome Email",
5    "activatedDate": "2025-06-03T15:00:00.000Z",
6    "senderType": "SYSTEM",
7    "senderEmailFieldAPIName": "noreply@company.com",
8    "replyToType": "USER",
9    "replyToEmailAddress": "support@company.com",
10    "id": "external-id",
11    "deactivatedDate": "2025-01-01T00:00:00.000Z",
12    "description": "This is a welcome email template used for onboarding new users.",
13    "attachmentObjectTypes": [
14        "PDF",
15        "DOCX"
16    ],
17    "customFields": [
18        {
19            "fieldName": "user",
20            "fieldValue": "admin"
21        },
22        {
23            "fieldName": "standard",
24            "fieldValue": "user"
25        }
26    ],
27    "languages": [
28        "en",
29        "es"
30    ],
31    "isActive": true,
32    "surveyId": "sample-survey-id",
33    "productId": "sample-product-id",
34    "communicationSubscriptionId": "sample-comm-subscription-id",
35    "topics": [
36        "Onboarding",
37        "User Engagement"
38    ],
39    "shouldIgnoreEmailConsent": false,
40    "isSubjectLineEditable": true,
41    "bccEmailIdList": "bcc@example.com",
42    "automatedEmailContextType": "ProviderVisit",
43    "automatedEmailActionType": "Create",
44    "isDefaultAutoEmailTemplate": false
45}

Properties

Property NameTypeDescriptionRequired
activatedDateDateDate when the email template becomes active.Optional
attachmentObjectTypesList<String>List of object types for attachments.Optional
automatedEmailActionTypeStringAction type for automated emails. Possible values are:
  • Create
  • Update
  • Cancel
Optional
automatedEmailContextTypeStringContext type for automated emails. Possible values are:
  • ProviderVisit
  • Meeting
Optional
bccEmailIdListStringEmail ID for BCC.Optional
communicationSubscriptionIdStringID of the communication subscription associated with the email temaplate.Optional
contentDocumentIdStringID of the content document ZIP containing the email files. You can pass this parameter if you wish to process the existing document record. This parameter cannot be provided when you pass the fileId.Required
customFieldsObjectMap of custom field names and their values for the email template.Optional
deactivatedDateDatetimeDate when the email template becomes inactive.Optional
descriptionStringDescription of the email template.Optional
emailSubjectStringSubject line of the email template.Required, only if the file input is provided either as contentDocumentId or fileId
fileIdStringThe multipart form field key that references the uploaded file for this presentation page. You can pass this parameter if you wish to process a new file that you will include in the request. You cannot provide this parameter when you pass the contentDocumentId as only one of the two are allowed.Required
idStringID of the email template. Either the SourceSystemIdentifier or Salesforce Id of the LifeSciEmailTemplate record.Optional
isActiveBooleanIndicates if the email template is active (true) or not (false).Optional
isDefaultAutoEmailTemplateBooleanIndicates if this is a default automated email template (true) or not (false).Optional
isSubjectLineEditableBooleanIndicates if the email subject line is editable (true) or not (false).Optional
languagesList<String>List of languages associated with the email template as per the ISO codes such as en_US, fr, es.Optional
nameStringName of the email template.Required
productIdStringID of the associated product.Optional
replyToEmailAddressStringReply-to email address.Optional
replyToTypeStringType of reply-to address. Possible values are:
  • SalesRep
  • PredefinedEmail
Optional
senderEmailFieldAPINameStringAPI name of the sender’s email field.Optional
senderTypeStringType of sender for the email. Possible values are:
  • SalesRep
  • PredefinedEmail
Optional
shouldIgnoreEmailConsentBooleanIndicates whether email consent should be ignored (true) or not (false).Optional
surveyIdStringID of the associated survey.Optional
topicsList<String>List of topics associated with the email template. TopicAssignment for Life Science EmailTemplate must be enabled before using this field.Optional

Response Body for POST 

Create Email Template Output