GET: https://{env}-api.xebo.ai/v3/survey-management/surveys/folders
Authorization: type: Bearertype token: <access token> granted from login API Or x-api-key: <apikeycopiedfromtheplatform> Content-Type: application/json
Request Sample
curl --location 'https://az4-api.xebo.ai/v3/survey-management/surveys/folders' \ --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9'
var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr.addEventListener("readystatechange", function () { if (this.readyState === 4) { console.log(this.responseText); } }); xhr.open("GET", "https://az4-api.xebo.ai/v3/survey-management/surveys/folders"); xhr.setRequestHeader( "Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9." ); xhr.send();
Responses
{ "data": [ { "name": "My Folder", "surveys": { "list": [ "6f6d023e-c21b-40e7-b0de-b02864b8cdcd" ], "count": 1 }, "uuid": "82f60ce6-c8ab-4616-a133-94c0488ef438" } ] }
{ "success":false, "code":401, "status":"Unauthorized", "error":"AUTHENTICATION_ERROR", "message":"The authorization token was not provided", }
{ "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.