# API reference

> The Sigil REST API: base URL, request and response conventions, ids, times and paging, and every endpoint at a glance.

The API is a small JSON API over your account: **templates** (documents with their glyphs read), **pacts** (a document sent to people for signature) and your **custom domains**. It goes through the same code as the dashboard, so the same plan limits, validation and ownership rules apply.

## Base URL

```text
https://api.signwithsigil.com/v1
```

Every path in this reference is relative to it. `v1` changes only in ways that do not break callers: new endpoints, new optional parameters, and new fields in responses. Ignore fields you do not know.

## Authentication

Send your API key in `Authorization: Bearer sgk_…` (or `X-Api-Key: sgk_…`) on every call. The account needs the Pro or Business plan. See [Authentication](/authentication).

## Requests

- **JSON bodies** need `Content-Type: application/json` and can be up to 64 KB.
- **Uploads** use `multipart/form-data`, with the document in a `file` part: a PDF or a Word `.docx`, 10 MB at most.
- Parameter and field names are `snake_case`.

## Responses

- Everything is JSON (`application/json; charset=utf-8`) except the PDF downloads, and nothing is cached (`Cache-Control: private, no-store`).
- Fields with no value are present as `null`, rather than left out.
- Times are ISO 8601 in UTC, to the second: `2026-10-20T14:05:00Z`.
- A delete answers `204` with no body.
- Errors are `{ "error": "message" }` with a `4xx` status. See [Errors](/errors).

## Ids

Templates and pacts have a `uid`: 8 letters and digits, such as `K4TQ7MZE`. They are not case-sensitive in URLs. An id that belongs to another account answers `404`, the same as one that does not exist.

## Paging

[List pacts](/api-reference/pacts/list-pacts) is paged with `limit` (1 to 200, default 50) and `offset`, and answers with `total` so you know when to stop. The other lists return everything.

## For AI tools

`GET https://api.signwithsigil.com/v1` answers with the whole reference as one Markdown document, with no key needed, so a model can read it in one request. These docs also offer every page as Markdown: add `.md` to its URL.

## Endpoints

| | Endpoint | |
|---|---|---|
| `GET` | `/me` | [Get account](/api-reference/account/get-account) |
| `GET` | `/templates` | [List templates](/api-reference/templates/list-templates) |
| `GET` | `/templates/{uid}` | [Get a template](/api-reference/templates/get-template) |
| `POST` | `/templates` | [Create a template](/api-reference/templates/create-template) |
| `DELETE` | `/templates/{uid}` | [Delete a template](/api-reference/templates/delete-template) |
| `GET` | `/pacts` | [List pacts](/api-reference/pacts/list-pacts) |
| `GET` | `/pacts/{uid}` | [Get a pact](/api-reference/pacts/get-pact) |
| `POST` | `/pacts` | [Create a pact](/api-reference/pacts/create-pact) |
| `POST` | `/pacts/{uid}/send` | [Send a pact](/api-reference/pacts/send-pact) |
| `POST` | `/pacts/{uid}/resend` | [Resend the signing link](/api-reference/pacts/resend-pact) |
| `POST` | `/pacts/{uid}/void` | [Void a pact](/api-reference/pacts/void-pact) |
| `DELETE` | `/pacts/{uid}` | [Delete a draft](/api-reference/pacts/delete-pact) |
| `GET` | `/pacts/{uid}/document.pdf` | [Download the document](/api-reference/pacts/download-document) |
| `GET` | `/pacts/{uid}/signed.pdf` | [Download the signed PDF](/api-reference/pacts/download-signed) |
| `GET` | `/pacts/{uid}/sigil.pdf` | [Download the sigil](/api-reference/pacts/download-sigil) |
| `GET` | `/domains` | [List domains](/api-reference/domains/list-domains) |
