New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@korala/api-client

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@korala/api-client

TypeScript API client for Korala document signing API

npmnpm
Version
1.0.1
Version published
Weekly downloads
277
-56.17%
Maintainers
1
Weekly downloads
 
Created
Source

@korala/api-client

TypeScript API client for the Korala document signing platform.

Installation

npm install @korala/api-client

Authentication

Korala uses HMAC signature authentication. You'll need an API key ID and secret from your Korala dashboard.

import { KoralaClient } from '@korala/api-client';

const client = new KoralaClient({
  apiKeyId: 'your-api-key-id',
  apiSecret: 'your-api-secret',
  baseUrl: 'https://api.korala.ai/api/v1', // optional, defaults to production
});

Usage

Create and send a document

// Upload a PDF
const { documentId, uploadUrl } = await client.documents.createUploadUrl({
  fileName: 'contract.pdf',
  contentType: 'application/pdf',
});

// Upload the file to the presigned URL
await fetch(uploadUrl, { method: 'PUT', body: pdfBuffer });

// Confirm the upload
await client.documents.confirmUpload(documentId);

// Add a signer
const signer = await client.signers.create(documentId, {
  name: 'John Doe',
  email: 'john@example.com',
});

// Add a signature field
await client.fields.create(documentId, {
  signerId: signer.id,
  fieldType: 'signature',
  pageNumber: 1,
  xPosition: 100,
  yPosition: 500,
  width: 200,
  height: 50,
});

// Send for signing
await client.documents.send(documentId);

Create a document from a template

const document = await client.templates.createDocument(templateId, {
  name: 'Sales Agreement - Acme Corp',
  signers: {
    buyer: { name: 'Jane Smith', email: 'jane@acme.com' },
  },
  variables: {
    company_name: 'Acme Corporation',
    contract_date: '2026-03-16',
  },
});

Bulk sign (countersign)

Sign multiple documents at once using a saved signature:

// Create a saved signature for the signer
await client.signatures.create({
  email: 'ceo@company.com',
  name: 'Jane Smith',
  signatureImageUrl: 'https://example.com/signature.png',
  isDefault: true,
});

// Bulk sign all pending documents
const result = await client.documents.bulkSign({
  documentIds: ['doc-1', 'doc-2', 'doc-3'],
  signerEmail: 'ceo@company.com',
});

console.log(`${result.signed} signed, ${result.failed} failed`);

Webhooks

const webhook = await client.webhooks.create({
  url: 'https://your-app.com/webhooks/korala',
  events: ['document.completed', 'document.signed'],
});

API Reference

ResourceMethods
client.documentscreateUploadUrl, confirmUpload, list, get, send, void, getAuditTrail, bulkSign
client.signerslist, create
client.fieldslist, create, update, delete
client.signatureslist, get, create, delete
client.templateslist, get, createDocument, generate
client.webhookslist, get, create, update, delete

License

MIT

Keywords

korala

FAQs

Package last updated on 17 Mar 2026

Related posts