Skip to content

Latest commit

 

History

History
102 lines (76 loc) · 2.75 KB

sign-requests.md

File metadata and controls

102 lines (76 loc) · 2.75 KB

Sign Requests

Get sign request by ID

Gets a sign request by ID signRequests.getById(options, callback) method.

const sr = await client.signRequests.getById({
	sign_request_id: 12345,
});
console.log(
	`Sign request id ${sr.id} contains ${sr.source_files.length} files`
);

List sign requests

Gets sign requests created by a user signRequests.getAll(options, callback) method.

const result = await client.signRequests.getAll();
console.log(`There are ${result.count} sign requests`);

Create sign request

Creates a sign request. This involves preparing a document for signing and sending the sign request to signers. signRequests.create(body, callback) method.

The list of source files is currently limited to ten files. Only the ID and type fields are required for each file.

const signRequest = await client.signRequests.create({
	signers: [
		{
			role: 'signer',
			email: 'user@example.com',
		},
	],
	source_files: [
		{
			type: 'file',
			id: '12345',
		},
	],
	parent_folder: {
		type: 'folder',
		id: '1234567',
	},
});
console.log(`Created a new sign request id ${signRequest.id}`);

Cancel sign request

Cancels a sign request signRequests.cancelById(options, callback) method.

const signRequest = await client.signRequests.cancelById({
	sign_request_id: 12345,
});
console.log(`Sign request id ${sr.id} cancelled`);

Resend sign request

Resends a sign request email to all outstanding signers signRequests.resendById(options, callback) method.

const id = 12345;
await client.signRequests.resendById({ sign_request_id: id });
console.log(`Sign request id ${sr.id} resent`);