Go to

Webhooks

SurveyLab provides integration via webhooks. Thanks to this functionality you can transfer data or trigger the survey with any event (e.g. conversation finished on online chat) in the other system. This way you can integrate with any tool or service (e.g. CRM, eShop, online chat).

Add respondent to the contact list

This functionality allows you to dynamically update contacts list for a selected collector. This feature works both with closed and active collectors. If a collector is active, system will automatically send survey invitations for the new contacts that have been added.

Status codes

The statuses are returned using the standard HTTP error code syntax.

CodeDescription
200OK. The request was successful.
400Bad request. The request was incorrect. Invalid API token.
401Unauthorized. You attempt to authenticate with an invalid username or API key.
404Not Found. The resource doesn’t exist.
429Too many requests.
500Internal Server Error. Please try again or contact our support.

URL structure

https://www.surveylab.com/api.php?apiToken=[TOKEN]&cId=[COLLECTOR ID]&email=[RESPONDENT EMAIL]&crk=[CRK DATA]&referrer=[RESPONDENT DATA]&language=[SURVEY LANGUAGE]

Error communicates

Action successful : {“status”:true,”notification”:”Action process correctly”}
Action failed : {“status”:false,”notification”:”Action failed”}

Available parameters

You can use all or only selected parameters. apiToken, cId, email, and crk are required.

ParameterExampleDescription
apiTokenapiToken=[TOKEN]Required. Security token.
cIdcld=[COLLECTOR ID]Required. Collector ID.
emailemail=[RESPONDENT EMAIL]Required. Respondent email.
crkcrk=[CRK DATA]Required. Unique response Key (crk).
referrerreferrer=[RESPONDENT DATA]Optional. Referrer can contain any data or information.
languagelanguage=[SURVEY LANGUAGE]Optional. Survey language (ISO format).
phonephone=[PHONE]Optional. Phone number.
firstNamefirstName=[NAME]Optional. Name.
lastNamelastName=[SURNAME]Optional. Surname.
custom1custom1=[CUSTOM1]Optional. Custom data 1.
custom2custom2=[CUSTOM2]Optional. Custom data 2.
custom8custom8=[CUSTOM8]Optional. Custom data 8.

Example

https://feedback.surveylab.com/api.php?apiToken=yadfhjs&cId=8379821739721&email={{ticket.requester.email}}&crk={{ticket.id}}&referrer={{ticket.url}}&language={{ticket.requester.language}}

NOTE. Response Key (crk) has to be unique for each survey invitation.

To get an API token :

  1. Go to account [ ] Settings.
  2. Select Integrations.
  3. API token will be available in the section SURVEY API TOKEN.
    API token

Added data is available in survey reports export files (detailed report, all formats).

NOTE. Webhook is an instant notification about a certain event eg. chat closed or ticket closed. This kind of notification can be transferred with HTTP / HTTPS protocol. You can read more about webhooks on Wikipedia or Requestbin.

* Functionality is available in the Professional and Enterprise plans.