Collection of my Open Source projects

Download .zip Download .tar.gz View on GitHub


This gem is meant to be a simple ActiveResource based interface to DocuSign's REST api. Where applicable, objects know about their association relationships.

You can read more about DocuSign's REST API:

SPECIAL NOTE: I do not yet have access to the production server, so please consider this a beta. It has only been tested against the demo server and against the expected responses provided by the above API guide.


  • reactive_resource
  • multipart_post

This library will handle multipart post requests to DocuSign and provide the correct headers for the individual posts. The multipart_post gem is required for its internals, but not used as it did not allow the headers DocuSign expects.


You can use either the X-DocuSign-Authentication header or an OAuth2 bearer token to access the API. Configuration for your app is simple.


Docusigner::Base.authentication = {
  :username => "your_username_here",
  :password => "your_password_here",
  :integrator_key => "your_integrator_key_here"


Docusigner::Base.token = "your_api_token"

Additionally, you can easily request (or revoke) a token through the API.

# request an OAuth2 token
token = Docusigner::Oauth2.token("username", "password", "integrator_key")

# revoke an OAuth2 token


By default, the API points to the development platform at Changing to the live site is simple: = ""


Once you've configured the client, accessing resources is easy. This client is based off of reactive_resource which is built off of active_resource. Code should look similar to using ActiveRecord objects.


Fetch basic account information

# find the account
account = Docusigner::Account.find(1234)

# access basic attributes
=> 1234
=> "My account name" 

# list templates
=> [#<Docusigner::Template>, #<Docusigner::Template>]

Create an envelope

envelope ={
  :account_id => 1234,
  :emailSubject => "Fee Agreement",
  :emailBlurb => "Please sign the attached document"
  :recipients => {
    :signers => [
        :email => "",
        :name => "Bob Smith",
        :recipientId => 1,
        :clientUserId => 123, # if you want to do 
        :tabs => {
          # can add tabs here
  :documents => [
      :name => "Fee Agreement",
      :documentId => 333,
  :status => Docusigner::Envelope::Status::SENT
envelope.add_document("/path/to/document.pdf"), 333)

For the most part, the complex data structures expected as parameters can be expressed with nested hashes when creating elements.


If you would like to contribute, please fork my repository and send me a pull request. Please include tests.

I have not implemented every API endpoint, as I do not have enough time right now.