---
schema_version: "1"
id: 7ac2378048071551b5ec15ff4f385b5318b7770e1484eec15e3da0161edab356
title: Salesforce Surveys Invitation Emails Resource
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/service-cloud/salesforce-feedback-management-dev-guide/guides/feedback-management/resources/connect-resources-survey-invitation-emails.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/connect-resources-survey-invitation-emails.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 45dedbc7dc1d788d250868c9c7492a0116f5137170d2dd13edc2f732ba720dce
products:
  - Salesforce Feedback Management Developer Guide
  - Service Cloud Developer Content
---

# Salesforce Surveys Invitation Emails Resource

Email survey invitations to up to 300 participants. You can email leads, contacts, or users in your org. Either a link to launch the survey or a question can be embedded in the email invitations.

## Resource

```nolang
/connect/surveys/SURVEY_ID/survey-invitation-emails
```

Where `SURVEY_ID` is a variable.

## Available Version

50.0

## HTTP Methods

POST

## Request Body for POST

### Root XML tag

`<SurveyInvitationEmailInput>`

### JSON Example

```nolang
{
 "recipients":["003x0000003j8CEAAY"],
 "collectAnonymousResponse":false,
 "allowParticipantsAccessTheirResponse":false,
 "allowGuestUserResponse":true,
 "isPersonalInvitation":true,
 "emailTemplateId":"00Xx0000000LwAuEAK",
 "surveyQuestionIds":["0Kux000000003yBCAQ"],
 "invitationExpirationDate":"2020-07-31T21:32:54",
 "fromEmailAddress":"abeeram@salesforce.com",
 "invitationOwner":"0054V00000FZTjJ",
 "shareInvitationsWith":["0054V00000FZTjJ"],
 "associateRecordsWithRecipients":[{"recipientId":"003x0000003j8CEAAY","associateRecordIds":["001x0000004EWIZAA4"]}],
 "recipientEngagementContexts":[{"recipientId" : "003x0000003j8CEAAY","recipientEngagementContext":{"TestKey" :"TestValue"}}]
}
```

### Properties

|Name|Type|Description|Required or Optional|Available Version|
|----|----|-----------|--------------------|-----------------|
|`allowGuest​UserResponse`|Boolean|Specifies whether participants who don't have a Salesforce account can respond (`true`) or not (`false`).|Required|50.0|
|`allowParticipants​AccessTheir​Response`|Boolean|Specifies whether participants can see their responses (`true`) or not (`false`).|Required|50.0|
|`associateRecords​WithRecipients`|[Survey Recipient Survey Subjects Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/requests/connect-requests-survey-recipient-survey-subjects-input.md)[]|Maps each recipient with another record that must be associated with the recipient's survey invitation.|Optional|50.0|
|`body`|String|Content of the email. Specify the email body in case you don't specify an email template. The email body must contain one of these merge fields:<ul><li>To embed a link to launch the survey: [[SURVEY_INVITATION_URL]]</li><li>To embed a survey question: {{{SurveyQuestion.QuestionName}}} and {{{SurveyQuestion.QuestionHtmlContent}}}</li></ul>|Optional|50.0|
|`collectAnonymous​Response`|Boolean|Specifies whether participants can respond anonymously (`true`) or not (`false`).|Required|50.0|
|`communityId`|String|ID of the site that's used to open the survey for users outside your org.|Optional|50.0|
|`emailTemplateId`|String|ID of the Lightning email template that's used to send the survey invitation. The template must contain the required merge fields that embed either the survey link or a question in the email. Only Lightning email templates are used to send survey invitations.|Optional|50.0|
|`fromEmail​Address`|String|Email ID of the user or the org-wide email address associated with the user's profile.|Required|50.0|
|`invitation​ExpirationDate`|String|Date on which the survey invitation expires.|Optional|50.0|
|`invitationOwner`|String|ID of the owner of the survey invitation records.|Optional|50.0|
|`isPersonal​Invitation`|Boolean|Specifies whether a unique invitation is created for each participant (`true`) or not (`false`). When a participant responds using a personal invitation, the response record is associated with the participant's Salesforce record.|Required|50.0|
|`recipient​Engagement​Contexts`|[Survey Recipient Engagement Context Input](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/requests/connect-requests-survey-recipient-engagement-context-input.md)[]|Maps each recipient with the context based on which the survey invitation is emailed.|Optional|50.0|
|`recipients`|String[]|List of up to 300 IDs of leads, contacts, or users to whom the survey invitation is emailed.|Required|50.0|
|`sendEmail​ThroughUma`|Boolean|Specifies whether to send the email through Marketing Cloud (`true`) or not (`false`). If unspecified, defaults to `false`.|Optional|65.0|
|`shareInvitations​With`|String[]|IDs of the users with whom the survey invitation records must be shared. The invitation records are shared with Read access.|Optional|50.0|
|`subject`|String|Subject of the email. Specify the subject in case you don't specify an email template.|Optional|50.0|
|`surveyQuestion​Ids`|String[]|IDs of the questions that are embedded in the email. You can send an email invitation for questions of these types: Net Promoter Score (NPS), rating, and score.|Optional|50.0|

## Response Body for POST

[Survey Email](https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/responses/connect-responses-survey-email.md)

