API version:

Sends a document from reusable templates with the specified id.

param merge_field_identifier and sub-param name has been added, see Params Section below to know more.

Supported Formats

json

Errors

Code Description
400 invalid_scope
400 unauthorized_client
401 Can't find Reusable Template.
401 Unauthorized account for Reusable Template.
422 The role name supplied (<NAME>) does not match the role name expected.
422 Merge field ids/names do not match the reusable template's merge fields.

Examples

POST /public/{version}/reusable_templates/fcc2517e-c596-4d91-9f59-112a292eb643/send_document
{
  "access_token": "6732e93a3f4647b8f33260eba68041cf97542a224b687de189920644172c3bcb",
  "message": "Please sign this",
  "expires_in": 30,
  "roles": [
    {
      "name": "signer1",
      "signer_email": "geoff@sample.com",
      "signer_name": "geoff"
    }
  ],
  "name": "This is the name of a document",
  "reusable_template": {
    "roles": [
      {
        "name": "signer1",
        "signer_email": "geoff@sample.com",
        "signer_name": "geoff"
      }
    ]
  }
}
200
{
  "document": {
    "id": "526819c7-45df-4b71-82c0-6aab3ac1a1dc",
    "current_signer_id": "813e6fa2-650c-4da6-b27f-a3861967f20f",
    "name": "This is the name of a document",
    "filename": "application.pdf",
    "executed_at": null,
    "expired_at": "2018-06-06T08:23:31.934-07:00",
    "sent_at": "2018-05-07T08:23:31.961-07:00",
    "state": "pending",
    "thumbnail_url": "https://rightsign-development.s3.amazonaws.com/base_files/processed/b4cbbcd26be61d830bace968d28bad7c1046c1f759a5f40b7e01da4fbccac152_123_0_wi/thumbnail_p1.png?AWSAccessKeyId=AKIAJSRMQNOZ6XOBJZ4A&Expires=1525793011&Signature=az2LSkGPzh4fchAdgQm0ZnVotoY%3D",
    "sender": {
      "id": "df5c5874-6613-4a9b-8ef6-34e2a932b03a",
      "name": "Prince Effertz",
      "email": "jayda@gibsonkuhic.name",
      "signer": false
    },
    "recipients": [
      {
        "role_name": "signer1",
        "name": "geoff",
        "email": "geoff@sample.com",
        "status": "pending",
        "id": "813e6fa2-650c-4da6-b27f-a3861967f20f",
        "sign_url": "https://secure.rs.dev:3000/signers/813e6fa2-650c-4da6-b27f-a3861967f20f/sign?access_token=yWSRRzysutShj15ydX4h",
        "remind_url": "https://api.rs.dev:3002/public/{version}/signers/813e6fa2-650c-4da6-b27f-a3861967f20f/reminders",
        "message": "Please sign this",
        "sequence": 0
      }
    ],
    "audits": [],
    "page_image_urls": [
      "https://rightsign-development.s3.amazonaws.com/base_files/processed/b4cbbcd26be61d830bace968d28bad7c1046c1f759a5f40b7e01da4fbccac152_123_0_wi/original_p1.png?AWSAccessKeyId=AKIAJSRMQNOZ6XOBJZ4A&Expires=1525793012&Signature=7LwQlkS5zTna5gDFhuM5y0J307c%3D"
    ],
    "signed_pdf_url": null,
    "tags": {},
    "merge_field_values": [],
    "embed_codes": null,
    "in_person": false,
    "shared_with": [
      "test@test.com"
    ],
    "identity_method": "email",
    "passcode_pin_enabled": false,
    "original_file_url": "https://rightsign-development.s3.amazonaws.com/base_files/original/af7d073d-74eb-4539-8412-5a7c4e262cd5/application.pdf?AWSAccessKeyId=AKIAJSRMQNOZ6XOBJZ4A&Expires=1525793012&Signature=fv5yF%2BLySuyCjOCr%2FcZBq7L7aDs%3D&response-content-disposition=attachment%3B%20filename%3Dapplication.pdf"
  }
}

Params

Param name Description
name
required

A name for the document you are sending

Validations:

  • Must be a valid string.

shared_with
optional

List of email recipients to share the document with

Validations:

  • Must be an array of String

message
optional

A message for all signers

Validations:

  • Must be a String

in_person
optional

Whether the document should be signed in person

Validations:

  • Must be one of: true, false.

callback_url
optional

Document callback url. The URL will receive a POST for each of the following document events: created, viewed, signed, executed, voided, declined. Note that due to the asynchronous nature of processing, the order in which the document callbacks are sent is not guaranteed. Only HTTP ports 80, 8000-8099, 3000-3009 and HTTPS port 443 is supported. Basic auth is also supported. Ex. “me:pass@yourhost.example:8001/callback”.

ex. callback when document is viewed {

"callbackType":"Document",
"id":"edc7823a-7b99-45d7-9c3c-c7dc81f8dbf2",
"event":"viewed",
"documentState":"pending",
"createdAt":"2016-11-14T13:45:23.199-08:00"

}

Validations:

  • Must be a String

roles
required

Document signers

Validations:

  • Must be an Array of nested elements

roles[name]
required

Role name. For text tags, the role name in the request must correspond to the recipient name given as the second argument (name) in the text tag. When signer sequencing is enabled, the role name must match the signer name set on the template.

Validations:

  • Must be a String

roles[signer_name]
optional

Signer name

Validations:

  • Must be a String

roles[signer_email]
optional

Signer email

Validations:

  • Must be a String

roles[signer_omitted]
optional

A signer can be omitted if set to true and if signer_sequencing is enabled

Validations:

  • Must be one of: true, false.

roles[is_sender]
optional

Is signer the owner of document?

Validations:

  • Must be one of: true, false.

roles[message]
optional

Custom message to signer.

Validations:

  • Must be a String

merge_field_identifier
optional

Merge Field Identifier. By specifying it to “name” API user can map merge field value with the name instead of merge field id

Validations:

  • Must be one of: id, name.

merge_field_values
optional

Merge Fields

Validations:

  • Must be an Array of nested elements

merge_field_values[id]
optional

Merge Field ID

Validations:

  • Must be a String

merge_field_values[name]
optional

Merge Field Name. This is the name provided to the merge field on the webapp, while creating the template. If it matches more than one merge field component in template all of them will be filled with the same value

Validations:

  • Must be a String

merge_field_values[value]
required

Merge Field value. If the merge field is a date, the value should be in yyyy/mm/dd or yyyy-mm-dd format.

Validations:

  • Must be a String

expires_in
required

Document expiration. Must be between 1 and 365 days

pin
optional

Document pin. Must be between 10000 and 99999

tags
optional

Optional key value tags for categorization

kba
optional

Enable KBA on the document (applicable for KBA enabled plans)

Validations:

  • Must be one of: true, false.