Alpha Version: SignEngine is currently in alpha testing. You need an invitation to register.
Skip to main content

Examples

Creating an Envelope

import { EnvelopesApi, UploadsApi } from "@repo/api-client";

// ... initialize config ...

const envelopesApi = new EnvelopesApi(config);
const uploadsApi = new UploadsApi(config);

async function createEnvelope() {
// 1. Get Upload URL
const uploadRes = await uploadsApi.getUploadUrl({
filename: "contract.pdf",
mimetype: "application/pdf"
});

const { uploadUrl, envelopeId } = uploadRes.data;

// 2. Upload File (using standard fetch or axios)
await fetch(uploadUrl, {
method: "PUT",
body: fileContent, // Blob or Buffer
headers: { "x-ms-blob-type": "BlockBlob" }
});

// 3. Add Recipients
await envelopesApi.updateEnvelope(envelopeId, {
signers: [{
email: "[email protected]",
name: "Client",
role: "signer"
}]
});

console.log(`Envelope ${envelopeId} created and sent.`);
}