SignNow REST Service Wrapper
- About SignNow
- API Contact Information
- API and Application
- Installation
- Documentation
- Examples
- User
- OAuth 2.0
- Document
- Retrieve a List of the User’s Documents
- Retrieve a Document Resource
- Download a Collapsed Document
- Upload Document
- Upload File & Extract Fields
- Update Document (add fields)
- Create Invite to Sign a Document
- Create Free Form Invite
- Cancel Field Invite to Sign a Document
- Create a One-time Use Download URL
- Merge Existing Documents
- Get Document History
- Remove Document
- Enumerations
- Template
- Folder
- Webhook
- Promisify methods
- Unit Tests
- License
- Additional Contact Information
SignNow is a powerful web-based e-signature solution that streamlines the signing process and overall document flow for businesses of any size. SignNow offers SaaS as well as public and private cloud deployment options using the same underlying API. With SignNow you can easily sign, share and manage documents in compliance with international data laws and industry-specific regulations. SignNow enables you to collect signatures from partners, employees and customers from any device within minutes.
If you have questions about the SignNow API, please visit https://help.signnow.com/docs or email api@signnow.com.
See additional contact information at the bottom.
Resources | Sandbox | Production |
---|---|---|
API: | api-eval.signnow.com:443 | api.signnow.com:443 |
Application: | https://app-eval.signnow.com | https://app.signnow.com |
Entry page: | https://eval.signnow.com |
@signnow/api-client
supports node.js v6.4.0 or later.
To install the latest version of @signnow/api-client
run:
npm install @signnow/api-client
See api reference in our Documentation.
To run the examples you will need an API key. You can get one here https://www.signnow.com/api. For a full list of accepted parameters, refer to the SignNow REST Endpoints API guide: https://help.signnow.com/docs.
Every resource is accessed via your api client instance:
const api = require('@signnow/api-client')({
credentials: 'ENCODED_CLIENT_CREDENTIALS',
production: false, // if false uses eval server
});
Every resource returns two parameters. The first param contains any errors and the second contains the results.
api.user.create({
first_name: 'John',
last_name: 'Wayne',
email: 'john@domain.com',
password: 'yourpwd',
}, (err, res) => {
// handle error or process response data
});
api.user.retrieve({
token: 'your auth token',
}, (err, res) => {
// handle error or process response data
}
});
api.oauth2.requestToken({
username: 'username',
password: 'password',
}, function(err, res){
// handle error or process response data
});
api.oauth2.verify({
token: 'your auth token',
}, (err, res) => {
// handle error or process response data
});
api.document.list({
token: 'your auth token',
}, (err, res) => {
// handle error or process response data
});
api.document.view({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.document.download({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.document.create({
token: 'your auth token',
filepath: 'path to file',
}, (err, res) => {
// handle error or process response data
});
api.document.fieldextract({
token: 'your auth token',
filepath: 'path to file',
}, (err, res) => {
// handle error or process response data
});
const fields = {
texts: [
{
size: 8,
x: 61,
y: 72,
page_number: 0,
font: 'Arial',
data: 'sample text',
line_height: 9.075,
},
],
}
api.document.update({
token: 'your auth token',
id: 'document id',
fields,
}, (err, res) => {
// handle error or process response data
});
const fieldInvite = {
document_id: 'DOCUMENT_ID_GOES_HERE',
from: 'EMAIL_OF_SENDER',
to: [
{
email: 'EMAIL_OF_SIGNER',
role: 'Signer 1',
role_id: 'ROLE_ID', // can be discovered in document details
order: 1,
reassign: '0',
decline_by_signature: '0',
reminder: 4,
expiration_days: 27,
subject: 'Field invite Signer1',
message: 'Message',
},
],
};
api.document.invite({
data: {
...fieldInvite,
},
id: 'DOCUMENT_ID_GOES_HERE',
token: 'YOUR_AUTH_TOKEN',
}, (err, res) => {
// handle error or process response data
});
api.document.invite({
token: 'your auth token',
id: 'document id',
data: {
from: 'email address',
to: 'email address',
},
}, (err, res) => {
// handle error or process response data
});
api.document.cancelInvite({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.document.share({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.document.merge({
token: 'your auth token',
name: 'the merged doc',
document_ids: [
'84a18d12bf7473ea3dd0e4dd1cdcded6ba6281aa',
'a71d963c49f33176e90c5827069c422616b1500c',
],
}, (err, res) => {
// handle error or process response data
});
api.document.history({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.document.remove({
token: 'your auth token',
id: 'document id',
}, (err, res) => {
// handle error or process response data
});
api.enumerations.addField({
token: 'your auth token',
document_id: 'document id',
x: 150,
y: 200,
width: 200,
height: 50,
page_number: 0,
role: 'buyer',
required: true,
label: 'Clothing Brand',
}, (err, res) => {
// handle error or process response data
});
api.enumerations.addOptions({
token: 'your auth token',
enumeration_options: [
{
enumeration_id: '8a3501896160b12d4ef7507a81b2f0998b8137b1',
data: 'Active',
},
{
enumeration_id: '8a3501896160b12d4ef7507a81b2f0998b8137b1',
data: 'Old Navy',
},
{
enumeration_id: '8a3501896160b12d4ef7507a81b2f0998b8137b1',
data: 'Volcom',
},
],
}, (err, res) => {
// handle error or process response data
});
By default original document is not removed after template creation. To remove original document set removeOriginalDocument
option to true
.
api.template.create({
token: 'your auth token',
document_id: 'document id',
document_name: 'my template',
options: {
removeOriginalDocument: true, // false by default
},
}, (err, res) => {
// handle error or process response data
});
api.template.duplicate({
token: 'your auth token',
id: 'document id',
name: 'my template',
}, (err, res) => {
// handle error or process response data
});
const fieldInvite = {
from: 'EMAIL_OF_SENDER',
to: [
{
email: 'EMAIL_OF_SIGNER',
role: 'Signer 1',
order: 1,
reassign: '0',
decline_by_signature: '0',
reminder: 4,
expiration_days: 27,
subject: 'Field invite Signer1',
message: 'Message',
},
],
};
api.template.invite({
data: {
...fieldInvite,
},
id: 'TEMPLATE_ID_GOES_HERE',
token: 'YOUR_AUTH_TOKEN',
}, (err, res) => {
// handle error or process response data
});
api.template.invite({
token: 'YOUR_AUTH_TOKEN',
id: 'TEMPLATE_ID_GOES_HERE',
data: {
from: 'EMAIL_OF_SENDER',
to: 'EMAIL_OF_SIGNER',
},
}, (err, res) => {
// handle error or process response data
});
api.folder.list({
token: 'your auth token',
}, (err, res) => {
// handle error or process response data
});
Filters | Values |
---|---|
signing-status |
waiting-for-me , waiting-for-others , signed , pending |
document-updated |
new Date() |
document-created |
new Date() |
Sort | Values |
---|---|
document-name |
asc /desc |
updated |
asc /desc |
created |
asc /desc |
api.folder.documents({
token: 'your auth token',
id: 'folder id',
filter: [
{
'signing-status': 'pending',
},
],
sort: {
'document-name': 'asc',
},
}, (err, res) => {
// handle error or process response data
});
signnow.webhook.list({
token: 'your auth token',
}, (err, res) => {
// handle error or process response data
});
Events | Description |
---|---|
document.create |
Webhook is triggered when a document is uploaded to users account in SignNow |
document.update |
Webhook is triggered when a document is updated (fields added, text added, signature added, etc.) |
document.delete |
Webhook is triggered when a document is deleted from |
invite.create |
Webhook is triggered when an invitation to a SignNow document is created. |
invite.update |
Webhook is triggered when an invite to SignNow document is updated. Ex. A signer has signed the document. |
api.webhook.create({
token: 'your auth token',
event: 'document.create',
callback_url: 'http://www.domain.com/path',
}, (err, res) => {
// handle error or process response data
});
If you are using node.js version 8.0.0 or higher you can use built in promisify utility:
const { promisify } = require('util');
const api = require('@signnow/api-client')({
credentials: 'ENCODED_CLIENT_CREDENTIALS',
production: false, // if false uses eval server
});
const requestToken = promisify(api.oauth2.requestToken);
requestToken({
username: 'username',
password: 'password',
})
.then(res => {
// process response data
})
.catch(err => {
// handle error
});
To run the unit test you will need to install "Mocha" and "Chai". You also need to edit a test.settings.js in the test folder of the api client module. The file need to contain the following:
exports.settings = {
credentials: '[ENCODED CLIENT CREDENTIALS]',
token: '[ACCESS TOKEN]',
username: '[SIGNNOW USERNAME]',
password: '[SIGNNOW PASSWORD]',
documentid: '[EXISTING DOCUMENT ID]',
templateid: '[EXISTING TEMPLATE ID]',
folderid: '[EXISTING FOLDER ID]',
email: '[FROM EMAIL FOR INVITE]',
testemail: '[TO EMAIL FOR INVITE]',
};
This project is released under the MIT License.
To contact SignNow support, please email support@signnow.com.
For pricing information, please call (800) 831-2050 or email sales@signnow.com.