List Email Messages
Returns a list of all email messages for the specified survey campaign.
Endpoint
GET
v5/survey/{survey_id}/surveycampaign/{campaign_id}/emailmessage
Requires authentication
Path Parameters
The survey and campaign whose email messages should be retrieved.
survey_id
string
required
The ID of the survey.
campaign_id
string
required
The ID of the survey campaign.
Query Parameters
This endpoint does not accept additional query parameters beyond authentication credentials.
None
Response
Returns a paginated list of email message objects for the campaign.
result_ok
boolean
Whether the request succeeded.
total_count
integer
Total number of email messages in the campaign.
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 email message objects.
child attributes
id
integer
The unique ID of the email message.
subtype
string
The message subtype. Possible values:
message, reminder.message_type
string
The format of the message. Possible values:
plaintext, html.medium
string
The delivery medium. Always
Email.invite_identity
integer
The internal ID of the campaign (invite identity) this message belongs to.
status
string
The current send status of the message (e.g.
Building, Sent).from
object
The sender details for the message.
child attributes
email
string
The sender's email address.
name
string
The sender's display name.
subject
string
The email subject line.
body
object
The message body content.
child attributes
text
string
The plaintext version of the message body.
html
string
The HTML version of the message body. Empty string if the message is plaintext only.
footer
string
The message footer text, typically including the physical address and unsubscribe link merge codes.
embed_question
boolean
Whether the first survey question is embedded in the email body.
disable_styles
boolean
Whether default email message styles are disabled.
date_created
string
Timestamp when the message was created.
date_modified
string
Timestamp when the message 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/100000/emailmessage?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET"
Response
{
"result_ok": true,
"total_count": 2,
"page": 1,
"total_pages": 1,
"results_per_page": 2,
"data": [
{
"id": 128073,
"subtype": "message",
"message_type": "html",
"medium": "Email",
"invite_identity": 94135,
"status": "Building",
"from": {
"email": "surveys@sgizmo.com",
"name": "Survey Research"
},
"subject": "Please take a moment to fill out this survey",
"body": {
"text": "Hi\nI'm currently running a study...\n\n[invite(\"survey link\")]\n\nThank You!",
"html": "Hi\n\nI'm currently running a study...\n\n[invite(\"html link\"), title=\"Begin\"]\n\nThank You!"
},
"footer": "This message was sent by [account(\"physical address\")].\nTo unsubscribe, click below:\n[invite(\"unsubscribe link\")]",
"embed_question": null,
"disable_styles": null,
"date_created": "2014-07-29 11:25:54",
"date_modified": "2016-05-24 14:53:33"
},
{
"id": 147089,
"subtype": "reminder",
"message_type": "plaintext",
"medium": "Email",
"invite_identity": 94135,
"status": "Building",
"from": {
"email": "surveys@sgizmo.com",
"name": "DaveDom"
},
"subject": "Reminder: Please take a moment to fill out this survey",
"body": {
"text": "Hi\nI'm currently running a study...\n\n[invite(\"survey link\")]\n\nThank You!",
"html": ""
},
"footer": "This message was sent by [account(\"physical address\")].\nTo unsubscribe, click below:\n[invite(\"unsubscribe link\")]",
"embed_question": null,
"disable_styles": null,
"date_created": "2016-05-31 16:19:38",
"date_modified": "2016-05-31 16:24:08"
}
]
}