Getting Started
Learn how to install a Verdocs SDK, configure your environment, and get started on implementing your team's e-signing goals.
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-sdkpip install verdocs-python-sdkdotnet add package Verdocs.CSharpSdkServer-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.
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: '...' });tokens = endpoint.auth.authenticate( PasswordGrantRequest(username="test@example.com", password="secret"))endpoint.set_token(tokens.access_token)var auth = await endpoint.Auth.AuthenticateAsync(new PasswordGrantRequest{ Username = "you@example.com", Password = "PASSWORD",});endpoint.SetToken(auth.AccessToken);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.
import {createTemplate} from '@verdocs/js-sdk/Templates';const newTemplate = await createTemplate((VerdocsEndpoint.getDefault(), {...});template = endpoint.templates.create( TemplateCreateParams(name="NDA", visibility="shared"), files=["/contracts/nda.pdf"],)var template = await endpoint.Templates.CreateAsync(new CreateTemplateRequest{ Name = "Bill of Sale", Visibility = TemplateVisibility.Shared,});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.
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);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", ) ], ))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, }, ],});