Create survey contact

Create Survey Contact

Creates a new contact within the specified survey campaign. Contact records are keyed by email address — one record per email address is stored per account.

Endpoint

PUT v5/survey/{survey_id}/surveycampaign/{campaign_id}/surveycontact

Requires authentication

Path Parameters

The survey and campaign in which to create the contact.

survey_id
string
required
The ID of the survey.
campaign_id
string
required
The ID of the survey campaign.

Query Parameters

email_address
string
required
The contact's email address. Used as the unique key per account. Changes to standard contact fields for an existing email address are applied globally across all campaigns.
first_name
string
The contact's first name.
last_name
string
The contact's last name.
organization
string
The contact's organization.
division
string
The contact's division.
department
string
The contact's department.
team
string
The contact's team.
group
string
The contact's group.
role
string
The contact's role.
home_phone
string
The contact's home phone number.
fax_phone
string
The contact's fax number.
business_phone
string
The contact's business phone number.
mobilephone
string
The contact's mobile phone number. Used when creating contacts via an SMS campaign.
mailing_address
string
The contact's street address.
mailing_address2
string
The contact's secondary address line (e.g. suite number).
mailing_address_city
string
The contact's city.
mailing_address_state
string
The contact's state or region.
mailing_address_country
string
The contact's country.
mailing_address_postal
string
The contact's postal code.
title
string
The contact's job title.
url
string
A URL associated with the contact.
customfield1–10
string
Custom fields 1–10 available as part of the email campaign contact list. Pass individually as customfield1, customfield2, etc.
custom[fieldname]
string
Custom fields from your account email lists. Pass using the field name as the key. Example: custom[customerid]=value. To find field names, go to Account > Email Lists > Manage Custom Fields.
status
string
The contact's status. Accepted values: Active, Inactive. Creating a contact with status Inactive will unsubscribe the contact from the campaign.
allowdupe
boolean
When set to true, allows a duplicate contact entry to be created for an email address that already exists in the campaign.

Response

Returns the newly created contact object, including the contact's unique respondent link.

Note The unique invite link associated with the contact is returned in the response of the create contact call.

result_ok
boolean
Whether the request succeeded.
data
object
The newly created contact object. See List Survey Contacts for the full list of fields.

Examples

Request (cURL)
curl -X PUT "https://api.alchemer.com/v5/survey/123456/surveycampaign/100000/surveycontact?api_token=YOUR_API_TOKEN&api_token_secret=YOUR_API_TOKEN_SECRET&email_address=newexample@email.com&first_name=Jon&last_name=Doe"
Response
{
  "result_ok": true,
  "data": {
    "id": 100039753,
    "email_address": "newexample@email.com",
    "first_name": "Jon",
    "last_name": "Doe",
    "organization": "",
    "title": "",
    "invitelink": "http://s-123-i.sgizmo.com/s3/abcdefg",
    "status": "Active",
    "subscriber_status": "Unsent",
    "date_last_sent": ""
  }
}