---
schema_version: "1"
id: 220613df1b34732ae82f4b8aaecb3d14aac111de4eae9bd124a57c32048dc5fa
title: Dynamic Send Survey Invitation Actions
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/api-action/objects/actions-obj-dynamic-send-survey-invitation.md
canonical_url: https://developer.salesforce.com/docs/service/salesforce-feedback-management-dev-guide/guide/actions-obj-dynamic-send-survey-invitation.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 37fdc5165eaa0a08dc1f61e5908758020581ea24499d3457eac9744dc11ab9c3
products:
  - Salesforce Feedback Management Developer Guide
  - Service Cloud Developer Content
---

# Dynamic Send Survey Invitation Actions

Send customized notifications to users about important events or updates to the records that they're working on. For example, notify account owners when a case is created.

This action is available in API version 51.0 and later.

## Special Access Rules

To access the Dynamic Send Survey Invitation action, you must have the Feedback Management Survey Response Pack and the Salesforce org enabled with Surveys.

## Supported REST HTTP Methods

**URIs:**

-   Get the list of invocable actions for each available survey:

    `/services/data/vXX.X/actions/custom/dynamicSendSurveyInvitation`

    Where `XX.X` is the lastes API version.

-   Send survey invitation by email by using the invocable action:

    `/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/SURVEY_NAME`

    Where `SURVEY_NAME` is a variable.


**Formats:** JSON, XML

**HTTP Methods:** GET, HEAD, POST

**Authentication:** `Authorization: Bearer TOKEN`

Where `TOKEN` is a variable.

## Inputs

|Input|Type|Description|
|-----|----|-----------|
|`anonymousResponse`|boolean|Indicates whether the participant's name is recorded in the response record (`true`) or not (`false`).|
|`autoExpiryDays`|integer|Number of days remaining for the survey invitation to expire.|
|`emailTemplateName`|string|Developer name of the template that contains either the question or the survey link.|
|`isUnauthenticatedResponse`|boolean|Indicates whether the participant is required to authenticate before starting the survey (`true`) or not (`false`).|
|`personalInvitation`|boolean|Indicates whether the invitation is specific to the recipient (`true`) or not (`false`).|
|`recipient`|reference|Required. Salesforce ID of the record that the survey invitation is sent to.|
|`recipientType`|string|Type of the survey recipient.|
|`surveyQuestionName`|string|Developer name of the question that's sent by using the invitation.|
|`surveySubjectEntity`|reference|ID of the record that associates the invitation record with another record.|

## Outputs

None.

## Example

**GET**

This example shows how to get information about the Dynamic Send Survey Invitation action type.

```nolang
curl --include --request GET \
--header "Authorization: Authorization: Bearer 00DR...xyz" \
--header "Content-Type: application/json" \
"https://instance.salesforce.com/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation"
```

Here's a response that returns the list of invocable actions for each survey.

```nolang
{
  "actions" : [ {
    "label" : "flowsend",
    "name" : "flowsend",
    "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
    "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/flowsend"
  }, {
    "label" : "survey2",
    "name" : "survey2",
    "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
    "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey2"
  }, {
    "label" : "survey",
    "name" : "survey",
    "type" : "SEND_SURVEY_DYNAMIC_INVOCABLE_ACTION",
    "url" : "/services/data/v51.0/actions/custom/dynamicSendSurveyInvitation/survey"
  } ]
}
```

**POST**

Here's a request for the Dynamic Send Survey Invitation action.

```nolang
{
   "inputs":[{
      "recipient" : "003xx000004WpemAAC",
      "isUnauthenticatedResponse" : false,
      "autoExpiryDays" : 6
   }]
}
```

Here's a response for the Dynamic Send Survey Invitation action.

```nolang
[
   {
      "actionName" : "survey",
      "errors" : null,
      "isSuccess" : true,
      "outputValues" : null
   }
]
```

