# API reference

Every endpoint lives under one base URL. Send your API key in the `X-API-Key` header and JSON
bodies with `Content-Type: application/json`.

```http
https://api.signapi.lumin.example/v1
```

Regional hosts work the same way; see [Regions](https://docs.signapi.dev/regions). Lists return `data` and `links.next`;
follow `links.next` until it is `null`. Errors are [problem bodies](https://docs.signapi.dev/errors).

## Envelopes

| Operation | Endpoint | |
|---|---|---|
| [List envelopes](https://docs.signapi.dev/api/ListEnvelopes) | `GET /envelopes` | Lists envelopes, newest first, optionally filtered by status or topic. |
| [Create an envelope](https://docs.signapi.dev/api/CreateEnvelope) | `POST /envelopes` | Creates an envelope from documents and recipients and starts sending it. |
| [Get an envelope](https://docs.signapi.dev/api/GetEnvelope) | `GET /envelopes/{envelopeId}` | Returns one envelope with its documents, recipients and deliverable. |
| [Update an envelope](https://docs.signapi.dev/api/UpdateEnvelope) | `PATCH /envelopes/{envelopeId}` | Changes an envelope's label. Nothing else can change after creation. |
| [Delete an envelope](https://docs.signapi.dev/api/DeleteEnvelope) | `DELETE /envelopes/{envelopeId}` | Deletes a completed, failed or canceled envelope and its files. |
| [Cancel an envelope](https://docs.signapi.dev/api/CancelEnvelope) | `POST /envelopes/{envelopeId}/cancel` | Stops an envelope that is in progress. Recipients can no longer act on it. |

## Recipients

| Operation | Endpoint | |
|---|---|---|
| [Get a recipient](https://docs.signapi.dev/api/GetRecipient) | `GET /recipients/{recipientId}` | Returns one recipient with its status, captured values and timestamps. |
| [Replace a recipient](https://docs.signapi.dev/api/ReplaceRecipient) | `POST /recipients/{recipientId}/replace` | Hands a recipient's turn to someone else, keeping the same key and places. |
| [Resend a request](https://docs.signapi.dev/api/ResendRequest) | `POST /recipients/{recipientId}/resend` | Sends a recipient a reminder of their pending request. |
| [Create a ceremony](https://docs.signapi.dev/api/CreateRecipientCeremony) | `POST /recipients/{recipientId}/ceremonies` | Creates a signing link for a recipient, for embedded or custom-authenticated signing. |

## Deliverables

| Operation | Endpoint | |
|---|---|---|
| [List an envelope's deliverables](https://docs.signapi.dev/api/ListEnvelopeDeliverables) | `GET /envelopes/{envelopeId}/deliverables` | Lists every deliverable of an envelope, including the default one. |
| [Create a deliverable](https://docs.signapi.dev/api/CreateDeliverable) | `POST /envelopes/{envelopeId}/deliverables` | Generates another signed PDF of a completed envelope, with its own options. |
| [Get a deliverable](https://docs.signapi.dev/api/GetDeliverable) | `GET /deliverables/{deliverableId}` | Returns a deliverable with a fresh, short-lived download URL. |

## Events

| Operation | Endpoint | |
|---|---|---|
| [List an envelope's events](https://docs.signapi.dev/api/ListEnvelopeEvents) | `GET /envelopes/{envelopeId}/events` | Lists the events of one envelope and its recipients, newest first. |
| [List a recipient's events](https://docs.signapi.dev/api/ListRecipientEvents) | `GET /recipients/{recipientId}/events` | Lists the events of one recipient, newest first. |
| [List events](https://docs.signapi.dev/api/ListEvents) | `GET /events` | Lists every event in the account for the key's mode, newest first. |

## Uploads

| Operation | Endpoint | |
|---|---|---|
| [Upload a file](https://docs.signapi.dev/api/CreateUpload) | `POST /uploads` | Uploads a PDF, DOCX, PNG, Markdown or HTML file as the raw request body. |
| [Get an upload](https://docs.signapi.dev/api/GetUpload) | `GET /uploads/{uploadId}` | Returns a temporary or permanent upload. |
| [Get an upload's structure](https://docs.signapi.dev/api/GetUploadStructure) | `GET /uploads/{uploadId}/structure` | Returns the pages, placeholders and template fields Sign API finds in an upload. |
| [Store an upload](https://docs.signapi.dev/api/StoreUpload) | `POST /uploads/{uploadId}/store` | Makes a temporary upload permanent under a key of your choice. |
| [Create an upload URL](https://docs.signapi.dev/api/CreateUploadUrl) | `POST /upload-urls` | Returns a single-use URL your client can PUT a file to, up to 20 MB. |

## Senders

| Operation | Endpoint | |
|---|---|---|
| [Add a sender](https://docs.signapi.dev/api/CreateSender) | `POST /senders` | Adds a sender email address and emails it a verification link. |
| [Get a sender](https://docs.signapi.dev/api/GetSender) | `GET /senders/{senderId}` | Returns a sender and whether its address is verified. |
| [Delete a sender](https://docs.signapi.dev/api/DeleteSender) | `DELETE /senders/{senderId}` | Removes a sender. Envelopes already sent keep their sender. |

## Templates

| Operation | Endpoint | |
|---|---|---|
| [List templates](https://docs.signapi.dev/api/ListTemplates) | `GET /templates` | Lists the account's templates, newest first. |
| [Create a template](https://docs.signapi.dev/api/CreateTemplate) | `POST /templates` | Stores a Markdown or HTML template and returns its placeholders and fields. |
| [Get a template](https://docs.signapi.dev/api/GetTemplate) | `GET /templates/{templateId}` | Returns a template's metadata, placeholders and fields. |
| [Update a template](https://docs.signapi.dev/api/UpdateTemplate) | `PATCH /templates/{templateId}` | Renames a template. |
| [Delete a template](https://docs.signapi.dev/api/DeleteTemplate) | `DELETE /templates/{templateId}` | Deletes a template. Envelopes created from it are not affected. |
| [Duplicate a template](https://docs.signapi.dev/api/DuplicateTemplate) | `POST /templates/{templateId}/duplicate` | Copies a template, optionally filling some placeholders in the copy. |
| [Get template content](https://docs.signapi.dev/api/GetTemplateContent) | `GET /templates/{templateId}/content` | Returns a template's format and source. |
| [Replace template content](https://docs.signapi.dev/api/ReplaceTemplateContent) | `PUT /templates/{templateId}/content` | Replaces a template's whole source. |
| [Edit template content](https://docs.signapi.dev/api/EditTemplateContent) | `POST /templates/{templateId}/content/edits` | Applies find-and-replace edits to a template's source, with an optional dry run. |
| [Preview a template](https://docs.signapi.dev/api/PreviewTemplate) | `POST /templates/{templateId}/preview` | Renders a template to PDF with sample data and returns a one-hour download link. |

## Balance

| Operation | Endpoint | |
|---|---|---|
| [Get the balance](https://docs.signapi.dev/api/GetBalance) | `GET /balance` | Returns the prepaid credit balance and the price of one envelope. |
