This method serves to register or to update a contact.
To re-register a subscriber so that he can receive your email sequence again:
- Delete this subscriber using the del_subscriber method and the parameter: subscription pattern -> 'api_sg'
- Add your contact details again with the set_subscriber method
Field | Type | Description |
---|---|---|
string | Email address to register Required parameters |
|
listeid | integer | Destination list Required parameters |
first_name | string | contact first name |
name | string | Contact name |
civility | string | Contact civility |
address | string | Mailing address of your contact |
Zipcode | integer | Zip code of your contact |
City | string | City of your contact |
country | string | Country of your contact |
website | string | Web site of your contact |
telephone | string | Landline telephone of your contact |
mobile | string | Mobile phone of your contact |
skype | string | Skype address of your contact |
UserName | string | Username of your contact |
Birthday | string | Birthday of your contact Type AAAA-MM-JJ |
ip | string | IP address of your contact Required parameters Otherwise, it will be the IP address of your server that will be registered as belonging to your contact. Except, our security system applies by default a limitation of 50 registrations by IP address (except exceptional dispensation). |
sponsor | string | Sponsor of your contact |
field_1 | string | Personalized field 1 |
field_2 | string | Personalized field 2 |
field_3 | string | Personalized field 3 |
field_4 | string | Personalized field 4 |
field_5 | string | Personalized field 5 |
field_6 | string | Personalized field 6 |
field_7 | string | Personalized field 7 |
field_8 | string | Personalized field 8 |
field_9 | string | Personalized field 9 |
field_10 | string | Personalized field 10 |
field_11 | string | Personalized field 11 |
field_12 | string | Personalized field 12 |
field_13 | string | Personalized field 13 |
field_14 | string | Personalized field 14 |
field_15 | string | Personalized field 15 |
field_16 | string | Personalized field 16 |
// Ajout de John Doe dans la liste 12345.
$sgApi
->set('listeid', 12345)
->set('nom', 'Doe')
->set('prenom', 'John')
->set('email', 'John.Doe@domain.ext')
->set('champs_1', 'test')
->set('ip', $_SERVER["REMOTE_ADDR"]);
$call = $sgApi->call('set_subscriber');