API/Announcement list commands

From DreamHost
Jump to: navigation, search

Contents

Announcement list commands

The announcement_list API module allows you to manage announcement lists and subscribers.

Commands

announcement_list-list_lists

Dump a list of all announcement lists you have on your account(s).

Values:

(none)

Result:

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

Possible Errors:

(none)

announcement_list-list_subscribers

Dump a list of all subscribers to an announcement list.

Values:

listname : the name of the announcement list, like announcements
domain : the domain of the announcement list, like mydomain.com

Result:

success
email	confirmed	subscribe_date	name	num_bounces
josh@gmail.com	1	2007-12-13 16:55:15	Josh	0
joe@hotmail.com	1	2007-12-13 16:55:08	Joe	0
john@yahoo.com	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.

Values:

listname : the name of the announcement list, like announcements
domain : the domain of the announcement list, like mydomain.com
email : the email address to subscribe, like test@test.com
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.

Values:

listname : the name of the announcement list, like announcements
domain : the domain of the announcement list, like mydomain.com
email : the email address to unsubscribe, like test@test.com

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.

Values:

listname : the name of the announcement list, like announcements
domain : the domain of the announcement list, like mydomain.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" <list@domain.com>
stamp : the time to send the message, like 2009-05-28 10:40AM (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
Personal tools