index.js
function createCampaign(callback, senderName, senderEmail, subject, body, bookId, name, attachments){
    if ((senderName===undefined)||(! senderName.length)||(senderEmail===undefined)||(! senderEmail.length)||(subject===undefined)||(! subject.length)||(body===undefined)||(! body.length)||(bookId===undefined)){
        return callback(returnError('Not all data.'));
    }
    if (name===undefined){
        name='';
    }
    if (attachments===undefined) {
        attachments='';
    }
    if (attachments.length){
        attachments = serialize(attachments);
    }
    var data = {
        sender_name: senderName,
        sender_email: senderEmail,
        //subject: encodeURIComponent(subject),
        //subject: urlencode(subject),
        subject: subject,
        body: base64(body),
        list_id: bookId,
        name: name,
        attachments: attachments
    }
    sendRequest( 'campaigns', 'POST', data, true, callback );
}
function createCampaign(callback, senderName, senderEmail, subject, body, bookId, name, attachments){
    if ((senderName===undefined)||(! senderName.length)||(senderEmail===undefined)||(! senderEmail.length)||(subject===undefined)||(! subject.length)||(body===undefined)||(! body.length)||(bookId===undefined)){
        return callback(returnError('Not all data.'));
    }
    if (name===undefined){
        name='';
    }
    if (attachments===undefined) {
        attachments='';
    }
    if (attachments.length){
        attachments = serialize(attachments);
    }
    var data = {
        sender_name: senderName,
        sender_email: senderEmail,
        //subject: encodeURIComponent(subject),
        //subject: urlencode(subject),
        subject: subject,
        body: base64(body),
        list_id: bookId,
        name: name,
        attachments: attachments
    }
    sendRequest( 'campaigns', 'POST', data, true, callback );
}
Create new campaign

@param callback
@param senderName
@param senderEmail
@param subject
@param body
@param bookId
@param name
@param attachments