The createList method creates a new contact list.
A contact list should normally represent a specific subscription topic or type of communication. Contacts can subscribe to or unsubscribe from individual lists on the subscription management page available through the unsubscribe link in an email.
For this reason, we do not recommend creating a new list for every campaign. If you want to send different campaigns to different groups of contacts, you can use existing lists, segments, or specify recipients when creating a campaign.
Each contact list in a Selzy account must have a unique name. If you try to create a list with a name that already exists, the API will return an error.
If you need to update the contacts in a list before sending a campaign, use the importContacts or exportContacts methods. You can also specify email addresses or phone numbers directly in the createCampaign method.
Principle of use
| Syntax and URL to call the method |
| createList (string title, [string before_subscribe_url, string after_subscribe_url, array sub_user_rights]) |
| https://api.selzy.com/en/api/updateList?format=json&api_key=KEY&list_id=ID&title=NewListName |
| Arguments | |
| api_key * | API access key. |
| title * | List name. It must be unique in your account.
Examples: title=NewListTitle title=%D0%9D%D0%BE%D0%B2%D1%8B%D0%B9 («New» in the UTF-8 format) |
| before_subscribe_url | This URL redirects contacts to a page that comes after they submit the subscription form, but before they confirm their subscription. This page usually tells contacts to check their email and follow the confirmation link to complete the subscription.
You can use merge tags in the URL to pass contact-specific data. For example, you can include the contact's email address or an ID stored in a custom field. |
| after_subscribe_url | This URL redirects to the post-subscription page. Usually this page shows a message that the subscription has been completed successfully.
You can use merge tags in the URL to pass contact-specific data. For example, you can include the contact's email address or an ID stored in a custom field. |
| sub_user_rights[<sub_user_id>][<right>] | Access rights to the list for additional account users (no more than 10 additional users per request).
This parameter is available only for additional users who have permissions to access your lists. <right> can have the following values: access, send_email, send_sms. For access, the available values are: view_stats, view, manage, none (none removes the additional user’s access to the list). For send_email and send_sms, the available values are: 0, 1. |
| Return value |
| Empty JSON object
If there are any errors or warnings, they are returned in the error/warnings fields as described. |