NAV
cURL python php javascript

Introduction

Welcome to the Mindful Feedback REST API Reference version 1.5.8

The Feedback API allows you to programmatically add survey interactions, retrieve results and even perform surveys via your own applications.

This page details all the API resources you will need to create powerful integrations with Mindful Feedback.

Using the API

Base URL

All API calls referenced in this document can be used with one of the following base URLs:

https://surveydynamix.com/api

https://us2.surveydynamix.com/api

https://au1.surveydynamix.com/api

https://eu1.surveydynamix.com/api

https://ca1.surveydynamix.com/api

https://demo.surveydynamix.com/api

Make sure to use the base URL with the same domain as the URL you use to log into Mindful Feedback. Throughout this documentation, the URL being used for examples is https://surveydynamix.com/api, but you may need to use a different URL.

To get the api endpoint for an individual request, append the URI listed in the request details to the base URL.

The Mindful Feedback REST API is served over HTTPS. To ensure data privacy, unencrypted HTTP is not supported.

Authentication

OAuth2

The Feedback API supports authorisation code grant and personal access token methods. This documentation assumes you are already familiar with OAuth2 grant flows.

Authorisation Code Grant

To authorise API calls using an Authorisation Code, use this code:

# Using an access token, pass the token as part of the authorisation header with each request
curl "api_endpoint_here" \
  -H "Authorization: Bearer {Token}"

import requests
headers = {
    'Authorization': 'Bearer {Token}',
}
response = requests.get('https://api_endpoint_here', headers=headers)
print(response.content)

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api_endpoint_here');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = array();
$headers[] = 'Authorization: Bearer {Token}';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://api_endpoint_here";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Bearer {Token}");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Make sure to replace {Token} with the access token.

Mindful Feedback users with admin privileges can create OAuth clients by choosing the Integrations tab on the Customer Settings page.

We use the standard OAuth2 authorisation code flow. To start, the client application must redirect the user to the Mindful authorisation endpoint at http://surveydynamix.com/oauth/authorize. The redirect must include the following parameters:

Name Description
response_type This will be set to code.
client_id This is listed in the OAuth Clients table after you have created a client.
redirect_uri This must match the redirect URL that was specified when creating the client and will be used for the callback endpoint when the user grants access.
refresh_token The token used to refresh access token.

Once the user has been redirected, they will be presented with a form allowing them to either approve or cancel the request. If the request is approved, the user will be redirected back to the redirect URL. This redirect will include a authorisation code.

To convert the authorisation code into an access token, the client application must make a final POST request to the access token endpoint at http://surveydynamix.com/oauth/token with the following parameters:

This request will return a JSON response containing the access_token attribute.

To authenticate using an access token add an authorisation header to each request in the following format:

Authorization: Bearer {access token}

Refresh Access Tokens

To refresh a access token using a refresh_token use this code:

curl -X POST   "https://surveydynamix.com/api/oauth/token" \
    -d "grant_type=refresh_token" \
    -d "refresh_token=xxxxxx" \
    -d "client_id=xxxxxx" \
    -d "client_secret=xxxxxx"
var url = "https://surveydynamix.com/api/oauth/token";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/oauth/token');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "grant_type=refresh_token&refresh_token=xxxxxx&client_id=xxxxxx&client_secret=xxxxxx");
curl_setopt($ch, CURLOPT_POST, 1);

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

data = 'grant_type=refresh_token&refresh_token=xxxxxx&client_id=xxxxxx&client_secret=xxxxxx'

response = requests.post('https://surveydynamix.com/api/oauth/token', data=data)
print(response.content)

URI

/oauth/token

Method

POST

Parameters

Name Description
grant_type The Refresh Token grant type is used by clients to exchange a refresh token for an access token when the access token has expired. To retrieve a new access token using the refresh token, set this field to refresh_token
refresh_token The token used to refresh access token.
client_id This is listed in the OAuth Clients table after you have created a client.
client_secret This is listed in the OAuth Clients table and should be kept secure.

Personal Access Tokens

To authorise API calls using a Personal Access Token, use this code:

# Using personal access token auth, pass the token as part of the authorisation header with each request
curl "api_endpoint_here" \
  -H "Authorization: Bearer {Token}"

import requests
headers = {
    'Authorization': 'Bearer {Token}',
}
response = requests.get('https://api_endpoint_here', headers=headers)
print(response.content)

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api_endpoint_here');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

$headers = array();
$headers[] = 'Authorization: Bearer {Token}';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://api_endpoint_here";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Bearer {Token}");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Make sure to replace {Token} with your personal access token.

Mindful users with admin privileges can create personal access tokens to authenticate API calls by choosing the Integrations tab on the Customer Settings page.

Personal access tokens are shown to the user only once upon creation and should be stored securely.

To authenticate using a personal access token add an authorisation header to each request in the following format:

Authorization: Bearer {personal access token}

Basic Authentication

To authorise API calls using Basic Authentication, use this code:

# Using Basic Auth, pass the default API credentials with each API call
curl "api_endpoint_here" \
  -u CustomerUUID:AuthToken
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'api_endpoint_here');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'CustomerUUID' . ':' . 'AuthToken');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://api_endpoint_here',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
var url = "https://api_endpoint_herese";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Make sure to replace CustomerUUID:AuthToken with your specific api credentials.

Basic Authentication is the simplest authentication method that Mindful offers. You will use your customer Uuid as the username and your generated auth token as the password.

You can find your customer authentication credentials on the Customer Settings page under General Settings.

username: Customer Uuid

password: Auth Token

Rate Limiting

The Mindful Feedback API applies rate limiting on a per-customer basis to prevent excessive usage. The rate limit for most API methods is 120 requests per minute. When a rate limit is exceeded, the API returns an HTTP 429 response.

When a request is made to Feedback, the response will contain the following headers to indicate how close the application is to the limit and when the rate limit counter will reset.

Header Description
X-RateLimit-Limit The maximum amount of requests you are allowed to send in the specified interval.
X-RateLimit-Remaining The amount of requests you can still make in the current interval before exceeding the limit.
X-RateLimit-Reset A unix timestamp indicating when the rate limit counter will reset to 0. Note that this header is only present when the rate limit has been exceeded.

Interactions

Interaction resources follow this example format in JSON

{
"id": 24062,
"uuid": "7aa870f0-046f-11e7-9cc9-9de741d6e753",
"survey_id": 493,
"phone_number": "+61409999999",
"email": "john.bloggs@example.com",
"survey_type": "inbound",
"scheduled_at": "2016-02-19 10:30:02",
"external_ref": "example-id-235i129",
"updated_at": "2016-02-19 10:30:02",
"created_at": "2016-02-19 10:30:02",
"call_type": "support",
"agent_id": "nevilr",
"status": "Not Started",
"web_link": "https://surveydynamix.com/web_survey/<uuid>",
"respondent_language":"en-AU"
}

An interaction resource represents a request for a survey respondent to complete a specified survey. The status of all interactions with survey respondents are tracked by Mindful Feedback using the interaction resource. The interaction resource API is used to create new survey interactions, update existing interactions with new information, and view the status of existing interactions.

JSON object contains the following information:

Name Description
id A unique interaction ID
uuid A unique interaction UUID
survey_id The ID of the survey that the interaction belongs to
phone_number The contact phone number that will be used to perform outbound voice or SMS interactions
email The email address of the survey respondent if the survey is a web survey distributed via email
survey_type The medium by which the interaction will be performed.
scheduled_at A timestamp scheduling when the interaction should be performed by Mindful Feedback
external_ref This is the reference used to link the survey interaction with the contact center interaction. Often this value is set to the contact center interaction ID.
call_type This is used to categorize survey interactions by the contact center call type. Often this value is set to the Queue Name
agent_id The agent ID of a user in Mindful Feedback, used for report aggregation
status A text field describing the current status of the interaction at point of retrieval. A list of statusus can be found below this table
web_link Web link of the survey interaction.
weblink_short Short web link of the survey interaction.
unsubscribe_link_short Short URL to unsubscribe from Mindful Feedback surveys. Only available on SMS type surveys or when a short URL is explicitly requested when generating an interaction via API.
restricted Interaction was restricted (not sent). This could be due to a license restriction on your Mindful Feedback account, the respondent being in the Do Not Call list, or the interaction breaching a Survey Restriction.
respondent_language Language of the survey respondent. This is used to ensure the survey is played/displayed in the correct language.
updated_at Timestamps specifying when the interaction was last updated
created_at Timestamps specifying when the interaction was created
updatable Updatable is a value returned from the interactions API indicating whether or not this interaction can be updated. If the interaction has started, completed, ended or has a sent_at value, it cannot be updated. It return true for a created interaction that has not yet started, completed, ended or has a sent_at value

status values that can be returned

Description
Sent to respondent <#> <minutes/hours/weeks/month> ago
Completed <#> <minutes/hours/weeks/month>ago
Abandoned <#> <minutes/hours/weeks/month> ago
Not started
In progress
Prevented due to survey restriction <#> <minutes/hours/weeks/month> ago

Get Interactions List

This code will return 5 outbound interactions from the survey with ID = 52:

curl -X GET   "https://surveydynamix.com/api/interactions?survey_id=52&_limit=5&survey_type=outbound" \
    -u Customer_UUID:Auth_Token
import requests
response = requests.get("https://surveydynamix.com/api/interactions?survey_id=52&_limit=5&survey_type=outbound", 
  auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response)
  $username = Customer_UUID;
  $password = Auth_Token;
  $URL = "https://surveydynamix.com/api/interactions?survey_id=52&_limit=5&survey_type=outbound";
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL,$URL);
  curl_setopt($ch, CURLOPT_TIMEOUT, 30); //timeout after 30 seconds
  curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
  curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
  curl_setopt($ch, CURLOPT_USERPWD, "$username:$password");
  $result=curl_exec ($ch);
  $status_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);   //get status code
  print_r($result);
  curl_close ($ch); 
  var url = "https://surveydynamix.com/api/interactions?survey_id=52&_limit=5&survey_type=outbound";

  var xhr = new XMLHttpRequest();
  xhr.open("GET", url);

  xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

  xhr.onreadystatechange = function () {
    if (xhr.readyState === 4) {
        console.log(xhr.status);
        console.log(xhr.responseText);
    }};

  xhr.send();

Gets a list of survey interactions as a JSON array of interaction resources.

URI

/interactions

Method

GET

Parameters

Name Description Allowed Values Default
survey_id The ID of the survey the interactions belong to. Found on the top right of the relevant survey page. integer none
_limit The number of matching interactions to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit interactions are found. integer 0
_order_by The interaction attribute to order the results by. This attribute only has an effect if the _order attribute is also set. If _order is not set, current interaction status will be used. 'scheduled_at', 'completed_at', 'started_at', 'id' 'id'
_order The order that results should be returned in. ‘ASC’: earliest first or ‘DESC’: most recent first Default order is by current interaction status.
_has_responses If true, only returns interactions that have at least one response. If false, only returns interactions with zero responses. boolean NONE
_include_responses Whether or not to include question responses in JSON. When true, response objects (see Responses) will be appended in an array under the “responses” field. boolean FALSE
_include_data Whether or not to include interaction data in JSON. When true, interaction data objects (see Interaction Data) will be appended in an array under the “interaction_data” field. boolean FALSE
email The email address of the survey respondent, to be used in sending email type surveys. An email address empty
phone_number The phone number of the survey respondent, to be used in voice/sms type surveys. A 12 character string in the proper phone number format empty
survey_type The survey medium to use. inbound, outbound, sms, email, web, websms none
scheduled_at The time at which an outbound voice, sms,websms, or email survey is scheduled to be sent. dateTime none
external_ref A standard string field for referencing external system IDs. Single/Multiple values with comma seperated string none
call_type A standard string field for report aggregation string none
agent_id A string corresponding to an agent ID for report aggregation. string none
started Whether or not the interaction has started boolean none
completed Whether or not the interaction has completed boolean none
survey_ended Whether or not the survey was successfully completed within the interaction boolean none
start_date Only return interactions scheduled for after the specified start date Date/time string none
end_date Only return interactions scheduled for before the specified end date Date/time string none
_updated_after Filter response to include interactions that were updated or created after the specified timestamp. UTC Timestamp (YYYY-MM-DD HH:mm:ss) none

Add New Interaction

This code will create an email interaction for respondent@example.com on survey with ID = 52 to be sent in 5 minutes:

curl -X POST   "https://surveydynamix.com/api/interactions" \
    -d "survey_id=52" \
    -d "survey_type=email" \
    -d "email=respondent@example.com" \
    -d "scheduled_at=Now + 5 minutes" \
    -u Customer_UUID:Auth_Token
  $ch = curl_init();

  curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions');
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, "survey_id=52&survey_type=email&email=respondent@example.com&scheduled_at=Now + 5 minutes");
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

  $headers = array();
  $headers[] = 'Content-Type: application/x-www-form-urlencoded';
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

  $result = curl_exec($ch);
  if (curl_errno($ch)) {
      echo 'Error:' . curl_error($ch);
  }
  curl_close ($ch);
  import requests
  data = 'survey_id=52&survey_type=email&email=respondent@example.com&scheduled_at=Now + 5 minutes'
  response = requests.post('https://surveydynamix.com/api/interactions', auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
  print(response.content)
var url = "https://surveydynamix.com/api/interactions";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "survey_id=52&survey_type=email&email=respondent@example.com&scheduled_at=Now + 5 minutes";

xhr.send(data);

Creates a survey interaction with the specified parameters.

URI

/interactions

Method

POST

Parameters

Name Description Allowed Values Default
survey_id The ID of the survey you wish to add the interaction to. Found on the top right of the relevant survey page. integer No default; Parameter required
_force_new Force a new interaction to be added even if a pending interaction with the same phone number and survey ID exists. boolean FALSE
phone_number The phone number to be used in surveying. Required for voice and sms interactions. A 12 character string in the proper phone number format empty
phone_connection_id The ID of the phone connection you wish the interaction to use. Valid for voice/sms interactions. integer empty
email The email address of the survey respondent. Required for email interactions. An email address empty
survey_type The survey medium to use. inbound, outbound, sms, web, email, websms web
scheduled_at The time at which an outbound voice, sms, or email survey is scheduled to be sent. Or the time after which an inbound survey is allowed to start. dateTime string. Accepts times in standard UTC format and in the format “Now + X Days/Hours/Minutes” now
external_ref A standard string field for referencing external system IDs with single or multiple references. string empty
call_type A standard string field for report aggregation string empty
agent_id A string corresponding to an agent ID. Will allow an agent user with this ID to see the interaction in the dashboard, and will be used to aggregate for agent rankings. string empty
respondent_language The specific language of the survey respondent. This is used to select survey prompts in multi-language surveys and to determine what language and dialect to use when automatically transcribing voice responses. see Supported Languages determined by region
_shorten_urls Generate a short URL for the start survey link and unsubscribe link. boolean FALSE
Custom Metadata parameters not otherwise listed in this table will be added as interaction data resources associated with the created interaction. The key must only include alphanumeric characters and underscores and must start with a letter. The value may be any string. none

Get Specific Interaction(s)

This code will return a JSON object for the interaction resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/interactions/891234" \
    -u Customer_UUID:Auth_Token
import requests
response = requests.get("https://surveydynamix.com/api/interactions/891234", 
  auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interactions/891234";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

This code will return JSON objects for the interaction resources with external_ref values of 891234 and 135900:

curl -X GET   "https://surveydynamix.com/api/interactions?external_ref=891234,135900" \
    -u Customer_UUID:Auth_Token
import requests
response = requests.get("https://surveydynamix.com/api/interactions?external_ref=891234,135900", 
  auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions?external_ref=891234,135900');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interactions?external_ref=891234,135900";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Returns the JSON object for an interaction resource specified by either:
- an {interaction_id}
- one or more {external_ref} values, separated by commas

URI

/interactions/{interaction_id}
/interactions?external_ref={external_ref_1},{external_ref_2},...{external_ref_n}

Method

POST

Parameters

Name Description Allowed Values Default
_include_responses Whether or not to include question responses in JSON. When true, response objects (see Responses) will be appended in an array under the “responses” field. boolean FALSE
_include_data Whether or not to include interaction data in JSON. When true, interaction data objects (see Interaction Data) will be appended in an array under the “interaction_data” field. boolean FALSE

Delete Interaction

This code will delete the interaction resource with ID = 891234:

curl -X DELETE   "https://surveydynamix.com/api/interactions/891234" \
    -u Customer_UUID:Auth_Token
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.delete('https://surveydynamix.com/api/interactions/891234', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
var url = "https://surveydynamix.com/api/interactions/891234";

var xhr = new XMLHttpRequest();
xhr.open("DELETE", url);

xhr.setRequestHeader("Authorization", "Basic Auth_Token");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Deletes an interaction resource specified by {interaction_id}.

URI

/interactions/{interaction_id}

Method

DELETE

Parameters

None

Update Interaction

This code will update the interaction resource with ID = 891234 using a modified JSON object:

curl -X PUT   "https://surveydynamix.com/api/interactions/891234" \
    -d "interaction={\"id\":891234,\"survey_id\":52,\"phone_number\":\"\",\"survey_type\":\"email\",\"scheduled_at\":\"2017-05-04 02:53:49\",\"external_ref\":\"\",\"created_at\":\"2017-05-04 02:53:49\",\"updated_at\":\"2017-05-04 02:54:55\",\"call_type\":\"\",\"agent_id\":\"\",\"uuid\":\"e67fa4e0-3074-11e7-8efe-116b9b2f6833\",\"email\":\"rileyneville@gmail.com\",\"status\":\"Completed 1 hour ago\",\"weblink\":\"https:\/\/surveydynamix.com\/web_survey\/e67fa4e0-3074-11e7-8efe-116b9b2f6833\"}" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234";

var xhr = new XMLHttpRequest();
xhr.open("PUT", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = 'interaction={"id":891234,"survey_id":52,"phone_number":"","survey_type":"email","scheduled_at":"2017-05-04 02:53:49","external_ref":"","created_at":"2017-05-04 02:53:49","updated_at":"2017-05-04 02:54:55","call_type":"","agent_id":"","uuid":"e67fa4e0-3074-11e7-8efe-116b9b2f6833","email":"rileyneville@gmail.com","status":"Completed 1 hour ago","weblink":"https://surveydynamix.com/web_survey/e67fa4e0-3074-11e7-8efe-116b9b2f6833"}';

xhr.send(data);
import requests

data = 'interaction={"id":891234,"survey_id":52,"phone_number":"","survey_type":"email","scheduled_at":"2017-05-04 02:53:49","external_ref":"","created_at":"2017-05-04 02:53:49","updated_at":"2017-05-04 02:54:55","call_type":"","agent_id":"","uuid":"e67fa4e0-3074-11e7-8efe-116b9b2f6833","email":"rileyneville@gmail.com","status":"Completed 1 hour ago","weblink":"https:\/\/surveydynamix.com\/web_survey\/e67fa4e0-3074-11e7-8efe-116b9b2f6833"}'

response = requests.post('https://surveydynamix.com/api/interactions/891234', auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "interaction={\"id\":891234,\"survey_id\":52,\"phone_number\":\"\",\"survey_type\":\"email\",\"scheduled_at\":\"2017-05-04 02:53:49\",\"external_ref\":\"\",\"created_at\":\"2017-05-04 02:53:49\",\"updated_at\":\"2017-05-04 02:54:55\",\"call_type\":\"\",\"agent_id\":\"\",\"uuid\":\"e67fa4e0-3074-11e7-8efe-116b9b2f6833\",\"email\":\"rileyneville@gmail.com\",\"status\":\"Completed 1 hour ago\",\"weblink\":\"https://surveydynamix.com/web_survey/e67fa4e0-3074-11e7-8efe-116b9b2f6833\"}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Updates a specified interaction with new properties supplied in a JSON object.

Note that the new JSON object must have the same ID as the resource you are attempting to update.

URI

/interactions/{interaction_id}

Method

PUT

Parameters

Name Description Allowed Values Default
interaction A JSON object representing the interaction in the same format as returned by get and create requests with the fields to update altered in text. JSON String No default; Parameter required

Get Responses List By Interaction

This code will return a list of survey response resources associated with the interaction resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/interactions/891234/responses" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234/responses";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234/responses');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/interactions/891234/responses', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of survey responses for the requested interaction.

This works the same as a GET call to the /responses resource with the interaction_id parameter set to {interaction_id}`

URI

/interactions/{interaction_id}/responses

Method

GET

Parameters

See Get Responses List.

Get Interaction Data List By Interaction

This code will return a list of interaction data resources associated with the interaction resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/interactions/891234/interaction_data" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234/interaction_data";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234/interaction_data');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/interactions/891234/interaction_data', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of interaction data for the requested interaction

This works the same as a GET call to the /interaction_data resource with the interaction_id parameter set to {interaction_id}

URI

/interactions/{interaction_id}/interaction_data

Method

GET

Parameters

See Get Interaction Data List.

Start Survey

This code will start the survey for interaction with ID = 891234

curl -X POST   "https://surveydynamix.com/api/interactions/891234/start_survey" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234/start_survey";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
xhr.setRequestHeader("Content-Length", "0");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234/start_survey');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.post('https://surveydynamix.com/api/interactions/891234/start_survey', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

The request will return a JSON object with the following example structure:

{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 0,
  "current_question":{
    #question resource object for current question if survey_completed = 0
  }
}

Starts a web based survey (if not already started) and returns lists of the current survey prompts and sound files if relevant. Also returns details of current question if a question response is expected.

URI

/interactions/{interaction_id}/start_survey

Method

POST

Parameters

None

Submit Survey Response

This code will submit the response "Yes" to the survey for interaction with ID = 891234

curl -X POST   "https://surveydynamix.com/api/interactions/891234/submit_response" \
    -d "response=Yes" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234/submit_response";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "response=Yes";
xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234/submit_response');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "response=Yes");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

data = 'response=Yes'

response = requests.post('https://surveydynamix.com/api/interactions/891234/submit_response', auth=HTTPBasicAuth(Customer_UUID, Auth_Token),  data=data)
print(response.content)

The request will return a JSON object with the following example structure:

{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 0,
  "current_question":{
    #question resource object for current question if survey_completed = 0
  }
}

Submits a response to the current survey question, evaluates the response, then returns lists of the current survey prompts and sound files if relevant. Also returns details of current question if a question response is expected. If the interaction has not yet started, this will redirect to the Start Survey call instead.

URI

/interactions/{interaction_id}/submit_response

Method

POST

Parameters

Name Description Allowed Values Default
response The string response sent by the survey respondent. string or array (i.e [0,1] if multichoice) No default; Parameter required

Abandon Survey

This code will finish the survey for interaction with ID = 891234

curl -X POST   "https://surveydynamix.com/api/interactions/891234/abandon_survey" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/interactions/891234/abandon_survey";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));
xhr.setRequestHeader("Content-Length", "0");

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interactions/891234/abandon_survey');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests
response = requests.post('https://surveydynamix.com/api/interactions/891234/abandon_survey', auth=HTTPBasicAuth(Customer_UUID, Auth_Token), )
print(response.content)

The request will return a JSON object with the following example structure:

{
  "prompts":[
     "This is the first survey prompt text",
     "This is the second survey prompt text",
     # ...
     "This is the Nth survey prompt text",],
  "sound_files":[
     "http://First_sound_file_url.mp3",
     "http://Second_sound_file_url.mp3",
     # ...
     "http://Nth_sound_file_url.mp3",],
  "survey_completed": 1
}

Abandons or completes a web based survey and returns lists of the current survey prompts and sound files if relevant.

URI

/interactions/{interaction_id}/abandon_survey

Method

POST

Parameters

None

Interaction Data

Interaction data resources follow this example format in JSON

{
"id": 12214125,
"interaction_id": 24062,
"custom_key": "VALUE",
"custom_value": "GOLD",
"created_at": "2016-02-19 10:30:02",
"updated_at": "2016-02-19 10:30:02"
}

An interaction data resource details a custom key value pair associated with a specific survey interaction. These can be used to tag interactions with specific data for reporting purposes.

The API can be used to retrieve lists of Interaction Data objects related to a specific interaction or survey.

JSON object contains the following information

Name Description
id A unique interaction data ID.
interaction_id A unique ID for the interaction.
custom_key ---
custom_value ---
updated_at Timestamps specifying when the key value pair was last updated
created_at Timestamps specifying when the key value pair was created

Get Interaction Data List

This code will return a JSON array of interaction data resources associated with the interaction resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/interaction_data?interaction_id=891234" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.get('https://surveydynamix.com/api/interaction_data?interaction_id=891234', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data?interaction_id=891234');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

var url = "https://surveydynamix.com/api/interaction_data?interaction_id=891234";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

This code will return a JSON array containing just the interaction data object with custom key = foo for the interaction resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/interaction_data?interaction_id=891234&custom_key=foo" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.get('https://surveydynamix.com/api/interaction_data?interaction_id=891234&custom_key=foo',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data?interaction_id=891234&custom_key=foo');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interaction_data?interaction_id=891234&custom_key=foo";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Gets a list of interaction data resources associated with a survey or interaction resource.

URI

/interaction_data

Method

GET

Parameters

Name Description Allowed Values Default
survey_id The ID of the survey resource the interaction data is associated with. integer none
interaction_id The ID of the interaction resource the interaction data is associated with. integer none
_limit The number of matching interaction data resources to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit interaction data resources are found. integer 0
_order The order that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first
_order_by The attribute to order the results by. 'id','custom_value','custom_key' 'id'
custom_key The custom key of the interaction data. A string consisting only of alphanumeric characters and underscores and starting with a letter none

Get Specific Interaction Data

This code will return a JSON object for the interaction data resource with ID = 12214125:

curl -X GET   "https://surveydynamix.com/api/interaction_data/12214125" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.get('https://surveydynamix.com/api/interaction_data/12214125',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data/12214125');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interaction_data/12214125";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Returns the JSON object for an interaction data resource specified by {interaction_data_id}.

URI

/interaction_data/{interaction_data_id}

Method

GET

Parameters

None

Set Interaction Data

This code will add the custom key value pair foo=bar to the interaction resource with ID = 891234:

curl -X POST   "https://surveydynamix.com/api/interaction_data" \
    -d "interaction_id=891234" \
    -d "custom_key=foo" \
    -d "custom_value=bar" \
    -u Customer_UUID:Auth_Token
import requests

data = 'interaction_id=891234&custom_key=foo&custom_value=bar'

response = requests.post('https://surveydynamix.com/api/interaction_data',auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "interaction_id=891234&custom_key=foo&custom_value=bar");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interaction_data";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "interaction_id=891234&custom_key=foo&custom_value=bar";

xhr.send(data);

This code will update the existing custom key value pair to foo=baz:

curl -X POST   "https://surveydynamix.com/api/interaction_data" \
    -d "interaction_id=891234" \
    -d "custom_key=foo" \
    -d "custom_value=baz" \
    -u Customer_UUID:Auth_Token
import requests

data = 'interaction_id=891234&custom_key=foo&custom_value=baz'

response = requests.post('https://surveydynamix.com/api/interaction_data',auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "interaction_id=891234&custom_key=foo&custom_value=baz");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interaction_data";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "interaction_id=891234&custom_key=foo&custom_value=baz";

xhr.send(data);

Adds a custom key value pair associated with a specified interaction.

If the custom key already exists for that interaction, it is overwritten with the new value.

The updated interaction data JSON object will be returned.

URI

/interaction_data

Method

POST

Parameters

Name Description Allowed Values Default
interaction_id The ID of the interaction resource the interaction data is associated with. integer No default; Parameter required
custom_key The custom key of the interaction data. A string consisting only of alphanumeric characters and underscores and starting with a letter No default; Parameter required
custom_value The custom value of the interaction data. string No default; Parameter required

Delete Interaction Data

This code will delete the interaction data resource with ID = 12214125:

curl -X DELETE   "https://surveydynamix.com/api/interaction_data/12214125" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.delete('https://surveydynamix.com/api/interaction_data/12214125',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/interaction_data/12214125');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/interaction_data/12214125";

var xhr = new XMLHttpRequest();
xhr.open("DELETE", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Deletes an interaction data resource specified by {interaction_data_id}.

URI

/interaction_data/{interaction_data_id}

Method

DELETE

Parameters

None

Responses

Response resources follow this example format in JSON

{
"id": 124890182,
"interaction_id": 24062,
"question_id": 879,
"response": "Lorem Ipsum dolor sit.",
"submitted_at": "2016-02-19 10:30:02",
"recording_url": "<Twilio Voice Recording URL>",
"response_type": "text",
"question_label": "<Question label for reporting use>"
}

A response resource details the response given by a survey respondent to a question during an interaction. The complete results of a survey interaction are represented by a list of survey response objects for each question in the survey.

The response resource API is used to retrieve detailed survey results from Mindful Feedback and can be queried by survey, question, or specific interaction.

JSON object contains the following information

Name Description
id A unique Response ID.
interaction_id A unique ID for the interaction.
question_id A unique ID for the question
question_label Question label for reporting use
response A string containing response given by the survey respondent
response_type the type of response it was (text, yesno, nps, number, or multichoice)
recording_url URL/link to the Twilio voice recording.
submitted_at Timestamps specifying when the response was submitted

Get Responses List

This code will return a JSON array of the most recent 100 response resources associated with the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/responses?survey_id=52&_limit=100&_order=DESC" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/responses?survey_id=52&_limit=100&_order=DESC";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/responses?survey_id=52&_limit=100&_order=DESC');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/responses?survey_id=52&_limit=100&_order=DESC',
auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of survey responses associated with a survey, question, or interaction resource.

URI

/responses

Method

GET

Parameters

Name Description Allowed Values Default
survey_id The ID of the survey resource the responses is associated with. integer none
question_id The ID of the question resource the responses is associated with. integer none
interaction_id The ID of the interaction resource the responses is associated with. integer none
_limit The number of matching responses to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit responses are found. integer 0
_order_by The attribute to order the results by. 'submitted_at','id' 'id'
_order The order that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first
response Filters results to only where the response exactly equals this string. string none
response_contains Filters results to where the response contains this string string none
start_date Only return responses submitted after the specified start date Date/time string none
end_date Only return responses submitted before the specified end date Date/time string none

Get Specific Response

This code will return a JSON object for the response resource with ID = 124890182:

curl -X GET   "https://surveydynamix.com/api/responses/124890182" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/responses/124890182";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/responses/124890182');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/responses/124890182',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Returns the JSON object for a response resource specified by {response_id}.

URI

/responses/{response_id}

Method

GET

Parameters

None

Surveys

Survey resources follow this example format in JSON

{
  "id": 52,
  "name": "Test survey",
  "description": "Test survey for development",
  "email_from_address": "test@surveydynamix.com",
  "email_from_name": "Mindful Feedback API",
  "email_subject_prompt": {
      "text": {
          "default": "Test email survey"
      }
  },
  "greeting_prompt": {
      "text": {
          "default": "Thanks for taking the time to respond to our survey!"
      },
      "sound_files": {
          "default": "<sound file url>.mp3"
      }
  },
  "instructions_prompt": {
      "text": {
          "default": "We'd love to get some feedback on your recent customer experience!"
      },
      "sound_files": {
          "default": "<sound file url>.mp3"
      }
  },
  "closing_prompt": {
      "text": {
          "default": "Thank you for participating. Goodbye."
      },
      "sound_files": {
          "default": "<sound file url>.mp3"
      }
  },
  "invalid_response_prompt": {
      "text": {
          "default": ""
      }
  },
  "inbound_number": "+61999999999",
  "outbound_number": "+61999999999",
  "sms_number": "+61888888888",
  "rediect_timeout": "3200"
}

A survey resource details the core properties of a survey within SDX.

The survey query API can be used to get detailed information about a survey for third party reporting or API response submission

JSON object contains the following information

Name Description
id A unique survey ID.
name The name of the survey.
description Description of the survey
email_from_address Email from details
email_from_name Email name details
email_subject_prompt Email subject text prompt
greeting_prompt Greeting prompts
instructions_prompt Instructions prompts
closing_prompt Closing prompts
invalid_response_prompt The invalid response prompt
inbound_number Voice connection number for inbound
outbound_number Voice connection number for outbound
sms_number SMS connection number for SMS
redirect_timeout ---

Get Surveys List

This code will return a JSON array of all survey resources associated with the authenticated customer:

curl -X GET   "https://surveydynamix.com/api/surveys?_limit=1000" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/surveys?_limit=1000";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
import requests

response = requests.get('https://surveydynamix.com/api/surveys?_limit=1000',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys?_limit=1000');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Gets a list of survey resources associated with the authenticated customer.

URI

/surveys

Method

GET

Parameters

Name Description Allowed Values Default
_limit The number of matching results to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit results are found. integer 0
_order The order of ID that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first

Get Specific Survey

This code will return a JSON object for the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/surveys/52" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/surveys/52";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys/52');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/surveys/52',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Returns the JSON object for a survey resource specified by {survey_id}.

URI

/surveys/{survey_id}

Method

GET

Parameters

None

Get Questions List By Survey

This code will return a JSON array of question resources that are part of the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/surveys/52/questions" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/surveys/52/questions";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys/52/questions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/surveys/52/questions',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of questions that are part of the requested survey.

This works the same as a GET call to the /questions resource with the survey_id parameter set to {survey_id}

URI

/surveys/{survey_id}/questions

GET

Parameters

See Get Questions List

Get Interactions List By Survey

This code will return a JSON array of interaction resources that are associated with the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/surveys/52/interactions" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/surveys/52/interactions";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys/52/interactions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/surveys/52/interactions',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of interactions that are associated with the requested survey.

This works the same as a GET call to the /interactions resource with the survey_id parameter set to {survey_id}

URI

/surveys/{survey_id}/interactions

GET

Parameters

See Get Interactions List

Get Interaction Data List By Survey

This code will return a JSON array of interaction data resources that are associated with the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/surveys/52/interaction_data" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/surveys/52/interaction_data";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys/52/interaction_data');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/surveys/52/interaction_data', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of interaction data resources that associated with of the requested survey.

This works the same as a GET call to the /interaction_data resource with the survey_id parameter set to {survey_id}

URI

/surveys/{survey_id}/interaction_data

GET

Parameters

See Get Interaction Data List

Get Responses List By Survey

This code will return a JSON array of response resources that are associated with the survey resource with ID = 52:

curl -X GET   "https://surveydynamix.com/api/surveys/52/responses" \
    -u Customer_UUID:Auth_Token

var url = "https://surveydynamix.com/api/surveys/52/responses";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

import requests

response = requests.get('https://surveydynamix.com/api/surveys/52/responses',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/surveys/52/responses');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Gets a list of responses that are associated with the requested survey.

This works the same as a GET call to the /responses resource with the survey_id parameter set to {survey_id}

URI

/surveys/{survey_id}/responses

GET

Parameters

See Get Responses List

Questions

Question resources follow this example format in JSON

{
    "id": 509,
    "survey_id": 71,
    "order": 2,
    "max_response": 1,
    "question_type": "multichoice",
    "question_label": "Multiple Choice Question",
    "question_prompt": {
        "text": {
            "default": "What is your favourite letter?",
        },
        "sound_files": {
                    "default": "<sound file url>.mp3",
        }
    },
    "scale_label_min_prompt": {
        "text": {
            "default": ""
        }
    },
    "scale_label_mid_prompt": {
        "text": {
            "default": ""
        }
    },
    "scale_label_max_prompt": {
        "text": {
            "default": ""
        }
    },
    "response_options": [
        {
            "label": "a",
            "prompt": {
                "text": {
                    "default": "A"
                }
            }
        },
        {
            "label": "b",
            "prompt": {
                "text": {
                    "default": "B"
                }
            }
        },
        {
            "label": "c",
            "prompt": {
                "text": {
                    "default": "C"
                }
            }
        }
    ],
    "compulsory": 0,
    "agent_score": 0,
    "transcribe": 1
  }

A question resource details the core properties of a question to be asked in an SDX survey.

The question query API can be used to get detailed information about a questions for third party reporting or API response submission

JSON object contains the following information

Name Description
id A unique question ID.
survey_id If queried for a particular survey, the survey id and question order within the survey.
order Order of the question.
max_response MAx amount of responses.
question_type Type of question (text, yesno, nps, number, or multichoice))
question_label Label used for reporting
question_prompt Question prompt object
scale_label_min_prompt The minimum scale label which is a text prompt object
scale_label_mid_prompt The medium scale label which is a text prompt object
scale_label_max_prompt The maximum scale label which is a text prompt object
response_options The response options, including a label and text prompt for each response option. This field is null when the question type is not multichoice.
compulsory boolean indicating whether or not the question is considered compulsory.
agent_score boolean indicating whether or not the responses to the question will affect agent scores.
transcribe boolean indicating whether question responses should automatically be transcribed for text responses given over a voice channel.

Get Questions List

This code will return a JSON array of all question resources part of the survey with id = 52 :

curl -X GET   "https://surveydynamix.com/api/questions?survey_id=52" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/questions?survey_id=52";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/questions?survey_id=52');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests


response = requests.get('https://surveydynamix.com/api/questions?survey_id=52', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of question resources associated with the authenticated customer.

Can be queried by survey id, question type, or question label.

URI

/questions

Method

GET

Parameters

Name Description Allowed Values Default
_limit The number of matching results to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit results are found. integer 0
_order The order of ID that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first
survey_id The ID of the survey resource question is associated with. integer none
question_type The type of question. number, yesno, text, nps, multichoice none
question_label The reporting label of the question. string up to 30 characters long none

Get Specific Question

This code will return a JSON object for the question resource with ID = 509:

curl -X GET   "https://surveydynamix.com/api/questions/509" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/questions/509";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/questions/509');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/questions/509', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Returns the JSON object for a question resource specified by {question_id}.

URI

/questions/{question_id}

Method

GET

Parameters

None

Get Responses List By Question

This code will return a JSON array of responses associated with the question resource with ID = 509:

curl -X GET   "https://surveydynamix.com/api/questions/509/responses" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/questions/509/responses";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/questions/509/responses');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/questions/509/responses', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of responses to the requested question.

This works the same as a GET call to the /responses resource with the question_id parameter set to {question_id}

URI

/questions/{question_id}/responses

GET

Parameters

See Get Responses List

Users

User resources follow this example format in JSON

{
    "id": 4064,
    "name": "Joe Smith",
    "email": "joesmith@example.com",
    "agent_id": "jSmith1",
    "phone": "+61499999999",
    "timezone": "Australia/Brisbane"
}

A user resource details the core properties of a Mindful Feedback user.

The users query API can be used to get detailed information about users for third party reporting or API interaction creation.

JSON object contains the following information

Name Description
id A unique user ID.
name The user's name
email email address which serves as their unique identifier.
agent_id The user’s agent ID.
phone The user's phone number
timezone The user's timzone

Get Users List

This code will return a JSON array of all users with "Joe" in their name associated with the authenticated customer:

curl -X GET   "https://surveydynamix.com/api/users?_limit=1000&name_contains=Joe" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/users?_limit=1000&name_contains=Joe";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/users?_limit=1000&name_contains=Joe');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/users?_limit=1000&name_contains=Joe', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets a list of user resources associated with the authenticated customer.

URI

/users

Method

GET

Parameters

Name Description Allowed Values Default
_limit The number of matching results to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit results are found. integer 0
_order The order of ID that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first
name The exact name of the user you want to find string none
name_contains Part of the name of the user you want to find string none
agent_id The agent ID of the user you want to find string none
phone The phone number of the user you want to find string none
email The email address of the user you want to find string none

Get Specific User

This code will return a JSON object for the user with the email address joesmith@example.com:

curl -X GET   "https://surveydynamix.com/api/users/joesmith@example.com" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/users/joesmith@example.com";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
import requests

response = requests.get('https://surveydynamix.com/api/users/joesmith@example.com', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/users/joesmith@example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Returns the JSON object for a user resource specified by {email_address}.

URI

/users/{email_address}

Method

GET

Parameters

None

Get Interactions List By User

This code will return a JSON array of interaction resources associated with the user with email address joesmith@example.com:

curl -X GET   "https://surveydynamix.com/api/users/joesmith@example.com/interactions" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/users/joesmith@example.com/interactions";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
import requests

response = requests.get('https://surveydynamix.com/api/users/joesmith@example.com/interactions', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/users/joesmith@example.com/interactions');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Gets a list of interactions associated with a user by agent id

This works the same as a GET call to the /interactions resource with the agent_id parameter set to the selected user’s agent ID.

URI

/users/{email_address}/interactions

GET

Parameters

See Get Interactions List

User Groups

User Group resources follow this example format in JSON

{
    "id": 24062,
    "name": "My User Group",
    "updated_at": "2016-02-19 10:30:02",
    "created_at": "2016-02-19 10:30:02"
}

A User Group resource details the core properties of a Mindful Feedback User Group.

The User Group API can be used to get details of user groups and manage which users belong to which User Group.

JSON object contains the following information

Name Description
id A unique user group ID.
name A unique name
updated_at Timestamps specifying when the user group was last updated
created_at Timestamps specifying when the user group was created

Get User Groups List

This code will return the first 5 user groups

curl -X GET   "https://surveydynamix.com/api/user_groups?_limit=5" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/user_groups?_limit=5";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

import requests

response = requests.get('https://surveydynamix.com/api/user_groups?_limit=5', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups?_limit=5');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

This code will return the next 5 user groups

curl -X GET   "https://surveydynamix.com/api/user_groups?_offset=5&_limit=5" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.get('https://surveydynamix.com/api/user_groups?_limit=5', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups?_offset=5&_limit=5');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/user_groups?_offset=5&_limit=5";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

Gets a list of user groups as a JSON array of User Group resources.

URI

/user_groups

Method

GET

Parameters

Name Description Allowed Values Default
_limit The number of User Groups to return. integer between 1 and 500 10
_offset The row number to start at when getting _limit User Groups. Useful if you have more than 500 User Groups or wish to "paginate" your requests. integer 0

Get Specific User Group

This code will return a JSON object for the User Group resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/user_groups/891234" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/user_groups/891234";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups/891234');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/user_groups/891234', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Returns the JSON object for a User Group resource specified by {user_group_id}

URI

/user_groups/{user_group_id}

Method

GET

Parameters

None

Get Users from User Group

This code will return a JSON object of all Users in the the User Group resource with ID = 891234:

curl -X GET   "https://surveydynamix.com/api/user_groups/891234/users" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/user_groups/891234/users";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

import requests

response = requests.get('https://surveydynamix.com/api/user_groups/891234/users', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups/891234/users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Returns the JSON object for Users in the User Group resource specified by {user_group_id}

URI

/user_groups/{user_group_id}/users

Method

GET

Parameters

Name Description Allowed Values Default
_limit The number of Users to return. integer between 1 and 500 10
_offset The row number to start at when getting _limit Users. Useful if you have more than 500 Users in the specified User Group, or wish to "paginate" your requests. integer 0

Create New User Group

This code will create a User Group named 'My User Group':

curl -X POST   "https://surveydynamix.com/api/user_groups/create" \
    -d "name=My User Group" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/user_groups/create";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "name=My User Group";

xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups/create');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "name=My User Group");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

data = 'name=My User Group'

response = requests.post('https://surveydynamix.com/api/user_groups/create', auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)

Creates a User Group with the specified parameters.

URI

/user_groups/create

Method

POST

Parameters

Name Description Allowed Values Default
name The name given to your User Group. Must be unique. string No default; Parameter required

Add Users to User Group

This code will add users with the ID 1234 and 2468 to the user group with the ID 6789.

curl -X POST   "https://surveydynamix.com/api/user_groups/6789/add_users" \
    -H 'Content-Type: application/json' \
    -d '{"visibility_level":"all","visible":"1","user_ids":[1234, 2468]}' \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/user_groups/6789/add_users";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = '{"visibility_level":"all","visible":"1","user_ids":[1234, 2468]}';

xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups/6789/add_users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"visibility_level\":\"all\",\"visible\":\"1\",\"user_ids\":[1234, 2468]}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

headers = {
    'Content-Type': 'application/json',
}

data = '{"visibility_level":"all","visible":"1","user_ids":[1234, 2468]}'

response = requests.post('https://surveydynamix.com/api/user_groups/6789/add_users', headers=headers, data=data,auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Adds the users that match user_ids to the User Group specified by {user_group_id}

URI

/user_groups/{user_group_id}/add_users

Method

POST

Parameters

Name Description Allowed Values Default
user_ids An array of Mindful Feedback User IDs. You can obtain User IDs from the Users Resource by getting a specific user or by getting a list of all users Array No default; Parameter required
visibility_level The level of access the users have to other user's results within the same User Group. "all", "individual" No default; Parameter required
visible If true, the users being added are visible to other users in the same User Group boolean No default; Parameter required

Remove Users from User Group

This code will remove users with the ID 1234 and 2468 from the user group with the ID 6789.

curl -X POST   "https://surveydynamix.com/api/user_groups/6789/remove_users" \
    -H 'Content-Type: application/json' \
    -d '{"user_ids":[1234,2468]}' \
    -u Customer_UUID:Auth_Token
import requests

headers = {
    'Content-Type': 'application/json',
}

data = '{"user_ids":[1234,2468]}'

response = requests.post('https://surveydynamix.com/api/user_groups/6789/remove_users', headers=headers, data=data,auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
var url = "https://surveydynamix.com/api/user_groups/6789/remove_users";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = '{"user_ids":[1234,2468]}';

xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/user_groups/6789/remove_users');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"user_ids\":[1234,2468]}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);

Removes the users that match user_ids from the User Group specified by {user_group_id}

URI

/user_groups/{user_group_id}/remove_users

Method

POST

Parameters

Name Description Allowed Values Default
user_ids An array of Mindful Feedback User IDs. You can obtain User IDs from the Users Resource by getting a specific user or by getting a list of all users Array No default; Parameter required

Do Not Call List

Do not call list entries follow this example format in JSON

{
"contact":"+61409999999",
"added_at": "2016-02-19 10:30:02",
"added_by_user_id":"65"
}

The do not call list defines contacts which are not allowed to be surveyed via outbound telephony or email. The API can be used to retrieve lists of do not call entries, add contacts to the the do not call list, or remove them.

JSON object contains the following information

Name Description
contact The contact which has been blocked. This is either a phone number or an email address.
added_at Timestamps specifying when the entry was created
added_by_user_id The id of the user who added the entry. If the entry was added via the API or by the contact clicking an unsubscribe link, this field will be set to null.

Get Do Not Call List

This code will return the full do not call list:

curl -X GET   "https://surveydynamix.com/api/do_not_call_list" \
    -u Customer_UUID:Auth_Token
import requests

response = requests.get('https://surveydynamix.com/api/do_not_call_list', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/do_not_call_list";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

This code will return a JSON array of do not call list entries where the contact ends with "@gmail.com":

curl -X GET   "https://surveydynamix.com/api/do_not_call_list?contact=%25@gmail.com" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/do_not_call_list?contact=%25@gmail.com";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list?contact=%25@gmail.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/do_not_call_list?contact=%25@gmail.com',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets the do not call list, optionally filtered by contact.

URI

/do_not_call_list

Method

GET

Parameters

Name Description Allowed Values Default
contact A string to filter the list by. This accepts the wildcard character "%", allowing for example the ability to search contacts containing a specific email domain, or phone number area code. String none
_limit The number of matching Do Not Call resources to return. integer between 1 and 1000 10
_offset The row number to start at if more than _limit Do Not Call resources are found. integer 0
_order The order that results should be returned in. ‘ASC’: earliest first DESC
or ‘DESC’: most recent first

Get Specific Do Not Call List Entry

This code will return a JSON object for the do not call list entry "joebloggs@example.com":

curl -X GET   "https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Returns the JSON object for a do not call list entry specified by the {contact}.

URI

/do_not_call_list/{contact}

Method

GET

Parameters

None

Add Do Not Call List Entry

This code will add the email address "joebloggs@example.com" to the do not call list:

curl -X POST   "https://surveydynamix.com/api/do_not_call_list" \
    -d "contact=joebloggs@example.com" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/do_not_call_list";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "contact=joebloggs@example.com";

xhr.send(data);

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "contact=joebloggs@example.com");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

data = 'contact=joebloggs@example.com'

response = requests.post('https://surveydynamix.com/api/do_not_call_list',auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)

This code will add the phone number "+61409999999" to the do not call list:

curl -X POST   "https://surveydynamix.com/api/do_not_call_list" \
    -d "contact=+61409999999" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/do_not_call_list";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = "contact=+61409999999";

xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "contact=+61409999999");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/x-www-form-urlencoded';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

data = 'contact=+61409999999'

response = requests.post('https://surveydynamix.com/api/do_not_call_list',auth=HTTPBasicAuth(Customer_UUID, Auth_Token), data=data)
print(response.content)

Adds a contact to the do not call list.

The resulting do not call list entry JSON object will be returned.

URI

/do_not_call_list

Method

POST

Parameters

Name Description Allowed Values Default
contact The phone number or email address of the contact to add to the do not call list String No default; Parameter required

Delete Do Not Call List Entry

This code will remove the email address "joebloggs@example.com" from the do not call list:

curl -X DELETE   "https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com";

var xhr = new XMLHttpRequest();
xhr.open("DELETE", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.delete('https://surveydynamix.com/api/do_not_call_list/joebloggs@example.com',auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Removes do not call list entry specified by {contact}.

URI

/do_not_call_list/{contact}

Method

DELETE

Parameters

None

Survey Prompts

Survey prompts follow this example format in JSON

{
  "text": {
      "default": "We'd love to get some feedback on your recent customer experience!",
      "en-au": "G'day! We'd love some feedback on your recent customer experience!",
      "es-default": "Nos encantaría recibir algunos comentarios sobre su experiencia reciente con el cliente"
  },
  "sound_files": {
      "default": "<sound file url>.mp3",
      "en-default": "<sound file url>.mp3",
      "en-au": "<sound file url>.mp3",
      "es-default": "<sound file url>.mp3"
  }
}

Survey prompts define what should be shown or played to a respondent while performing a survey.

Each survey prompt JSON object contains at least the text list, while the sound files list is only present if at least the default sound file is defined.

At runtime Mindful Feedback dynamically chooses which prompt to present based on the respondent language defined in the survey interaction, using defaults if the specific language is not defined. For example, if the respondent language is set to en-AU, it will first look for the text key "en-au". If that key is not defined, it will then look for "en-default", before finally presenting the "default" text if no other is defined. For a full list of supported language codes, check here

Survey Text Prompts

Survey text prompts are used for survey prompts which are not used in voice surveys. These prompts will never contain a sound file list.

Phone Numbers

Phone number lookup results follow this example format in JSON

{
    "phone_number": "+61499999999",
    "country_code": "AU",
    "national_format": "0499 999 999",
    "phone_type": "mobile"
}

Phone numbers in SDX are required to be in a specific international format. This resource allows you to lookup a phone number and get basic details including it's correct format for SDX, where it is located, and whether it is able to receive SMS surveys.

JSON object contains the following information

Name Description
phone_number The phone number in the correct format expected by Mindful Feedback
country_code The country code of where the phone number is registered
national_format The national format for the phone number
phone_type The phone type. This is either mobile, landline, or voip.

Get Phone Number Details

This code will return the details of the Australian mobile number 0499999999 in the correct format required by Mindful Feedback

curl -X GET   "https://surveydynamix.com/api/phone_numbers/0499999999?country_code=AU" \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/phone_numbers/0499999999?country_code=AU";

var xhr = new XMLHttpRequest();
xhr.open("GET", url);

xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

xhr.send();
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/phone_numbers/0499999999?country_code=AU');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');

curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

response = requests.get('https://surveydynamix.com/api/phone_numbers/0499999999?country_code=AU', auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Gets the specific details of a phone number. If the phone number is not valid, a 404 response will be returned instead.

URI

/phone_numbers/{phone_number}

Method

GET

Parameters

Name Description Allowed Values Default
country_code The ISO country code of the phone number. This is used to specify the country when the number is provided in a national format. String US

PSTN Transfer Reservations

PSTN Transfer Reservation resources follow this example format in JSON

{
"survey_id":50,
"external_ref": "7aa870f0-046f-11e7-9cc9-9de741d6e753",
"custom_data": {"call_type":"Service","respondent_language":"en-US","agent_id":"aboyd","wrapup":"Problem solved","HandleTime":"144"},
"inbound_number": "+61490000000"
}

A PSTN Transfer Reservation is a way for you to give Mindful Feedback a unique ID and set of attributes for a future incoming call, when SIP transfers are not available. In response, Mindful Feedback will send back an inbound_number, which you can transfer a caller to and the call will be assigned the attributes of the API request you just performed.

As a basic example, your survey might support multiple languages. However, a PSTN transfer has no way to notify Feedback of the incoming caller's language. That's where the PSTN Transfer Reservation comes in, telling Feedback that a call is about to arrive where the respondent_language attribute is en-US. Feedback sends back the phone number to which the caller should be transferred, and when the caller arrives at Feedback, we're expecting them and can conduct the survey in the appropriate language.

JSON object contains the following information

Name Description
survey_id The ID of the survey you want the caller to hear when they are transferred.
external_ref A unique ID that will be assigned to the interaction when the caller is transferred.
custom_data A set of key/value pairs, which can contain any information you want on the interaction. Common information might be respondent_language=en-AU or call_type=GeneralEnquiries, but you can add any data you need to the interaction.
inbound_number The phone number to which the caller must be transferred.

Add New PSTN Transfer Reservation

This code will create a PSTN Transfer Reservation. The response will contain an inbound_number attribute. If a user is transferred to this number within 10 seconds of the API call, the call with be assigned the external_ref and custom_data and the caller will hear the survey with the ID of survey_id.

curl -X POST   "https://surveydynamix.com/api/create_transfer_reservation" \
    -H 'Content-Type: application/json' \
    -d '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","survey_id":50,"custom_data": {"call_type":"Service","respondent_language":"en-US","agent_id":"aboyd", "wrapup":"Problem solved", "HandleTime":"144"}}' \
    -u Customer_UUID:Auth_Token
var url = "https://surveydynamix.com/api/create_transfer_reservation";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","survey_id":50,"custom_data": {"call_type":"Service","respondent_language":"en-US","agent_id":"aboyd", "wrapup":"Problem solved", "HandleTime":"144"}}';

xhr.send(data);
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/create_transfer_reservation');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"external_ref\":\"7aa870f0-046f-11e7-9cc9-9de741d6e753\",\"survey_id\":50,\"custom_data\": {\"call_type\":\"Service\",\"respondent_language\":\"en-US\",\"agent_id\":\"aboyd\", \"wrapup\":\"Problem solved\", \"HandleTime\":\"144\"}}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
import requests

headers = {
    'Content-Type': 'application/json',
}

data = '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","survey_id":50,"custom_data": {"call_type":"Service","respondent_language":"en-US","agent_id":"aboyd", "wrapup":"Problem solved", "HandleTime":"144"}}'

response = requests.post('https://surveydynamix.com/api/create_transfer_reservation', headers=headers, data=data, auth=HTTPBasicAuth(Customer_UUID, Auth_Token))
print(response.content)

Creates a PSTN Transfer Reservation

URI

/create_transfer_reservation

Method

POST

Parameters

Name Description Allowed Values Default
external_ref A unique ID that will be assigned to the incoming call. string No default; Parameter required
custom_data A set of key/value pairs that are assigned to the incoming call. JSON. The keys must only include alphanumeric characters and underscores and must start with a letter. The values may be any string. none
survey_id The ID of the survey you want the caller to complete. Integer No default; Parameter required
phone_number_prefix Requests an inbound phone number starting with the prefix. If none is available, the phone_number_prefix will be ignored and the next available number will be returned. string none

SIP Transfer Reservations

SIP Transfer Reservation resources follow this example format in JSON

{
"external_ref": "7aa870f0-046f-11e7-9cc9-9de741d6e753",
"custom_data": {"call_type":"General Enquiries","respondent_language":"en-AU","some_other_custom_field":"value","etc":"etc"}
}

A SIP Transfer Reservation is a way for you to give Mindful Feedback information about an incoming SIP call.

This functionality allows you to make an API call to Mindful Feedback before transferring a SIP call, so that Feedback is expecting the call and can associate it with data from the API call.

JSON object contains the following information

Name Description
external_ref This must match the SIPHEADER_X-SDX-external_ref header on your incoming SIP call
custom_data A set of key/value pairs, which can contain any information you want on the interaction. Common information might be respondent_language=en-AU or call_type=GeneralEnquiries, but you can add any data you need to the interaction.

Add New SIP Transfer Reservation

This code will create a SIP Transfer Reservation. If an incoming SIP call arrives with the same external_ref, it will be assigned a call_type, agent_id and respondent_language:

curl -X POST   "https://surveydynamix.com/api/create_incoming_sip_data" \
    -H 'Content-Type: application/json' \
    -d '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","custom_data": {"call_type":"customer satisfaction","respondent_language":"en-AU","agent_id":"al_boyd"}}' \
    -u Customer_UUID:Auth_Token
import requests

headers = {
    'Content-Type': 'application/json',
}

data = '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","custom_data": {"call_type":"customer satisfaction","respondent_language":"en-AU","agent_id":"al_boyd"}}'

response = requests.post('https://surveydynamix.com/api/create_incoming_sip_data', auth=HTTPBasicAuth(Customer_UUID, Auth_Token), headers=headers, data=data)
print(response.content)
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://surveydynamix.com/api/create_incoming_sip_data');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "{\"external_ref\":\"7aa870f0-046f-11e7-9cc9-9de741d6e753\",\"custom_data\": {\"call_type\":\"customer satisfaction\",\"respondent_language\":\"en-AU\",\"agent_id\":\"al_boyd\"}}");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_USERPWD, 'Customer_UUID' . ':' . 'Auth_Token');

$headers = array();
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close ($ch);
var url = "https://surveydynamix.com/api/create_incoming_sip_data";

var xhr = new XMLHttpRequest();
xhr.open("POST", url);

xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Authorization", "Basic " + btoa(username + ":" + password));

xhr.onreadystatechange = function () {
   if (xhr.readyState === 4) {
      console.log(xhr.status);
      console.log(xhr.responseText);
   }};

var data = '{"external_ref":"7aa870f0-046f-11e7-9cc9-9de741d6e753","custom_data": {"call_type":"customer satisfaction","respondent_language":"en-AU","agent_id":"al_boyd"}}';

xhr.send(data);

Creates a SIP Transfer Reservation

URI

/create_incoming_sip_data

Method

POST

Parameters

Name Description Allowed Values Default
external_ref A standard string field for linking SIP Transfer Reservation to an incoming SIP call. string No default; Parameter required
custom_data Any data that should be associated with the incoming SIP call. JSON. The keys must only include alphanumeric characters and underscores and must start with a letter. The values may be any string. none

Supported Languages

Mindful Feedback Supports the following respondent languages for survey prompt and response transcription purposes:

Language languageCode Language (English name)
Afrikaans (Suid-Afrika) af-ZA Afrikaans (South Africa)
gjuha shqipe (Shqiperia) sq-AL Albanian (Albania)
አማርኛ (ኢትዮጵያ) am-ET Amharic (Ethiopia)
العربية (الجزائر) ar-DZ Arabic (Algeria)
العربية (البحرين) ar-BH Arabic (Bahrain)
العربية (مصر) ar-EG Arabic (Egypt)
العربية (العراق) ar-IQ Arabic (Iraq)
العربية (إسرائيل) ar-IL Arabic (Israel)
العربية (الأردن) ar-JO Arabic (Jordan)
العربية (الكويت) ar-KW Arabic (Kuwait)
العربية (لبنان) ar-LB Arabic (Lebanon)
العربية (المغرب) ar-MA Arabic (Morocco)
العربية (عُمان) ar-OM Arabic (Oman)
العربية (قطر) ar-QA Arabic (Qatar)
العربية (السعودية) ar-SA Arabic (Saudi Arabia)
العربية (فلسطين) ar-PS Arabic (State of Palestine)
العربية (تونس) ar-TN Arabic (Tunisia)
العربية (الإمارات) ar-AE Arabic (United Arab Emirates)
العربية (اليمن) ar-YE Arabic (Yemen)
Հայ (Հայաստան) hy-AM Armenian (Armenia)
Azərbaycan (Azərbaycan) az-AZ Azerbaijani (Azerbaijan)
Bahasa Indonesia (Indonesia) id-ID Indonesian (Indonesia)
Bahasa Melayu (Malaysia) ms-MY Malay (Malaysia)
বাংলা (বাংলাদেশ) bn-BD Bengali (Bangladesh)
বাংলা (ভারত) bn-IN Bengali (India)
босански (Босна и Херцеговина) bs-BA Bosnian (Bosnia and Herzegovina)
Български (България) bg-BG Bulgarian (Bulgaria)
မြန်မာစကား my-MM Burmese (Myanmar)
Català (Espanya) ca-ES Catalan (Spain)
Čeština (Česká republika) cs-CZ Czech (Czech Republic)
國語 (台灣) cmn-Hant-TW Chinese, Mandarin (Traditional, Taiwan)
廣東話 (香港) yue-Hant-HK Chinese, Cantonese (Traditional, Hong Kong)
普通话 (中国大陆) cmn-Hans-CN Chinese, Mandarin (Simplified, China)
普通話 (香港) cmn-Hans-HK Chinese, Mandarin (Simplified, Hong Kong)
Dansk (Danmark) da-DK Danish (Denmark)
Deutsch (Österreich) de-AT German (Austria)
Deutsch (Deutschland) de-DE German (Germany)
Deutsch (Schweiz) de-CH German (Switzerland)
English (Australia) en-AU English (Australia)
English (Canada) en-CA English (Canada)
English (Ghana) en-GH English (Ghana)
English (Hong Kong) en-HK English (Hong Kong)
English (Great Britain) en-GB English (United Kingdom)
English (India) en-IN English (India)
English (Ireland) en-IE English (Ireland)
English (Kenya) en-KE English (Kenya)
English (New Zealand) en-NZ English (New Zealand)
English (Nigeria) en-NG English (Nigeria)
English (Pakistan) en-PK English (Pakistan)
English (Philippines) en-PH English (Philippines)
English (Singapore) en-SG English (Singapore)
English (South Africa) en-ZA English (South Africa)
English (Tanzania) en-TZ English (Tanzania)
English (United States) en-US English (United States)
Español (Argentina) es-AR Spanish (Argentina)
Español (Bolivia) es-BO Spanish (Bolivia)
Español (Chile) es-CL Spanish (Chile)
Español (Colombia) es-CO Spanish (Colombia)
Español (Costa Rica) es-CR Spanish (Costa Rica)
Español (Ecuador) es-EC Spanish (Ecuador)
Español (El Salvador) es-SV Spanish (El Salvador)
Español (España) es-ES Spanish (Spain)
Español (Estados Unidos) es-US Spanish (United States)
Español (Guatemala) es-GT Spanish (Guatemala)
Español (Honduras) es-HN Spanish (Honduras)
Español (México) es-MX Spanish (Mexico)
Español (Nicaragua) es-NI Spanish (Nicaragua)
Español (Panamá) es-PA Spanish (Panama)
Español (Paraguay) es-PY Spanish (Paraguay)
Español (Perú) es-PE Spanish (Peru)
Español (Puerto Rico) es-PR Spanish (Puerto Rico)
Español (República Dominicana) es-DO Spanish (Dominican Republic)
Español (Uruguay) es-UY Spanish (Uruguay)
Español (Venezuela) es-VE Spanish (Venezuela)
eesti keel (Eesti) et-EE Estonian (Estonia)
Euskara (Espainia) eu-ES Basque (Spain)
Filipino (Pilipinas) fil-PH Filipino (Philippines)
Français (Belgium) fr-BE French (Belgium)
Français (Canada) fr-CA French (Canada)
Français (France) fr-FR French (France)
Français (Switzerland) fr-CH French (Switzerland)
Galego (España) gl-ES Galician (Spain)
ქართული (საქართველო) ka-GE Georgian (Georgia)
Ελληνικά (Ελλάδα) el-GR Greek (Greece)
ગુજરાતી (ભારત) gu-IN Gujarati (India)
עברית (ישראל) iw-IL Hebrew (Israel)
हिन्दी (भारत) hi-IN Hindi (India)
Hrvatski (Hrvatska) hr-HR Croatian (Croatia)
IsiZulu (Ningizimu Afrika) zu-ZA Zulu (South Africa)
Íslenska (Ísland) is-IS Icelandic (Iceland)
Italiano (Italia) it-IT Italian (Italy)
Italiano (Switzerland) it-CH Italian (Switzerland)
日本語(日本) ja-JP Japanese (Japan)
Jawa (Indonesia) jv-ID Javanese (Indonesia)
ಕನ್ನಡ (ಭಾರತ) kn-IN Kannada (India)
ភាសាខ្មែរ (កម្ពុជា) km-KH Khmer (Cambodia)
한국어 (대한민국) ko-KR Korean (South Korea)
ລາວ (ລາວ) lo-LA Lao (Laos)
Latviešu (latviešu) lv-LV Latvian (Latvia)
Lietuvių (Lietuva) lt-LT Lithuanian (Lithuania)
македонски (Македонија) mk-MK Macedonian (North Macedonia)
Magyar (Magyarország) hu-HU Hungarian (Hungary)
മലയാളം (ഇന്ത്യ) ml-IN Malayalam (India)
मराठी (भारत) mr-IN Marathi (India)
монгол (Монгол Улс) mn-MN Mongolian (Mongolia)
Nederlands (Nederland) nl-BE Dutch (Belgium)
Nederlands (Nederland) nl-NL Dutch (Netherlands)
नेपाली (नेपाल) ne-NP Nepali (Nepal)
Norsk bokmål (Norge) no-NO Norwegian Bokmål (Norway)
فارسی (ایران) fa-IR Persian (Iran)
Polski (Polska) pl-PL Polish (Poland)
Português (Brasil) pt-BR Portuguese (Brazil)
Português (Portugal) pt-PT Portuguese (Portugal)
ਪੰਜਾਬੀ (ਗੁਰਮੁਖੀ ਇੰਡੀਆ) pa-Guru-IN Punjabi (Gurmukhi India)
Română (România) ro-RO Romanian (Romania)
Русский (Россия) ru-RU Russian (Russia)
Српски (Србија) sr-RS Serbian (Serbia)
සිංහල (ශ්රී ලංකාව) si-LK Sinhala (Sri Lanka)
Slovenčina (Slovensko) sk-SK Slovak (Slovakia)
Slovenščina (Slovenija) sl-SI Slovenian (Slovenia)
Suomi (Suomi) fi-FI Finnish (Finland)
Svenska (Sverige) sv-SE Swedish (Sweden)
Swahili (Tanzania) sw-TZ Swahili (Tanzania)
Swahili (Kenya) sw-KE Swahili (Kenya)
தமிழ் (இந்தியா) ta-IN Tamil (India)
தமிழ் (மலேசியா) ta-MY Tamil (Malaysia)
தமிழ் (சிங்கப்பூர்) ta-SG Tamil (Singapore)
தமிழ் (இலங்கை) ta-LK Tamil (Sri Lanka)
తెలుగు (భారతదేశం) te-IN Telugu (India)
ไทย (ประเทศไทย) th-TH Thai (Thailand)
Tiếng Việt (Việt Nam) vi-VN Vietnamese (Vietnam)
Türkçe (Türkiye) tr-TR Turkish (Turkey)
Українська (Україна) uk-UA Ukrainian (Ukraine)
Urang (Indonesia) su-ID Sundanese (Indonesia)
اردو (بھارت) ur-IN Urdu (India)
اردو (پاکستان) ur-PK Urdu (Pakistan)
Ўзбек (Узбакистон) uz-UZ Uzbek (Uzbekistan)

Mindful Feedback Supports the following respondent languages for survey response sentiment analysis (Most recent responses widget):

Language languageCode Language (English name)
العربية ar Arabic
普通话 (中国大陆) zh Chinese, Mandarin (Simplified)
國語 (台灣) zh-TW Chinese, Mandarin (Traditional)
Deutsch (Deutschland) de German (Germany)
English en English
Español es Spanish
Français fr French
हिन्दी hi Hindi
Italiano it Italian
日本語 ja Japanese
한국어 ko Korean
Português pt Portuguese

Mindful Feedback Supports the following respondent languages for text response sentiment analysis (Text response cloud widget):

Language languageCode Language (English name)
Deutsch (Deutschland) de German (Germany)
English en English
Español es Spanish
Français fr French
Italiano it Italian
Português pt Portuguese

Defaults

The default language value varies by region. The following table shows current default values by region URL.

Region URL Language Code Language
surveydynamix.com en-US English (United States)
us2.surveydynamix.com en-US English (United States)
us3.surveydynamix.com en-US English (United States)
ca1.surveydynamix.com en-CA English (Canada)
eu1.surveydynamix.com en-GB English (United Kingdom)
au1.surveydynamix.com en-AU English (Australia)
demo.surveydynamix.com en-AU English (Australia)

Errors

The Mindful Feedback API uses the following error codes:

Error Code Meaning
400 Bad Request -- Incorrectly formatted request. Check the API.
401 Unauthorised -- Your API credentials are wrong or you do not have permission to access the requested resource
404 Not Found -- The requested resource could not be found
405 Method Not Allowed -- You tried to access an API endpoint with an invalid method
409 Not Modified Due to Existing Record Conflict -- You may have tried to add or update a resource in a way that would conflict with an existing resource, or you may have tried to delete a resource that is not in a deletable state.
410 Gone -- The requested resource has been deleted
429 Rate limit exceeded -- You have sent too many requests in too short of a time-frame.
500 Internal Server Error -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.