API document for Sharing the survey via WhatsApp, SMS, Email

API document for Sharing the survey via WhatsApp, SMS, Email

What is SurveySensum Platform:


SurveySensum is a SAAS application, using the application anyone can create multiple surveys. These surveys can be shared to the customers through multiple channels like WhatsApp, Email, SMS. Once customers receive the survey, they click on the survey link (survey link which is shared via different channels), once user fills the survey on web application the response is captured SurveySensum platform. All the responses and the reporting can be viewed in SurveySensum reporting module. Below is the flow when user is manually sharing the survey form the platform.

Feedback collection flow: 

Displaying Frame 1.png 

Need of API integration:

API integration is essential when you need to automate survey distribution in real-time after a transaction or key customer interaction. This ensures timely feedback collection without manual intervention.

Common Use Cases for Real-Time API Integration:

  1. Customer Onboarding – Trigger a survey after a user completes the signup process.

  2. Customer Query Resolution – Send a feedback survey once a support ticket is closed.

  3. Account Closure – Collect insights when a customer closes their account.

In these scenarios, SurveySensum provides a REST API to seamlessly communicate with the survey share module, allowing businesses to trigger surveys programmatically after a transaction or event. This ensures that feedback is gathered at the right moment for better insights and improved customer experience.

 

 Prerequisites for API integrations:

 

1.     The survey should already be there in the SurveySensum. You can build the survey using the build module of SurveySensum, the SurveyGuid is required in the API call. Survey GUID can be copied from the platform URL as following screenshot:



 


2.       Access token for authentication

a.     Login to your SurveySensum account and go to your Account Settings.

b.     On the settings page, go to Integration and Apps, Created Apps and then click 'Create Your App'

c.     Enter the app name and a short description of your app and click on Create New App.

d.     Once you create an app, an Access token will be visible on the screen with all permissions.

e.     You can change permissions if you want to. But make sure to re-generate your Access token to apply those new permissions.


Displaying Frame 7.png



3.     Contact properties codes: Each customer of your organization is identified in SurveySensum as a contact, in the api payload property code is required.  Your customer may have information like name, email, phone number, city info, store id, region etc. Developers can ask the business user which user info they require in the survey response for further analysis. For knowing the codes you can go to SurveySensum platform-> Contacts-> Contact Properties , in the contact properties grid there is a column named “code”, in this field you can know the code for each property

 Displaying Frame 12.png

Api Specs:


You can access the request API from the created app under API URL, see the below screenshot for the reference:
Displaying Frame 13.png

This URL will be changed as per the created app. Below is an example of how you can use it further.

Request Method: Post

Request API: {{baseUrl}}/v2/Share/shareSurvey

Request Headers:

Authorization: Bearer {token}

Content-type: application/json

Note: Token can be generated by logging in to SurveySensum platform-> Setting-> Integrations & Apps-> Created Apps, here you can create a new app for getting an Auth token

 

Query Parameters

Name

Type

Optional

surveyGuid

string

No

shareId

string

Yes

 


 

Request body:

{

  "channelType": "Email",

  "contactInfo": [

    {

      "key": "Contact prop descriptor Code",

      "value": "Contact prop value"

    }

  ],

  "metadata": [

    {

      "key": "Metadata prop descriptor code",

      "value": "Metadata value"

    }

  ],

  "delayMinutes": 0

}

 

 

Example curl :

curl -X POST " {{baseUrl}}/v2/Share/shareSurvey?surveyGuid=919a168f-2b97-45b8-b7ce-f45e85c6154e" -H  "accept: text/plain" -H  "Authorization: Bearer eyJhbGciOiJSUzI1NiIsImtpZCI6IjM3M2QwOWY4NDQ3ZjUyZjEyMjY3MjY2ZjMxMjM2MzE5IiwidHlwIjoiSldUIn0.eyJuYmYiOjE3NDIzNjE5NDcsImV4cCI6MTc3Mzg5Nzk0NywiaXNzIjoiaHR0cHM6Ly9wcm9kLWphLW1pY3JvLnN1cnZleXNlbnN1bS5jb20vc3RzIiwiYXVkIjpbImh0dHBzOi8vcHJvZC1qYS1taWNyby5zdXJ2ZXlzZW5zdW0uY29tL3N0cy9yZXNvdXJjZXMiLCJ2el9vcGVuX2FwaSJdLCJjbGllbnRfaWQiOiIwZWJkM2I0YS05YzkyLTRmNzItYmVjZS0wMjhmZDcyNzJiNGQiLCJzdWIiOiJkYzExMGYzNy0wM2ZhLTExZjAtOGU5ZC0wYTBjZGE5Nzg5ZjIiLCJhdXRoX3RpbWUiOjE3NDIzNjE5NDcsImlkcCI6ImxvY2FsIiwiSXNQYW5lbEFsbG93ZWQiOiJGYWxzZSIsInN1YnNjcmlwdGlvbkd1aWQiOiJkYzkyNTQyNS0wM2ZhLTExZjAtOGU5ZC0wYTBjZGE5Nzg5ZjIiLCJ1c2VyR3VpZCI6ImRjMTEwZjM3LTAz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9hY2Nlc3MiXSwiYW1yIjpbInB3ZCJdLCJSb2xlcyI6WyJBZG1pbiJdfQ.vPcHDxJEuKp63_MrvAZ_7AzSMbBRG8u1hgynIh9GJa9M7NhcTrQphp55ryb_5plWIWFStcD91drBapI2NvFP2vcZFixyfGmwXwC5jbPkVrjRgDXQVNQ_yhv-gT448EhnKqShQmDCi-3xRnhfLQs_y_8TXMz6vY04YAcx9i2a3C2qHGUVS_x6vJLfCu3-XTyQTRicynR4l6fxiZ-7P1C14A-rUZVr0w0zFQYlWNjhsJhXX3d6_jhRF8iJA_Qd2ODFAWwXyZw4yqXBfj189jU-N9qbMo1RtwoEz0tJ189y3_LWTxwXODzd8y_ffly1cgvGxwRRpJiS0AKQgG0bhBWG-w" -H  "Content-Type: application/json-patch+json" -d "{\"channelType\":\"Email\",\"contactInfo\":[{\"key\":\"vz_c_email\",\"value\":\"gabriella.gonzalles@akulaku.com\"}]}"

Displaying Frame 7.png
    • Related Articles

    • API document for Unique link generation

      What is SurveySensum Platform: SurveySensum is a SAAS application, using the application anyone can create multiple surveys. These surveys can be shared to the customers through multiple channels like WhatsApp, Email, SMS. Once customers receive the ...
    • Share Survey Via Email

      Share Survey Via Email share via Email is used when you want to send surveys directly to known respondents through their email addresses. This option is ideal for collecting feedback like NPS, CSAT, or post-interaction surveys. Use it when you need ...
    • How to create unique trackable links for surveys sent via external email/sms services

      This feature will help you to track respondents while using external email/sms provider by generating unique links for each responder. You will need to upload the data in contacts section before using this feature. Let's suppose you already have a ...
    • How to create custom email template using HTML

      This feature will help you to create a custom email template using HTML. You can use this to create your beautiful email templates to match your brand theme. In case you already have a design template that you use for your brand and you want to use ...
    • Share Survey

      Now that you have created your survey, your survey is ready to be shared! Share your survey via Email, on Social Media, using an Anonymous Link, or by a QR Code. View the sharing options on the Share Survey page on your build or click the sharing ...