SignatureKit
Provider APIs

ZapSign

Create ZapSign PDF requests with Bearer credentials and typed SignatureKit errors.

ZapSign uploads a PDF, creates the signer list, and returns the first signing URL when available. The provider owns the external ceremony; SignatureKit owns request validation and typed errors.

Installation

npm install @signature-kit/core @signature-kit/zapsign

When to use

Use ZapSign when the product wants a hosted signing link after a simple PDF upload. Use local A1/PDF signing when no upstream ceremony is involved.

Keep credentials Redacted

Provider tokens enter as Redacted.make(...) and are unwrapped only inside the package HTTP boundary. Never pass remote tokens to React components or logs.

Minimal request

zapsign.ts
import { signatureHttpClientLive } from "@signature-kit/core/http"
import { createZapSignSignatureRequest } from "@signature-kit/zapsign"
import { Effect, Redacted } from "effect"

const program = createZapSignSignatureRequest(
  {
    apiToken: Redacted.make(process.env.ZAPSIGN_API_TOKEN ?? ""),
    environment: "sandbox",
    locale: "pt-br",
  },
  {
    title: "Service agreement",
    message: "Review and sign this document.",
    documents: [{ fileName: "contract.pdf", mimeType: "application/pdf", content: pdfBytes }],
    recipients: [{ name: "Ada Lovelace", email: "ada@example.com", role: "signer" }],
    send: true,
  },
).pipe(Effect.provide(signatureHttpClientLive))

const request = await Effect.runPromise(program)

Provider facts

  • Accepts a single PDF per request, matching ZapSign document upload.
  • Authorization uses a Redacted bearer token.
  • Unsupported MIME types or multiple documents fail before the HTTP call.

Errors

Invalid input, remote HTTP failures, and invalid response shapes fail as SignatureKitError. The provider, operation, and HTTP status fields are preserved when the upstream response exposes them.

On this page