Survey Details


Request Details

Item Value
Description Returns details on a specific survey.
Method GET
Endpoint https://api.crowdtwist.com/v2/survey?api_key=[apikey]&id=[id]&id_type=survey_id


Request

Field Name Sample Value Required Format Notes
URL PARAMETERS  – none
QUERY STRING PARAMETERS
api_key QWERTYUIOP Yes String
id 261 Yes String The id to be used to identify the survey.
id_type survey_id Yes String The type of ID sent.
Options:
1 = ID of the activity related to the survey.
2 = ID of the survey campaign.


Successful Response – Survey Object

Field Name Sample Value Required Format Description
id 261 Yes String Internal CrowdTwist survey id
name mon_20160418185902pmsurvey Yes String Name of the survey.
date_start 1460903400 Yes Integer Date campaign starts.
date_end null Yes Integer Date campaign ends.
num_points 1 Yes Integer Number of points a user receives for finishing survey.
questions Question Object Yes Array Question Object


Successful Response – Question Object

Field Name Sample Value Required Format Description
id 359 Yes String Internal CrowdTwist survey question id.
input_type_id 2 Yes String Id of type of question.
Options:
1 = Text
2 = Drop-down
value QA Test for survey creation? Yes String Question text
options No Array Question Option Object


Successful Response – Question Option Object

Field Name Sample Value Required Format Description
id 1020 No String Internal CrowdTwist survey question option id
value Yes No String Text of question option
image_id 9105ba5937e340fb6bac58e2edd6359e5180b90b No String
image_url https://sample.crowdtwist.com/img/v2/
9105b0b90b/100/100/0/image.jpg
No String


Error Response

Field Name Sample Value Required Format Description
error param_error Yes String A machine readable code that describes the error.
message Missing the user_id parameter Yes String A short, descriptive sentence detailing the error.


Error Response Codes

Error Message
input_error The input provided in invalid or formatted incorrectly.
internal_error Something went wrong on our end.
page_not_found The requested page does not exist or has been removed.
param_error A missing or invalid parameter is included in the request.


Sample Request

curl -X GET
'https://api.crowdtwist.com/v2/survey?api_key=QWERTYUIOP&id=261&id_type=survey_id'
curl -X GET
'https://api.crowdtwist.com/v2/survey?api_key=QWERTYUIOP&id=261&id_type=survey_id'


Sample Successful Response: Status Code 200

{
    "id": "1234",
    "name": "survey-test",
    "title": "Survey",
    "description": "survey description",
    "date_start": "1498828500",
    "date_end": null,
    "num_points": "250",
    "questions": [
        {
            "id": "3690",
            "input_type_id": "2",
            "value": "Pick One",
            "options": [
                {
                    "id": "29814",
                    "value": "3",
                    "image_id": "be4a5d0ca5601cda0248a79e6eeecaeb497d0f31",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/be4a5d0ca5601cda0248a79e6eeecaeb497d0f31/100/100/0/image.jpg"
                },
                {
                    "id": "29815",
                    "value": "1",
                    "image_id": "03bc935124b76ccaa6662e5c2d8b31ad5af7a3c6",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/03bc935124b76ccaa6662e5c2d8b31ad5af7a3c6/100/100/0/image.jpg"
                },
                {
                    "id": "29816",
                    "value": "2",
                    "image_id": "982b2535022958fbdd835fcd413b37b566571a46",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/982b2535022958fbdd835fcd413b37b566571a46/100/100/0/image.jpg"
                }
            ]
        },
        {
            "id": "4768",
            "input_type_id": "3",
            "value": "Select All That Apply",
            "options": [
                {
                    "id": "29817",
                    "value": "1",
                    "image_id": "59afe4e56214bea2ea44e9213d322b7e0407e53c",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/59afe4e56214bea2ea44e9213d322b7e0407e53c/100/100/0/image.jpg"
                },
                {
                    "id": "29818",
                    "value": "2",
                    "image_id": "5d628e599aa2c7c380034cc90acae3c7f3109426",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/5d628e599aa2c7c380034cc90acae3c7f3109426/100/100/0/image.jpg"
                },
                {
                    "id": "29819",
                    "value": "3",
                    "image_id": "dc609295e2e8f29a58e83b799ad1d71c36a6441f",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/dc609295e2e8f29a58e83b799ad1d71c36a6441f/100/100/0/image.jpg"
                },
                {
                    "id": "29820",
                    "value": "4",
                    "image_id": "cbb6373ac9aa931769a25a0173bb9d21db7fc934",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/cbb6373ac9aa931769a25a0173bb9d21db7fc934/100/100/0/image.jpg"
                },
                {
                    "id": "29821",
                    "value": "5",
                    "image_id": "eee99ee267e988bb527ec2ee0e976a01138184ff",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/eee99ee267e988bb527ec2ee0e976a01138184ff/100/100/0/image.jpg"
                }
            ]
        },
        {
            "id": "4769",
            "input_type_id": "1",
            "value": "Text Input",
            "options": []
        }
    ],
    "image_id": "7062f4a71ca5b1edf44ee8f51bee0bd7e38852ba",
    "image_url": "https://cdn.crowdtwist.com/img/v2/7062f4a71ca5b1edf44ee8f51bee0bd7e38852ba/100/100/0/image.jpg"
}
{
    "id": "1234",
    "name": "survey-test",
    "title": "Survey",
    "description": "survey description",
    "date_start": "1498828500",
    "date_end": null,
    "num_points": "250",
    "questions": [
        {
            "id": "3690",
            "input_type_id": "2",
            "value": "Pick One",
            "options": [
                {
                    "id": "29814",
                    "value": "3",
                    "image_id": "be4a5d0ca5601cda0248a79e6eeecaeb497d0f31",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/be4a5d0ca5601cda0248a79e6eeecaeb497d0f31/100/100/0/image.jpg"
                },
                {
                    "id": "29815",
                    "value": "1",
                    "image_id": "03bc935124b76ccaa6662e5c2d8b31ad5af7a3c6",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/03bc935124b76ccaa6662e5c2d8b31ad5af7a3c6/100/100/0/image.jpg"
                },
                {
                    "id": "29816",
                    "value": "2",
                    "image_id": "982b2535022958fbdd835fcd413b37b566571a46",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/982b2535022958fbdd835fcd413b37b566571a46/100/100/0/image.jpg"
                }
            ]
        },
        {
            "id": "4768",
            "input_type_id": "3",
            "value": "Select All That Apply",
            "options": [
                {
                    "id": "29817",
                    "value": "1",
                    "image_id": "59afe4e56214bea2ea44e9213d322b7e0407e53c",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/59afe4e56214bea2ea44e9213d322b7e0407e53c/100/100/0/image.jpg"
                },
                {
                    "id": "29818",
                    "value": "2",
                    "image_id": "5d628e599aa2c7c380034cc90acae3c7f3109426",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/5d628e599aa2c7c380034cc90acae3c7f3109426/100/100/0/image.jpg"
                },
                {
                    "id": "29819",
                    "value": "3",
                    "image_id": "dc609295e2e8f29a58e83b799ad1d71c36a6441f",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/dc609295e2e8f29a58e83b799ad1d71c36a6441f/100/100/0/image.jpg"
                },
                {
                    "id": "29820",
                    "value": "4",
                    "image_id": "cbb6373ac9aa931769a25a0173bb9d21db7fc934",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/cbb6373ac9aa931769a25a0173bb9d21db7fc934/100/100/0/image.jpg"
                },
                {
                    "id": "29821",
                    "value": "5",
                    "image_id": "eee99ee267e988bb527ec2ee0e976a01138184ff",
                    "image_url": "https://cdn.crowdtwist.com/img/v2/eee99ee267e988bb527ec2ee0e976a01138184ff/100/100/0/image.jpg"
                }
            ]
        },
        {
            "id": "4769",
            "input_type_id": "1",
            "value": "Text Input",
            "options": []
        }
    ],
    "image_id": "7062f4a71ca5b1edf44ee8f51bee0bd7e38852ba",
    "image_url": "https://cdn.crowdtwist.com/img/v2/7062f4a71ca5b1edf44ee8f51bee0bd7e38852ba/100/100/0/image.jpg"
}

Sample Error Response: Status Code 400

{
  "error": "param_error",
  "message": "survey does not exist."
}
{
	"error": "param_error",
	"message": "survey does not exist."
}