PATCH : https://{env}-api.xebo.ai/v3/survey-management/surveys/{survey_id}

Authorization: 
type: Bearer type 
token: <access token> granted from login API 
Or 
x-api-key: <api key copied from the platform> 
Content-Type: application/json 
Key  Type  Mandatory  Description 
status  string  no  Status of the survey. Enum: [‘active’, ‘inactive’] 
displayTitle  string  no  Title of the survey 

Request Body

 {    
    "status": "active",   
    "displayTitle": "My survey"  
 } 
Key  Type  Mandatory  Description 
status  string  no  Status of the survey. Enum: [‘active’, ‘inactive’] 
displayTitle  string  no  Title of the survey 
 

Request Sample

curl --location --request PATCH 'https://az4-api.xebo.ai/v3/survey-management/surveys/7bef347f-050e-42bd-a092-be7d07439fdc' \ 
--header 'Content-Type: application/json' \ 
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9
--data '{  

  "status": "active",  
  "displayTitle": "My survey"  

}'  
 var data = JSON.stringify({ 
   "status": "active", 
   "displayTitle": "My survey" 
 }); 
 
 var xhr = new XMLHttpRequest(); 
 xhr.withCredentials = true; 
 xhr.addEventListener("readystatechange", function() { 
    if(this.readyState === 4) { 
     console.log(this.responseText); 
   } 
 }); 
 xhr.open("PATCH", "https://az4-api.xebo.ai/v3/survey-management/surveys/7bef347f-050e-42bd-a092-be7d07439fdc"); 
 xhr.setRequestHeader("Content-Type", "application/json"); 
 xhr.setRequestHeader("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0b2tlbl9; 
 xhr.send(data); 

Responses

 { 
   "message": "Survey updated successfully." 
 } 
 { 
   "success": false, 
   "code": 400, 
   "status": "Bad Request", 
   "error": "VALIDATION_ERROR", 
   "message": "Invalid parameters" 
 } 
 { 
   "success": false, 
   "code": 403, 
   "status": "Forbidden", 
   "error": "FORBIDDEN", 
   "message": "You are not allowed to access this resource" 
 } 
 { 
   "success": false, 
   "code": 500, 
   "status": "Internal Server Error", 
   "error": "SERVER_ERROR", 
   "message": "Error in processing your request" 
 } 

Note: Please do not share your tokens in publicly accessible areas or to anyone. Also, this token generated is valid for 24 hours only. After its expiry, you can regenerate the access token from the same API endpoint by passing the username and password or from the refresh token API with the help of refresh token.

Get Survey

GET: https://{{env}}.survey2connect.com/v2/api/surveys/{{survey_id}} The value of environment {{env}} variable depends upon your datacenter. Refer to the Environment page for more details.…

Create Survey

POST: https://{env}-api.xebo.ai/v3/survey-management/surveys Query Params:  Key  Type  Mandatory  Description  folderId  string  no  Folder id where you want to create your survey …

Fetch all Surveys

PUT: https://{env}-api.xebo.ai/v3/survey-management/surveys/global Key  Type  Mandatory  Description  skip  string  no  Gives the skip value, by default it is 0  limit  string …

Ask a human

Can't Find What You're Looking For?