---
schema_version: "1"
id: f6f7c98ef54960cc5e5e93c1366cf8406bd33961e05b1be097a40b8df754a180
title: Surveys Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_ConnectAPI_Survey_static_methods.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_Survey_static_methods.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: a63452f916bc448d9496864b7b87bf7b831098e9e6c72314d783e299fc1220ab
description: Send survey invitations by email.These methods are for Surveys. All methods are static.Email survey invitations to up to 300 participants. You can email either leads, contacts, or users in your org. Either a link to launch the survey or a question can be embedded in the email invitations.
---
# Surveys Class

Send survey invitations by email.

## Namespace

[ConnectApi](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_classes_connect_api.htm "The ConnectApi namespace (also called Connect in Apex) provides classes for accessing the same data available in Connect REST API. Use Connect in Apex to create custom experiences in Salesforce.")

## Surveys Methods

These methods are for Surveys. All methods are static.

- **[sendSurveyInvitationEmail(surveyID, SurveyEmailInput)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_ConnectAPI_Survey_static_methods.htm#apex_ConnectAPI_Surveys_sendSurveyInvitationEmail_1)**  
    Email survey invitations to up to 300 participants. You can email either leads, contacts, or users in your org. Either a link to launch the survey or a question can be embedded in the email invitations.

### sendSurveyInvitationEmail(surveyID, SurveyEmailInput)

Email survey invitations to up to 300 participants. You can email either leads, contacts, or users in your org. Either a link to launch the survey or a question can be embedded in the email invitations.

#### API Version

50.0

#### Requires Chatter

No

#### Signature

public static ConnectApi.SurveyInvitationEmailOutput sendSurveyInvitationEmail(String surveyID, ConnectApi.SurveyInvitationEmailInput SurveyEmailInput)

#### Parameters

surveyID

Type: String

ID of the survey.

SurveyEmailInput

Type: [ConnectApi.SurveyInvitationEmailInput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_input_survey_email.htm "Survey invitation email.")

A ConnectApi.SurveyInvitationEmailInput object.

#### Return Value

Type: [ConnectApi.SurveyInvitationEmailOutput](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_connectapi_output_survey_email.htm "Survey invitation email.")