src/SendPulseApi.php
public function createCampaign( $senderName, $senderEmail, $subject, $body, $bookId, $name = '', $attachments = '' ) {
        if( empty( $senderName ) || empty( $senderEmail ) || empty( $subject ) || empty( $body ) || empty( $bookId ) ) {
            return $this->handleError( 'Not all data.' );
        }

        if( !empty( $attachments ) ) {
            $attachments = serialize( $attachments );
        }
        $data = array(
            'sender_name'  => $senderName,
            'sender_email' => $senderEmail,
            'subject'      => $subject,
            'body'         => base64_encode( $body ),
            'list_id'      => $bookId,
            'name'         => $name,
            'attachments'  => $attachments
        );

        $requestResult = $this->sendRequest( 'campaigns', 'POST', $data );

        return $this->handleResult( $requestResult );
    }
public function createCampaign( $senderName, $senderEmail, $subject, $body, $bookId, $name = '', $attachments = '' ) {
        if( empty( $senderName ) || empty( $senderEmail ) || empty( $subject ) || empty( $body ) || empty( $bookId ) ) {
            return $this->handleError( 'Not all data.' );
        }

        if( !empty( $attachments ) ) {
            $attachments = serialize( $attachments );
        }
        $data = array(
            'sender_name'  => $senderName,
            'sender_email' => $senderEmail,
            'subject'      => $subject,
            'body'         => base64_encode( $body ),
            'list_id'      => $bookId,
            'name'         => $name,
            'attachments'  => $attachments
        );

        $requestResult = $this->sendRequest( 'campaigns', 'POST', $data );

        return $this->handleResult( $requestResult );
    }
Create new campaign

@param $senderName
@param $senderEmail
@param $subject
@param $body
@param $bookId
@param string $name
@param string $attachments
@return mixed