public static string surveyCreate(string token, SurveyStructure surveyData)
Create a new Survey based on the details provided. Return the ID of the newly created Survey.
Survey Related Methods

string tokenA valid token for your account. To generate a token, use the login method.
array surveyDataThe array containing the survey details.
string nameThis name is NOT displayed in your survey.It is for your reference only.
string titleThis title appears at the top of your survey when you send it out or post it on your website.
string urlThis is the page guests will be sent to when they finish the survey. (Example:
string introThis message appears beneath the title of the survey.
integer logourlImage Url which is to be used as the Logo of the page.
string questionsoptional. The number of questions in the survey
string statusoptional. Status of the survey either wants to keep it online or offline

stringReturns the ID of the newly created Survey.

download example code

  1. <?php
  2. /**
  3. This Example shows how to authenticate a user using XML-RPC.
  4. Note that we are using the PEAR XML-RPC client and recommend others do as well.
  5. **/
  6. require_once 'XML/RPC2/Client.php';
  7. require_once 'inc/config.php';
  8. $client = XML_RPC2_Client::create($apiURL);
  9. $token = $client->login($apiLogin, $apiPassword);
  11. $surveyDetail['name'] = 'Sales Survey';
  12. $surveyDetail['url'] = '';
  13. $surveyDetail['title'] = 'Shop Survey';
  14. $surveyDetail['intro'] = 'Please take our quick, easy survey on the services we provide.';
  15. $newSurveyID = $client->surveyCreate($token, $surveyDetail);
  16. ?>