3

Announcement List API

 3 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/217077998-Announcement-List-API-commands
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

announcement_list-list_lists

Dump a list of all Announcement Lists you have on your account(s).

Command announcement_list-list_lists Values (none) Result

success
account_id listname domain name start_date max_bounces num_subscribers
1 fun example.com "DH Fun" <[email protected]> 2007-12-13 5 102
1 announcements dreamhost.com "DH Announcements" <[email protected]> 2001-05-09 6 302420

Possible errors (none)

announcement_list-list_subscribers

Dump a list of all subscribers to an Announcement List.

Command announcement_list-list_subscribers Values

listname : The name of the Announcement List, like announcements
domain : The domain of the Announcement List, like example.com

Result

success
email confirmed subscribe_date name num_bounces
[email protected] 1 2007-12-13 16:55:15 Josh 0
[email protected] 1 2007-12-13 16:55:08 Joe 0
[email protected] 1 2007-12-19 09:16:32 John 0

Possible errors

no_listname
no_domain
no_such_listname
no_such_domain

announcement_list-add_subscriber

Sends an opt-in email to an email address to ask them to subscribe to an Announcement List.

Command announcement_list-add_subscriber Values

listname : The name of the Announcement List, like announcements
domain : The domain of the Announcement List, like example.com
email : The email address to subscribe, like [email protected]
name : The name of the person, like Josh Jones (optional)

Result

success
sent_opt_in_email

Possible errors

no_listname
no_domain
no_such_listname
no_such_domain
no_email
invalid_email (may have specifics after a tab)
already_subscribed
email_may_not_be_added_to_any_dreamhost_list_ever
email_requested_to_be_added_in_last_two_days_already (may have specifics after a tab)
internal_error_opting_in

announcement_list-remove_subscriber

Immediately removes an email address from an Announcement List.

Command announcement_list-remove_subscriber Values

listname : The name of the Announcement List, like announcements
domain : The domain of the Announcement List, like example.com
email : The email address to unsubscribe, like [email protected]

Result

success
unsubscribed

Possible errors

no_listname
no_domain
no_such_listname
no_such_domain
no_email
not_subscribed
internal_error_unsubscribing

announcement_list-post_announcement

Post an announcement to an Announcement List.

Command announcement_list-post_announcement Values

listname : The name of the Announcement List, like announcements
domain : The domain of the Announcement List, like example.com
subject : The subject of the message (optional)
message : The text of the message to send
name : The name for the list to use, like: "list name" <[email protected]>
stamp : The time to send the message, like 2009-05-28 19:40:00 (optional)
charset : The character set in which the message is encoded (optional)
type : The format of the message, either text or HTML (optional)
duplicate_ok: Whether to allow duplicate messages to be sent, like 1 or 0 (optional)

Result

success
posted

Possible errors

no_listname
no_domain
no_such_listname
no_such_domain
message_required
invalid_stamp
invalid_type
invalid_name
duplicate_message (may have specifics after a tab)
internal_error_updating_list
internal_error_sending_mail


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK