SurveyCampaign Sub-Object v5

The following API calls are currently available for the SurveyCampaign object:


Note: Alchemer API cannot be used to create SMS campaigns. Alchemer users must create an SMS campaign with the Alchemer Platform UI.

GET LIST - Get a list of all of links and campaigns for the specified survey.

https://api.alchemer.com/v5/survey/123456/surveycampaign

Note: Get requests will cache for 60 seconds. If you make repeated API get requests that are identical, the return will be cached and will thus return identical results.
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True
pagepage=3False
resultsperpageresultsperpage=100False

Response Example (.json format):

{
    "result_ok": true,
    "total_count": "9",
    "page": 1,
    "total_pages": 1,
    "results_per_page": 50,
    "data": [
        {
            "id": "300865",
            "invite_id": null,
            "type": "SurveyCampaign",
            "link_type": "link",
            "subtype": "standard",
            "status": "Active",
            "name": "Default Link",
            "uri": "www.alchemer.com/s3/1234567/survey",
            "SSL": "False",
            "primary_theme_options": null,
            "primary_theme_content": null,
            "token_variables": null,
            "limit_responses": null,
            "close_message": null,
            "link_open_date": null,
            "link_close_date": null,
            "language": "Auto",
            "date_created": "2017-10-02 15:41:41",
            "date_modified": "2017-10-02 15:41:41"
        },
        {
            "id": "300866",
            "invite_id": null,
            "type": "SurveyCampaign",
            "link_type": "link",
            "subtype": "hiddenlink",
            "status": "Active",
            "name": "Hidden Link",
            "uri": "www.alchemer.com/s3/1234567/survey",
            "SSL": "False",
            "primary_theme_options": null,
            "primary_theme_content": null,
            "token_variables": null,
            "limit_responses": null,
            "close_message": null,
            "link_open_date": null,
            "link_close_date": null,
            "language": "Auto",
            "date_created": "2017-10-02 15:41:49",
            "date_modified": "2017-10-02 15:41:49"
        },
        {
            "id": "300867",
            "invite_id": null,
            "type": "SurveyCampaign",
            "link_type": "link",
            "subtype": "standard",
            "status": "Active",
            "name": "New Link",
            "uri": "www.alchemer.com/s3/1234568/survey",
            "SSL": "True",
            "primary_theme_options": null,
            "primary_theme_content": null,
            "token_variables": null,
            "limit_responses": null,
            "close_message": null,
            "link_open_date": null,
            "link_close_date": null,
            "language": "Auto",
            "date_created": "2017-10-02 15:43:30",
            "date_modified": "2017-10-02 15:43:30"
        }
    ]
}

GET CAMPAIGN - Get information about a specific link or campaign.

https://api.alchemer.com/v5/survey/123456/surveycampaign/100000?_method=GET

Note: Get requests will cache for 60 seconds. If you make repeated API get requests that are identical, the return will be cached and will thus return identical results.
ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True

Response Example (.json format):

{
    "result_ok": true,
    "data": {
        "id": "300865",
        "invite_id": null,
        "type": "SurveyCampaign",
        "link_type": "link",
        "subtype": "standard",
        "status": "Active",
        "name": "Default Link",
        "uri": "www.alchemer.com/s3/1234567/survey",
        "SSL": "False",
        "primary_theme_options": null,
        "primary_theme_content": null,
        "token_variables": null,
        "limit_responses": null,
        "close_message": null,
        "link_open_date": null,
        "link_close_date": null,
        "language": "Auto",
        "date_created": "2017-10-02 15:41:41",
        "date_modified": "2017-10-02 15:41:41"
    }
}

CREATE CAMPAIGN - Create a new link or campaign.

Note: Alchemer API cannot be used to create SMS campaigns. Alchemer users must create an SMS campaign with the Alchemer Platform UI.

When creating email campaigns campaigns via either the API or the UI, a default message is created. So, while you might think your next step is to use the EmailMessage object to create a message, you don't need to!

https://api.alchemer.com/v5/survey/123456/surveycampaign?_method=PUT&type=link&name=New Link Name

ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True
typelink, email, html, js, blog, iframe, popupTrue
nameNew Link NameTrue
languageauto, english, etc.False
statusactive, closed, deletedFalse
securetrue, falseFalse
slug newlinkslugFalse
subtype standard, private, shortlink, subdomainFalse
privatenamesurveys.abcco.comFalse
subdomainmycompanyFalse
theme*12345False
linkdates[open]Y-m-d H:i:sFalse
linkdates[close]Y-m-d H:i:sFalse
tokenvariablesvar%3Dvalue%26var2%3D=valueFalse

*The theme parameter only supports saved themes in your Theme Library. To obtain the ID, go to Account > Libraries > Survey Themes and select the theme you wish to use. The ID will display in the URL.

Response Example (.json format):

{
    "result_ok": true,
    "data": {
        "id": "300902",
        "invite_id": null,
        "type": "SurveyCampaign",
        "link_type": "link",
        "subtype": "standard",
        "status": "Active",
        "name": "New Link",
        "uri": "www.alchemer.com/s3/1234567/8d5a71c068a5",
        "SSL": "True",
        "primary_theme_options": null,
        "primary_theme_content": null,
        "token_variables": null,
        "limit_responses": null,
        "close_message": null,
        "link_open_date": null,
        "link_close_date": null,
        "language": "Auto",
        "date_created": "2017-10-02 18:35:45",
        "date_modified": "2017-10-02 18:35:45"
    }
}

UPDATE/COPY CAMPAIGN - Update and/or copy a specified link or campaign.

https://api.alchemer.com/v5/survey/123456/surveycampaign/100000?_method=POST

ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True
nameUpdatedLinkNameFalse
languageauto, english, etc.False
statusactive, closed, deletedFalse
securetrue, falseFalse
slug newlinkslugFalse
subtype standard, private, shortlink, subdomainFalse
privatenamesurveys.abcco.comFalse
subdomainmycompanyFalse
theme*12345False
linkdates[open]Y-m-d H:i:sFalse
linkdates[close]Y-m-d H:i:sFalse
tokenvariablesvar%3Dvalue%26var2%3D=valueFalse
contact_list**Contact List IDFalse
copytrueFalse

*The theme parameter only supports saved themes in your Theme Library. To obtain the ID, go to Account > Libraries > Survey Themes and select the theme you wish to use. The ID will display in the URL.

**Available for the campaign type of 'email', the contact_list parameter allows you to add a ContactList to your Email Campaign. Use the following format:

https://api.alchemer.com/v5/survey/123456/surveycampaign/100000?_method=POST&contact_list=1

Response Example (.json format):

{
    "result_ok": true,
    "data": {
        "id": "300867",
        "invite_id": null,
        "type": "SurveyCampaign",
        "link_type": "link",
        "subtype": "standard",
        "status": "Closed",
        "name": "New Link",
        "uri": "www.alchemer.com/s3/1234567/6e8b6551c402",
        "SSL": "True",
        "primary_theme_options": null,
        "primary_theme_content": null,
        "token_variables": null,
        "limit_responses": null,
        "close_message": null,
        "link_open_date": null,
        "link_close_date": null,
        "language": "Auto",
        "date_created": "2017-10-02 15:43:30",
        "date_modified": "2017-10-02 18:39:13"
    }
}

DELETE CAMPAIGN - Delete a specific link or campaign from a survey.

https://api.alchemer.com/v5/survey/123456/surveycampaign/100000?_method=DELETE

ParametersExampleRequired
Authentication Credentialsapi_token=abcd12345&api_token_secret=abcd12345True

Response Example (.json format):

{
    "result_ok": true
}