The RocketResponder API

The RocketResponder API allows you to integrate your list into your current work flow. You can get started integrating in minutes!


AUTHENTICATION

All API requests require an API Key. Authentication is done using HTTP Basic Authentication using the API Public Key as the Username and a Signature as the Password. The Signature is generated using an MD5 Hash of the parameters below.

Every request must include a unix timestamp passed as the parameter Time. Requests must be made within 10 minutes of the Signature being generated.

Parameters

PrivateKey This is the user's Private API Key
API Endpoint URL The full URL to the endpoint being called:
https://www.rocketresponder.com/api/subscriber/subscribe
Parameter Hash All the parameters being passed via GET or POST, converted to strings, sorted alphabetically, encoded to JSON format, and hashed with MD5.

PHP Example

$POST["Time"] = time();
$POST = array_map('strval',$POST);
array_multisort($DATA, SORT_ASC, SORT_STRING);
$HASH = md5(json_encode($DATA));
$Signature = md5($PrivateKey . "https://www.rocketresponder.com/api/subscriber/subscribe" . $HASH);

RESPONSES

Every API call will return a json encoded array.

Response Array

status Returns Success or Failed if the call being made is succesfull or not.
error Optional - If the status is Failed the reason will be returned as an error.
(object) Depending on the call, an object will be returned. For example if a subscriber call the subscriber object will be returned if a valid subscriber was found.

LIST OBJECT

All list calls return the list's information as an object if a valid list is found.

Parameters

[list] => stdClass Object (
[ID] => 22
[Permalink] => johntips
[Name] => John's Great List of Marketing Tips
[FromEmail] => john@johnstips.com
[FromName] => John's Tips
[Active] => 32
)

POST /api/list/all

Returns an array of List Objects of the authenticated API user.

Parameters

There are no parameters for this call

POST /api/list/create

Creates a new list and returns the list as an object.

Parameters

Name
required
The list's name, seen by subscribers
Permalink
required
Used in links generated for the list, must be unique and contain only letters and numbers.
FromEmail
required
The email address emails will be sent from. Do *not* use a yahoo address.
FromName
required
The name emails will be sent from, can be company name or brand name.
Address
required
The mailing address for CAN SPAM compliance, can be a PO BOX.
Notify
optional
0 - No notifications, 1 - When they subscribe, 2 - When they confirmo
Header
optional
The text above the confirmation link in the confirmation email.
Footer
optional
The text below the confirmation link in the confirmation email.

SUBSCRIBER OBJECT

All subscriber calls return the subscriber's information as an object if a valid subscriber is found.

Parameters

[subscriber] => stdClass Object (
[ID] => 2352
[LID] => 154
[Email] => john.doe@test.com
[Name] => John Doe
[First] => John
[Last] => Doe
[Status] => Unsubscribed
[JoinIP] => 192.168.1.42
[JoinTime] => 1412776783
[JoinURL] => https://www.rocketresponder.com/subscribe/test
[ConfirmIP] => 192.168.1.42
[ConfirmTime] => 1412776807
[ConfirmURL] =>
[ActionTime] => 1412776807
[ActionIP] => 192.168.1.42
[UnsubTime] => 1412776847
[UnsubIP] => 192.168.1.42
[Sent] => 10
[Open] => 5
[Click] => 3
[Bounce] => 0
[Custom] => stdClass Object (
[Username] => jondoe52
)
)

POST /api/subscriber/subscribe

Subscribes the email address to the list specified.

Parameters

email
required
The email address of the user to be subscribed
LID
required
The ID number of the List the user is being subscribed to
name
optional
The full name of the user being subscribed

POST /api/subscriber/lookup

Searches for a subscriber on a list.

Parameters

email
required
The email address of the user
LID
required
The ID number of the List the user is being subscribed to

POST /api/subscriber/modify

Modifies the subscription for a user. The old email address will continue to receive emails until the new email address is confirmed. On confirmation the old address will be unsubscribed.

Parameters

email
required
The email address of the user being modified
LID
required
The ID number of the List the user is being subscribed to
newemail
required
The new email address of the user being modified
name
optional
The updated name of the user being modified

POST /api/subscriber/unsubscribe

Unsuscribes the email address from the list specified.

Parameters

email
required
The email address of the user to be subscribed
LID
required
The ID number of the List the user is being subscribed to

The RocketResponder PHP SDK

Want to get started without any fuss? Download our simple PHP SDK. Below are examples of how to use it. It handles all the authentication for you, so you can drop it into your current flow!

Subscribing Users Without a Name

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds", "priv_03280Dlj39DkljdsDkdLKj02");
$rocket->subscribe("johndoe@test.com", 154);

Subscribing Users With a Name

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds ", "priv_lj39DkljdsDk03280DdLKj02");
$rocket->subscribe("johndoe@test.com", 154, array("name"=>"John Doe"));

Looking Up a Subscriber

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds", "priv_03280Dlj39DkljdsDkdLKj02");
if ($response = $rocket->subscribe("johndoe@test.com", 154)) {
echo "Subscriber Status is: " $response->subscriber->Status;
}

Modifying Users Without Updating Their Name

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds", "priv_03280Dlj39DkljdsDkdLKj02");
$rocket->modify("johndoe@test.com", 154, "newjohndoe@test.com");

Modifying Users While Updating Their Name

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds ", "priv_lj39DkljdsDk03280DdLKj02");
$rocket->modify("johndoe@test.com", 154, "newjohndoe@test.com", array("name"=>"John Doe"));

Unsubscribing a User

include "RocketResponder.class.php";
$rocket = new RocketResponder("pub_0DkdLKj023280Dlj39Dkljds", "priv_03280Dlj39DkljdsDkdLKj02");
$rocket->unsubscribe("johndoe@test.com", 154);