Verdocs - Developer Documentation
ReferenceSDKLanguages

Getting Started

Learn how to install a Verdocs SDK, configure your environment, and get started on implementing your team's e-signing goals.

Installation

Verdocs ships official SDKs for Node.js, Python, and C#. Install the one that matches your stack — you'll use it for everything on this page and in the full API reference.

npm install @verdocs/js-sdkyarn add @verdocs/js-sdkpnpm install @verdocs/js-sdk
pip install verdocs-python-sdk
dotnet add package Verdocs.CSharpSdk
Authentication

Server-side calls require a short-lived access token. Exchange your API key's Client ID and Secret for a token, then let the SDK attach it as a Bearer header on every request. Tokens expire, so refresh them as part of your normal request flow rather than caching one indefinitely.

Get an access token
import {authenticate, VerdocsEndpoint} from '@verdocs/js-sdk';// Client-side call, suitable for Web and mobile apps:const {access_token} = await authenticate(VerdocsEndpoint.getDefault(), { username: 'test@test.com', password: 'PASSWORD', grant_type:'password' });VerdocsEndpoint.getDefault().setAuthToken(access_token);// Server-side call, suitable for server apps. NEVER EXPOSE client_secret IN FRONT-END CODE:const {access_token} = await authenticate(VerdocsEndpoint.getDefault(), { client_id: '...', client_secret: '...', grant_type:'client_credentials' });VerdocsEndpoint.getDefault().setAuthToken(access_token);// OAuth2 authorization code exchange (used by third-party integrations like PowerAutomate):const {access_token} = await authenticate(VerdocsEndpoint.getDefault(), { grant_type: 'authorization_code', code: '...', client_id: '...', client_secret: '...', redirect_uri: '...' });
Get an access token
tokens = endpoint.auth.authenticate(    PasswordGrantRequest(username="test@example.com", password="secret"))endpoint.set_token(tokens.access_token)
Get an access token
var auth = await endpoint.Auth.AuthenticateAsync(new PasswordGrantRequest{    Username = "you@example.com",    Password = "PASSWORD",});endpoint.SetToken(auth.AccessToken);
Templates

A Template is the reusable blueprint behind every signing flow — documents, roles, and fields defined once, then turned into Envelopes whenever you need to collect signatures.

Create a Template
Define your documents, assign roles, and place fields. The returned Template ID is what you pass when creating an Envelope.
import {createTemplate} from '@verdocs/js-sdk/Templates';const newTemplate = await createTemplate((VerdocsEndpoint.getDefault(), {...});
Create a Template
Define your documents, assign roles, and place fields. The returned Template ID is what you pass when creating an Envelope.
template = endpoint.templates.create(    TemplateCreateParams(name="NDA", visibility="shared"),    files=["/contracts/nda.pdf"],)
Create a Template
Define your documents, assign roles, and place fields. The returned Template ID is what you pass when creating an Envelope.
var template = await endpoint.Templates.CreateAsync(new CreateTemplateRequest{    Name = "Bill of Sale",    Visibility = TemplateVisibility.Shared,});
Envelopes

An envelope contains all of the documents that the recipient will be interacting with, including all of the interactive fields. Think of them like an envelope you send through the mail.

Sending an Envelope
Therare multiple ways to send an envelope, but the two main workflows consist of "Send envelope with Template" and "Send envelope without Template". The former can be especially useful for when your client needs the same file, often. The latter provides a programmatic workflow, which can be useful for dynamic documents.
import {Envelopes, ICreateEnvelopeRole, ICreateEnvelopeRequest} from '@verdocs/js-sdk/Envelopes';const role1: ICreateEnvelopeRole = {  type: 'signer',  name: 'Seller',  first_name: 'Paige',  last_name: 'Turner',  email: 'paige.turner@nomail.com',  phone: '',  sequence: 1,  delegator: false,  message: '',};const role2: ICreateEnvelopeRole = {  type: 'signer',  name: 'Buyer',  first_name: 'Power',  last_name: 'Power',  email: 'will.power@nomail.com',  phone: '',  sequence: 2,  delegator: false,  message: '',};const request: ICreateEnvelopeRequest = {template_id: 'd2338742-f3a1-465b-8592-806587413cc1', name: 'Bill of Sale', roles: [role1, role2]};const {id, recipients} = await Envelopes.createEnvelope(VerdocsEndpoint.getDefault(), request);
Sending an Envelope
Therare multiple ways to send an envelope, but the two main workflows consist of "Send envelope with Template" and "Send envelope without Template". The former can be especially useful for when your client needs the same file, often. The latter provides a programmatic workflow, which can be useful for dynamic documents.
envelope = endpoint.envelopes.create(    EnvelopeCreateFromTemplateParams(        template_id="d2338742-f3a1-465b-8592-806587413cc1",        recipients=[            EnvelopeCreateRecipientFromTemplate(                role_name="Recipient 1",                first_name="Paige",                last_name="Turner",                email="paige.turner@example.com",            )        ],    ))
Sending an Envelope
Therare multiple ways to send an envelope, but the two main workflows consist of "Send envelope with Template" and "Send envelope without Template". The former can be especially useful for when your client needs the same file, often. The latter provides a programmatic workflow, which can be useful for dynamic documents.
var envelope = await endpoint.Envelopes.CreateAsync(new CreateEnvelopeRequest{    TemplateId = "d2338742-f3a1-465b-8592-806587413cc1",    Name = "Bill of Sale",    Recipients =    [        new CreateEnvelopeRecipient        {            Type = "signer",            RoleName = "Seller",            FirstName = "Paige",            LastName = "Turner",            Email = "paige.turner@example.com",            Sequence = 1,        },    ],});