Need An Email Marketing Solution For All Of Your Customers?

Partner With VerticalResponse!

createOptinForm

Input

[vrtypens:createOptinFormArgs]

session_id [xsd:string] (required)
Your API session id.
optin_form [vrtypens:OptinForm]
The API no longer accepts @gmail, @yahoo or @aol ‘confirmation_from_email’ values.

Output

[xsd:int]
The output is the ID of the new form.

Examples

Perl

$vrapi->createOptinForm( {
    session_id => $sid,
    optin_form => {
        name => "Main_subscription",
        redirect_url = >"http://www.verticalresponse.com/thankyou.html",
        confirmation_text => "Thank you for signing up to our newsletter",
        from_label => "VR_Newsletter",
        confirmation_html => "Thank you for signing up. You will receive our newsletter shortly",
        confirmation_text => "Thank you for signing up. You will receive our newsletter shortly",
        confirmation_from_email => "VR_Newsletter",
        border_color => "#FFFFF",
        field_text_color => "#000000",
        confirmation_redirect_url => "http://www.verticalresponse.com/thankyou.html",
        question_collection => [
            {
                name => 'first_name',
                type => 'TEXT',
                position => 1, 
                required => 0,
            },
            {
                name => 'last_name',
                type => 'TEXT',
                position => 2, 
                required => 0,
            },
            {
                name => 'address_1',
                type => 'TEXT',
                position => 3, 
                required => 0,
            },
        ]
}
}
);

PHP

$vrapi->createOptinForm( array(
    'session_id' => $sid,
    'optin_form' => array(
        'name' => "Main_subscription",
        'redirect_url' => "http://www.verticalresponse.com/thankyou.html",
        'confirmation_text' => "Thank you for signing up to our newsletter",
        'from_label' => "VR_Newsletter",
        'confirmation_html' => "Thank you for signing up. You will receive our newsletter shortly",
        'confirmation_text' => "Thank you for signing up. You will receive our newsletter shortly",
        'confirmation_from_email' => "VR_Newsletter",
        'border_color' => "#FFFFF",
        'field_text_color' => "#000000",
        'confirmation_redirect_url' => "http://www.verticalresponse.com/thankyou.html",
        'question_collection' => array(
            array(
                'name' => 'First_Name',
                'type' => 'textbox',
                'position => 1,
                'required' => 0,
            ),
            array(
                'name' => 'Last_Name',
                'type' => 'textbox',
                'position' => 2,
                'required' => 0,
            ),
            array(
                'name' => 'Address',
                'type' => 'textbox',
                'position' => 3,
                'required' => 0,
            ),
        ),
    ),
) );

Ruby

vr.createOptinForm({
    'session_id' => sid,
    'optin_form' => {
        'name' => "Main_subscription",
        'redirect_url' => "http://www.verticalresponse.com/thankyou.html",
        'confirmation_text' => "Thank you for signing up to our newsletter",
        'from_label' => "VR_Newsletter",
        'confirmation_html' => "Thank you for signing up. You will receive our newsletter shortly",
        'confirmation_text' => "Thank you for signing up. You will receive our newsletter shortly",
        'confirmation_from_email' => "VR_Newsletter",
        'border_color' => "#FFFFF",
        'field_text_color' => "#000000",
        'confirmation_redirect_url' => "http://www.verticalresponse.com/thankyou.html",
        'question_collection' => [
            {
                'name' => 'First_Name',
                'type' => 'textbox',
                'position' => 1,
                'required' => 0,
            },
            {
                'name' => 'Last_Name',
                'type' => 'textbox',
                'position' => 2,
                'required' => 0,
            },
            {
                'name' => 'Address',
                'type' => 'textbox',
                'position' => 3,
                'required' => 0,
            },
        ],
    },
})