MailChimp subscription request handler
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


MailChimp subscription request handler, built with Scotty. Intended to support custom signup forms.


Listens for HTTP POST requests at /subscribe. All requests are forwarded to the MailChimp /lists/subscribe endpoint.

Query parameter Description
name Subscriber name. Required.
email_address Subscriber email address. Required.
list_id Mailing list identifier. Required, unless MAILCHIMP_LIST_ID is set.
email_type Either html or text.
double_optin Send a double opt-in confirmation message.
update_existing Accept already existing email addresses.
send_welcome If double opt-in is off, send the list welcome message.


Authentication credentials and defaults can be configured by setting environment variables.

Environment variable Description
MAILCHIMP_API_KEY Authentication token. Required.
MAILCHIMP_LIST_ID Default for list_id.
MAILCHIMP_EMAIL_TYPE Default for email_type.
MAILCHIMP_DOUBLE_OPTIN Default for double_optin.
MAILCHIMP_UPDATE_EXISTING Default for update_existing.
MAILCHIMP_SEND_WELCOME Default for send_welcome.
PORT HTTP listening port. Defaults to 8080.


Installs in seconds on most Linux and OS X machines, using Halcyon.

$ halcyon install
$ mailchimp-subscribe

Deploying to Heroku

Ready to deploy in one click to the Heroku web application platform, using Haskell on Heroku.


Clicking the button is equivalent to executing the following commands:

$ git clone
$ cd mailchimp-subscribe
$ heroku create -b
$ heroku config:set MAILCHIMP_API_KEY=…
$ git push heroku master
$ heroku ps:scale web=1
$ heroku open


Made by Miëtek Bak. Published under the MIT X11 license.