Error when adding subscribers via API?

Hi all,
I am having some trouble adding subscribers to my list using the API

require 'httparty'
require 'json'

def request
    url = ''
    auth = {:username => 'MYAPIKEY', :password => 'x'}
    response =, 
:basic_auth => auth, :body => {
'EmailAddress' => '',
'Name' => 'Test',
'Resubscribe' => true,
'RestartSubscriptionBasedAutoresponders' => true
 puts response
 puts response.code

I can make other requests but when I run this code I get the error message

{"Code"=>1, "Message"=>"Invalid Email Address"}

I can assure you that my email is a valid email.

Any help would be much appreciated as I am completely lost at this stage. This post can also be found on Stack OverFlow here
Stackover Flow

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free