# E-signatures (https://coss.com/solutions/e-signatures)

> Add e-signatures to your product. Contracts from templates and your own data, signed in your app or by email, with a sealed PDF and a webhook when done.

## The problem

A contract in your product is more than a signature box: it's a document, a record and a step in your own workflow.

When your users sign agreements, onboarding paperwork or consent forms, you need documents filled in from your own data, a signing step that doesn't send them to someone else's site, a copy nobody can quietly change, and a signal your backend can act on. A separate e-signature vendor means another account, another webhook format and contracts that live outside your app.

coss.com does it on the key you already use: [Sign](/products/sign) for the documents, signers and the sealed copy, [email](/products/email) for invitations from your own domain, and the same [webhooks and logs](/products/platform) as everything else.

## How it works

Make a template once, create a request from it for each customer, let them sign in your app, and act on the webhook.

```ts twoslash
import { Coss } from "coss";
const coss = new Coss();
declare const templateId: string;
// ---cut---
// A request from the template, filled in from your own data.
const { data: request } = await coss.sign.templates.createRequest(templateId, {
  signers: [
    { role: "client", name: "Ada Lovelace", email: "ada@example.com", delivery: "embedded" },
    { role: "company", name: "Grace Hopper", email: "grace@acme.com" },
  ],
  merge_fields: { client_company: "Analytical Engines Ltd" },
});

// A signing session for the signed-in user: hand its url to the browser.
const signer = request?.signers.find((s) => s.email === "ada@example.com");
if (request && signer) {
  const { data: session } = await coss.sign.sessions.create(request.id, signer.id);
}
```

```ts twoslash
import { mountSigning } from "coss/sign";
declare const sessionUrl: string;
declare const container: HTMLElement;
// ---cut---
// In the browser: the signing page in an iframe on your own page.
mountSigning({
  url: sessionUrl,
  container,
  onEvent: (event) => {
    if (event.type === "signed") console.log("Request is", event.request_status);
  },
});
```

When the last signer signs, `sign_request.completed` reaches your webhooks, and the sealed PDF is ready to keep with the customer's record.

```ts twoslash
import { Coss } from "coss";
import { writeFile } from "node:fs/promises";
const coss = new Coss();
declare const requestId: string;
// ---cut---
const { data: pdf } = await coss.sign.requests.signedDocument(requestId);
if (pdf) await writeFile("signed.pdf", pdf);
```

Read more in [templates](/docs/sign/templates), [embedded signing](/docs/sign/embedded-signing) and [completion and the audit trail](/docs/sign/completion-and-audit-trail).

## What you get

Documents, signers, a copy that proves itself and the events your app needs, on one API key.

### Templates and merge fields
A template holds documents and fields for roles, such as client and company, instead of people. Name a signer per role and fill `merge_fields` from your data to make each customer's request. See [templates](/docs/sign/templates).

### Signing inside your app
Embedded signers sign in an iframe `mountSigning` opens on your page, with your accent color and theme, and your page gets an event when they sign or decline. See [embedded signing](/docs/sign/embedded-signing).

### Or by email, from your domain
Email signers get their link when it's their turn, reminders until they sign and the signed copy afterwards, from your verified domain. Signers sign in parallel, or in turn with `signing_order: "sequential"`. See [email signing](/docs/sign/email-signing).

### A sealed copy and an audit trail
The completed PDF has certificate pages listing each signer, how they were identified and when they consented and signed, sealed with a PAdES signature and a trusted timestamp. Each audit event's hash covers the one before it.

### Templates your customers build
`mountBuilder` opens the template builder in your app, so your customers can upload their own PDFs, add roles and place fields, each builder session reaching only its own template.

### Webhooks and logs
`sign_request.sent`, `viewed`, `signer_signed`, `declined`, `completed`, `canceled` and `expired` reach your [webhooks](/docs/webhooks), and each is a line in your [logs](/docs/logs). Payloads never include documents or field values.

## Specifications

The limits of a request. The API reference lists each one with its field.

- Document size: 25 MB, 500 pages
- Documents per request: 10
- Signers per request: 20
- Fields per request: 500
- Request expiry: up to 365 days ahead
- Embedded session: 1 hour by default, at most 24 hours
- Seal: PAdES B-LT, RFC 3161 timestamp
- Signature types: simple electronic (ESIGN, UETA, eIDAS)

## Pricing

You pay per completed request, however many signers and documents it has.

| Product | Rate | |
| --- | --- | --- |
| Signature requests | $0.50 per completed request | |

The Free plan includes 5 signature requests completed requests a month. Declined, canceled and expired requests are free, and so are sandbox environments. See [pricing](/pricing) for the plans.

## Frequently asked questions

### How do I send a contract for signature from my app?

Make a template once with the contract's documents, a role for each party and its fields. For each customer, call coss.sign.templates.createRequest() with a signer for each role and merge_fields from your own data, such as their company name. The request is sent at once, or saved as a draft with send set to false.

### Can people sign without leaving my app?

Yes. Give a signer delivery embedded, create a session for them with coss.sign.sessions.create() on your server, and open it in your page with mountSigning from coss/sign. Signers who should sign from an email get delivery email instead, and coss.com sends their link when it's their turn.

### How do I know when a contract is signed?

A sign_request.completed webhook arrives once every signer has signed and the document is sealed. Download the sealed PDF with coss.sign.requests.signedDocument(), and use the other sign_request events, such as viewed, signer_signed and declined, to show progress in your app.

### Are coss.com signatures legally binding?

They are simple electronic signatures under the US ESIGN Act and UETA and the EU's eIDAS. Each signer agrees to sign electronically, signs with a deliberate act and is identified by the emailed link or by your app, and the audit trail records each step.

### Can my customers make their own contract templates?

Yes. Create a builder session for a template with coss.sign.templates.createBuilderSession() and open it in your app with mountBuilder from coss/sign. Your customers upload PDFs, add roles and place fields, and a builder session only reaches its own template.

### Do signing emails come from my domain?

They can. Set email_from in the Sign settings to an address on one of your verified domains, and invitations, reminders and signed copies come from it. Without one, coss.com sends them on your behalf.

### What is billed?

Each completed request, once, however many signers and documents it has. Declined, canceled and expired requests are free, and so are sandbox environments. The Free plan includes a few completed requests a month, and the pricing page has the rate.
