# Quickstart

> Upload a document with glyphs, send it to two signers, follow their progress and download the signed PDF.

This walks through the whole flow with cURL. Every call is in the [API reference](/api-reference) with JavaScript and Python versions too. You need an account on the Pro or Business plan.

## Create an API key

Log in, open the [API page](https://www.signwithsigil.com/api) on the dashboard, and create a key. Its secret is shown once, so copy it into an environment variable straight away:

```bash
export SIGIL_API_KEY="sgk_…"
```

Check that it works by asking for your account:

```bash
curl https://api.signwithsigil.com/v1/me -H "Authorization: Bearer $SIGIL_API_KEY"
```

The answer shows your plan and `documents.available`, the documents you can still send. A `401` means the key was mistyped; a `403` means the account is not on Pro or Business.

## Mark your document

Open your agreement in Word (or whatever made the PDF) and type a glyph where each field belongs. For two signers:

```text title="Signature block"
Client:   \s1\               Provider:  \s2\
Name:     \n1\               Name:      \n2\
Date:     \d1\               Date:      \d2\
Company:  \t1:Company name\
```

The number is the signer: `1` is the first person you list, `2` the second. `\s` is a signature, `\n` the printed name, `\d` the date, and `\t1:Company name\` a text box labelled "Company name". [Glyphs](/concepts/glyphs) has every tag.

> [!TIP]
> Type the glyphs in white, 1-point text. They disappear from the printed page but Sigil still finds them.

## Upload it as a template

```bash
curl https://api.signwithsigil.com/v1/templates \
  -H "Authorization: Bearer $SIGIL_API_KEY" \
  -F file=@consulting-agreement.docx \
  -F name="Consulting agreement"
```

Sigil converts a Word document to PDF, reads the glyphs, and answers with the [template](/api-reference/objects/template):

```json
{
  "uid": "7DXW69YJ",
  "name": "Consulting agreement",
  "page_count": 3,
  "signer_count": 2,
  "field_count": 7,
  "fields": [ … ]
}
```

Keep the `uid`. `signer_count` is how many signers a pact from this template needs.

## Send it for signature

Create a pact from the template, list the signers in signing order, and send it in the same call:

```bash
curl -X POST https://api.signwithsigil.com/v1/pacts \
  -H "Authorization: Bearer $SIGIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template_uid": "7DXW69YJ",
    "title": "Consulting agreement with Acme",
    "message": "Please sign by Friday.",
    "recipients": [
      { "name": "Avery Lane", "email": "avery@example.com" },
      { "name": "Sam Ortiz", "email": "sam@example.com" },
      { "name": "Records", "email": "records@example.com", "role": "cc" }
    ],
    "send": true
  }'
```

Avery is signer 1 (`\s1\`) and gets an email now; Sam is signer 2 and gets one when Avery has signed. Records is a CC: they receive the finished copy, and CCs are free. Sending used one document, which covers up to three signers. The response is the [pact](/api-reference/objects/pact), with its `uid`.

## Follow its progress

```bash
curl https://api.signwithsigil.com/v1/pacts/K4TQ7MZE -H "Authorization: Bearer $SIGIL_API_KEY"
```

`status` stays `sent` while people sign, `current_signer` says whose turn it is, and each recipient's `status` moves from `pending` to `viewed` to `signed`. The `events` list is the full audit trail. There are no webhooks yet, so poll every few minutes and stop when `status` changes. See [Pact lifecycle](/concepts/pacts).

## Download the signed PDF

When `status` is `sealed`, download the signed document and its sigil, the certificate of completion:

```bash
curl https://api.signwithsigil.com/v1/pacts/K4TQ7MZE/signed.pdf \
  -H "Authorization: Bearer $SIGIL_API_KEY" -o signed.pdf

curl https://api.signwithsigil.com/v1/pacts/K4TQ7MZE/sigil.pdf \
  -H "Authorization: Bearer $SIGIL_API_KEY" -o certificate.pdf
```

Every recipient and you also get both by email. That is the whole flow.

- [Create a pact](https://docs.signwithsigil.com/api-reference/pacts/create-pact): Every option: one-off files, drafts, deadlines, custom domains.
- [Connect an assistant](https://docs.signwithsigil.com/mcp/connect): Do all of this by asking Claude or Cursor instead.
