List Survey Campaigns
Returns a paginated list of all links and campaigns for the specified survey.
Endpoint
GET
v5/survey/{survey_id}/surveycampaign
Requires authentication
Path Parameters
The survey whose campaigns should be retrieved.
survey_id
string
required
The ID of the survey whose campaigns will be listed.
Query Parameters
All query parameters are optional.
page
integer
Page number to return. Defaults to 1.
resultsperpage
integer
Number of results to return per page. Default is 50, maximum is 500.
Response
Returns a paginated array of campaign objects.
result_ok
boolean
Whether the request succeeded.
total_count
string
Total number of campaigns for the survey.
page
integer
Current page index.
total_pages
integer
Number of available pages.
results_per_page
integer
Number of results returned per page.
data
array
Array of campaign objects.
child attributes
id
string
The unique ID of the campaign.
invite_id
string | null
The invite ID associated with email campaigns.
null for link-type campaigns.type
string
The object type. Always
SurveyCampaign.link_type
string
The broad type of the campaign. Possible values:
link, email.subtype
string
The campaign subtype. Possible values:
standard, hiddenlink, private, shortlink, subdomain.status
string
The campaign status. Possible values:
Active, Closed, Deleted.name
string
The display name of the campaign.
uri
string
The public URL of the survey link.
SSL
string
Whether SSL is enabled for the link. Returns
"True" or "False".token_variables
string | null
URL-encoded token variables attached to the campaign link, if any.
limit_responses
integer | null
The maximum number of responses allowed through this campaign, if set.
close_message
string | null
The message displayed when the campaign is closed, if configured.
link_open_date
string | null
The scheduled open date for the campaign link, in
Y-m-d H:i:s format.link_close_date
string | null
The scheduled close date for the campaign link, in
Y-m-d H:i:s format.language
string
The language setting for the campaign.
Auto detects the respondent's browser language.date_created
string
Timestamp when the campaign was created.
date_modified
string
Timestamp when the campaign was last modified.
Examples
Note GET requests are cached for 60 seconds. Repeated identical requests within that window will return cached results.
Request (cURL)
curl -X GET "https://api.alchemer.com/v5/survey/123456/surveycampaign?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET"
Response
{
"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"
}
]
}