API::Drip::Request - Perl interface to


Version 0.05


    use API::Drip::Request;

    my $drip = API::Drip::Request->new();

    $drip->do_request( POST => 'subscribers', { subscribers => [ { email => '', ... }] } );


Low-level perl interface to the Drip API as specified at

All of the methods in this module will throw exceptions on error.



Creates the API::Drip::Request object. See "CONFIGURATION" for accepted parameters.

Also accepts:


A codref that should accept a list of diagnostic strings and log them somewhere useful for debugging purposes. Only used when DRIP_DEBUG is true.


Accepts the following positional parameters:

HTTP Method (required)

May be 'GET', 'POST', 'DELETE', 'PATCH', etc..

Endpoint (requird)

Specifies the path of the REST enpoint you want to query. Include everything after the account ID. For example, "subscribers", "subscribers/$subscriber_id/campaign_subscriptions", etc...

Content (optional)

Perl hashref of data that will be sent along with the request.

On success, returns a Perl data structure corresponding to the data returned from the server. Some operations (DELETE), do not return any data and may return undef on success. On error, this method will die() with the HTTP::Response object.


Configuration data may be passed in through a number of different ways, which are searched in the following order of preference:

1. As direct paramteters to new().
2. As environment variables.
3. As elments of the first YAML configuration file that is found and readable in the following locations:
1. The location specified by the DRIP_CLIENT_CONF parameter supplied to new().
2. The location specified by $ENV{DRIP_CLIENT_CONF}.
3. $ENV{HOME}/.drip.conf

The following configuration data is accepted:

  • DRIP_TOKEN (required)

    This is the user token assigned to you by drip. When you are logged in, look for "API Token" at

  • DRIP_ID (required)

    This is the numeric user id assigned to you by drip. When logged in, find it in your settings under Account->General Info.

  • DRIP_URI (optional)

    This defaults to You probably shouldn't change this.

  • DRIP_AGENT (optional)

    Defaults to "API::Drip". Specifies the HTTP Agent header.

  • DRIP_DEBUG (optional)

    Defaults to 0. Set to a true value to enable debugging.


Dan Wright, <Dan at DWright.Org>


Please report bugs as an issue via GitHub


You can find documentation for this module with the perldoc command.

    perldoc API::Drip::Request

You can also look for information at:


This code is written to help support my day job and is being released open source thanks to pair Networks, Inc.


Copyright 2017 Dan Wright.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See for more information.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 250:

You forgot a '=back' before '=head1'