Skip to main content

Survey entry link

Survey entry link is generated on inBrain side and returned as part of Fetch top surveys for user API endpoint response.

  • Used to load the survey for the particular user
  • Returned link has hash signature applied and is supposed to be used without modification
  • Optionally, the link can be extended by partner by appending mid query parameter

Although the partner does not need to be fully aware of how entry link is constructed, the link template and correspondent parameters are given below for full transparency.

Template

https://surveys.inbrain.ai/supplier-surveys/{surveyId}?sid={sid}&userId={userId}&placementId={placementId}&mid={mid}&hash={hash}

Parameters

ParameterSourceDescriptionRequired
surveyIdpathId of the surveytrue
sidqueryId of the partnertrue
userIdqueryId of the usertrue
placementIdqueryId of the placement. The same value passed to Fetch top surveys for user API endpoint, if any.false
midqueryParameter that can be used for partner specific data
- The value of this parameter is returned back to the partner in redirect links and S2S callbacks
- Accepts only alphanumeric characters + underscore and dash
false
hashqueryHash signature to prevent unauthorized use and link manipulation by third partiestrue

Example

https://surveys.inbrain.ai/supplier-surveys/Q2ltdWxh?sid=17&userId=someApiUserId&placementId=0ddd2bb1-8f2e-4e95-a449-61deeaca37ed&hash=dace7b8f74d5c0deed7bb6d9388114df0ccbfa684924328913677ab496486c95

Entry link signature

As stated above, the survey entry links returned in the response of Fetch top surveys for user API endpoint already have a hash signature applied for ease of use. That hash signature on the link is applied on the inBrain side following the Link signing process.

Entry link modification

The partner has the ability to modify the returned survey entry link to pass extra parameters like mid to inBrain. In such case, the partner is responsible for signing the modified entry link before letting the user open the survey using that specific link. The actions needed to append extra parameters on the entry link and re-sign it are given below.

  1. Remove the hash signature parameter from the link
  2. Append extra parameters to the unsigned link
  3. Apply hash signature on the modified link following the Link signing process
info

The mid parameter is the only extra parameter supported currently, but please note that in future versions inBrain may introduce additional parameters.