Skip to main content
POST
/
surveys
/
{surveyNumber}
/
link
Generate Survey Link
curl --request POST \
  --url https://api.publisher.miratsquanto.com/api/v1/publisher/surveys/{surveyNumber}/link \
  --header 'Content-Type: application/json' \
  --header 'publisher-authentication-key: <api-key>' \
  --data '
{
  "authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU"
}
'
{
  "testLink": "https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=1&r=xxxxx",
  "liveLink": "https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=0&r=xxxxx"
}
Generate a link for a specific survey.

Endpoint

POST /surveys/{surveyNumber}/link

Headers

{
  "publisher-authentication-key": "your_project_secret_key"
}
Note: The publisher-authentication-key header corresponds to your Secret Key. The authorizationKey in the request body corresponds to your Web API Key.

Request Body

{
  "authorizationKey": "DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU"
}

Response

{
  "testLink": "https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=1&r=xxxxx",
  "liveLink": "https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=0&r=xxxxx"
}

Error Response

{
  "message": "internal server error",
  "code": 500,
  "success": false
}

Authorizations

publisher-authentication-key
string
header
required

Send your Secret Key using the publisher-authentication-key header. This header is required for every request.

Path Parameters

surveyNumber
integer
required
Example:

17633744316785364

Body

application/json

Payload for endpoints that only require the Web API Key in the request body.

authorizationKey
string
required

Web API Key obtained from the Mirats Publisher Platform.

Example:

"DqcInvhIFAl5WtUNwihFUIgUH77EL2hTNRU"

Response

Successful response with generated links

Example:

"https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=1&r=xxxxx"

Example:

"https://api.publisher.miratsquanto.com/start?pid=someencryptedid&org=someencryptedid&sId=someencryptedid&supId=someencryptedid&orgId=someencryptedid&sn=100000001&t=0&r=xxxxx"