Add a person to Autopilot or update their properties.
You can add a person to Autopilot and Delighted will automatically schedule a survey for them and continue sending surveys at the frequency configured in your Autopilot settings. You can also include any properties you would like to attach to the surveys sent to this person via Autopilot.
To change the properties used for a person's Autopilot surveys, send a new Map/Dictionary of properties with their email and/or phone number, which will replace the old properties. Delighted will use the new properties for the next upcoming and all future Autopilot surveys. Other surveys outside of Autopilot will not be affected by these new properties.
POST /v1/autopilot/email/memberships.json
For SMS:POST /v1/autopilot/sms/memberships.json
curl https://api.delighted.com/v1/autopilot/email/memberships.json \
-u YOUR_DELIGHTED_API_KEY: \
-H "Content-Type: application/json" \
-d '{
"person_email": "jony@appleseed.com",
"properties": {
"Purchase Experience": "Mobile App",
"State": "CA"
}
}'
result = Delighted::AutopilotMembership::Email.create(
person_email: "jony@appleseed.com",
properties: {
"Purchase Experience": "Mobile App",
"State": "CA"
}
)
result = delighted.autopilotMembership.forEmail().create({
person_email: 'jony@appleseed.com',
properties: {
'Purchase Experience': 'Mobile App',
'State': 'CA'
}
});
$properties = ['Purchase Experience' => 'Mobile App', 'State' => 'CA'];
$result = \Delighted\AutopilotMembership\Email::create(['person_email' => 'jony@appleseed.com', 'properties' => $properties]);
properties = {'Purchase Experience': 'Mobile App', 'State': 'CA'}
result = delighted.AutopilotMembership.forEmail().create(person_email='jony@appleseed.com', properties=properties)
{
"person": {
"id": "1",
"name": null,
"email": "jony@appleseed.com",
"created_at": 1725382891,
"phone_number": "+1555555112"
},
"properties": {
"Purchase Experience": "Mobile App",
"State": "CA"
}
}
Name | Type | Description |
---|---|---|
person_id |
String | Id of the person to be added to or updated in Autopilot. |
person_email |
String | Email of the person (required for Autopilot surveys by email). |
person_phone_number |
String |
Phone number of the person (required for Autopilot surveys by SMS). The phone number format must be E.164 (e.g. |
person_name |
String | Name of the person. |
properties |
Map/Dictionary |
Custom properties to associate with the survey. You can add as many properties as you need.
For each property you wish to add, pass a separate
For example, if you wanted to add a “Customer ID” and a “Location”, you would
you could pass 2 parameters,
You can optionally set a custom Question Product Name to be used in the survey question. For example, our fictitious clothing company, Hem & Stitch, could pass
You can optionally set a custom Delighted Email Subject to be used in the survey email (150 character limit). For example, our fictitious clothing company, Hem & Stitch, could pass
You can optionally set a custom Delighted Intro Message to be used in the survey email (300 character limit). For example, our fictitious clothing company, Hem & Stitch, could pass
You can optionally set a specific Locale to be used in the survey experience. This will determine localization (including language) of the survey experience. This locale string is composed of a lowercase ISO 639-1 language code and an optional uppercase ISO 3166-1 alpha-2 country code, separated by a hyphen. For example, to specify German, pass
We currently support the following locales: ar/Arabic, bg/Bulgarian, zh-CN/Chinese (Simplified), zh-HK/Chinese (Traditional, Hong Kong), zh-TW/Chinese (Traditional, Taiwan), hr/Croatian, cs/Czech, da/Danish, nl/Dutch, en/English, et/Estonian, fi/Finnish, fr/French, ka/Georgian, de/German, el/Greek, he/Hebrew, hu/Hungarian, id/Indonesian, it/Italian, ja/Japanese, ko/Korean, lv/Latvian, lt/Lithuanian, ms/Malaysian, nb/Norwegian Bokmål, pl/Polish, pt-BR/Portuguese (Brazil), pt/Portuguese (Portugal), ro/Romanian, ru/Russian, sr/Serbian, es/Spanish, sv/Swedish, th/Thai, tr/Turkish, and vi/Vietnamese. If you pass a value which is not in this list, the default en/English locale will be used. Please get in touch with us if you would like us to add a locale.
You can optionally configure the thank you page with a custom message and link. For example, pass
|
Name | Type | Description | |
---|---|---|---|
properties |
Map/Dictionary |
A JSON object of property names and values that will be attached to Autopilot survey requests for this person. |
|
Nested under person |
|||
id |
String | Id of the person. | |
name |
String | Name of the person, if defined. | |
email |
String | Email of the person. | |
phone_number |
String | Phone number of the person, if defined. | |
created_at |
Timestamp | A Unix timestamp describing when the person was added. |