UNPKG

boldsign

Version:

NodeJS client for boldsign

22 lines (19 loc) 779 B
import { DocumentApi } from '../api/documentApi'; import { ChangeRecipient } from '../model'; const documentApi = new DocumentApi(); documentApi.setApiKey("YOUR_API_KEY"); var changeRecipient = new ChangeRecipient(); changeRecipient.newSignerName = "David"; changeRecipient.newSignerEmail = "david@cubeflakes.com"; changeRecipient.oldSignerEmail = "hankyWhites@cubeflakes.com"; changeRecipient.reason = "Wrongly sent"; var documentId = "YOUR_DOCUMENT_ID"; async function changeDocumentRecipient() { try { await documentApi.changeRecipient(documentId, changeRecipient); console.log("Recipient changed successfully!"); } catch (error:any) { console.error("Error occurred while calling the API:", error.message); } } changeDocumentRecipient();