# Signing requests API

> Send documents for signature and follow them to completion. GET /api/v1/sign-requests, POST /api/v1/sign-requests, GET /api/v1/sign-requests/{id}, POST /api/v1/sign-requests/{id}/void and more.

5 operations. Each needs an API key with the permission shown; see [API keys and permissions](https://staffedly.com/docs/developers/api-keys).

| Operation | Permission |
| --- | --- |
| [`GET /api/v1/sign-requests`](#get-api-v1-sign-requests) | `documents:read` |
| [`POST /api/v1/sign-requests`](#post-api-v1-sign-requests) | `documents:write` |
| [`GET /api/v1/sign-requests/{id}`](#get-api-v1-sign-requests-id) | `documents:read` |
| [`POST /api/v1/sign-requests/{id}/void`](#post-api-v1-sign-requests-id-void) | `documents:write` |
| [`POST /api/v1/sign-requests/{id}/remind`](#post-api-v1-sign-requests-id-remind) | `documents:write` |

## GET /api/v1/sign-requests

Documents sent for signature, with each signer's progress.

- **Permission:** `documents:read`
- **Returns:** a page of records: `{ data, hasMore, nextCursor }`, status 200

**Query parameters** (all optional)

| Name | Description |
| --- | --- |
| `status` | sent, completed, declined, voided or expired. |
| `providerId` | Only this person. |
| `facilityId` | Only this site. |
| `limit` | Rows per page, 1 to 200. Default 50. |
| `cursor` | The nextCursor value from the previous page. |

**Fields in each record:** `id`, `title`, `status`, `category`, `templateId`, `providerId`, `facilityId`, `sentAt`, `expiresAt`, `completedAt`, `signedSha256`, `batchId`, `signers`

```bash
curl "https://app.staffedly.com/api/v1/sign-requests?limit=50" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"
```

## POST /api/v1/sign-requests

Send a template for signature. Each signer is emailed a private link. The signed copy is filed under the person or site.

- **Permission:** `documents:write`
- **Returns:** one record: `{ data }`, status 201
- **Safe retry:** send an `Idempotency-Key` header (8 to 128 characters); the same key with the same request returns the first answer again

**Body fields** (JSON; a field the API does not know is refused)

| Field | Description |
| --- | --- |
| `templateId` | Required. From /api/v1/document-templates. |
| `providerId` | The person it is for. Required when the template has a provider signer. |
| `facilityId` | The site it is for. Required when the template has a facility signer. |
| `values` | Object: a value for each entry in the template's valuesNeeded, by id. |
| `organizationSignerEmail` | Email address of the team member who signs for your organization, when the template has that signer. |
| `facilitySignerName` | Name of the facility's signer, when the template has one. |
| `facilitySignerEmail` | Their email address. |
| `message` | A note shown to the signers. |
| `expiresInDays` | 1 to 365. Default: the template's setting. |

**Fields in each record:** `id`, `title`, `status`, `category`, `templateId`, `providerId`, `facilityId`, `sentAt`, `expiresAt`, `completedAt`, `signedSha256`, `batchId`, `signers`

```bash
curl -X POST "https://app.staffedly.com/api/v1/sign-requests" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"templateId":"<templateId>"}'
```

## GET /api/v1/sign-requests/{id}

One signing request.

- **Permission:** `documents:read`
- **Returns:** one record: `{ data }`, status 200

**Path**

| Name | Description |
| --- | --- |
| `id` | The record's id. |

**Fields in each record:** `id`, `title`, `status`, `category`, `templateId`, `providerId`, `facilityId`, `sentAt`, `expiresAt`, `completedAt`, `signedSha256`, `batchId`, `signers`

```bash
curl "https://app.staffedly.com/api/v1/sign-requests/<id>" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY"
```

## POST /api/v1/sign-requests/{id}/void

Void a request that is still out. Nobody can sign it afterwards and the signers see the reason.

- **Permission:** `documents:write`
- **Returns:** one record: `{ data }`, status 201
- **Safe retry:** send an `Idempotency-Key` header (8 to 128 characters); the same key with the same request returns the first answer again

**Path**

| Name | Description |
| --- | --- |
| `id` | The record's id. |

**Body fields** (JSON; a field the API does not know is refused)

| Field | Description |
| --- | --- |
| `reason` | Required. Shown to the signers. |

**Fields in each record:** `id`, `title`, `status`, `category`, `templateId`, `providerId`, `facilityId`, `sentAt`, `expiresAt`, `completedAt`, `signedSha256`, `batchId`, `signers`

```bash
curl -X POST "https://app.staffedly.com/api/v1/sign-requests/<id>/void" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Extra room opened"}'
```

## POST /api/v1/sign-requests/{id}/remind

Email everyone whose turn it is again, with the link they already have. At most once an hour per signer.

- **Permission:** `documents:write`
- **Returns:** one record: `{ data }`, status 201
- **Safe retry:** send an `Idempotency-Key` header (8 to 128 characters); the same key with the same request returns the first answer again

**Path**

| Name | Description |
| --- | --- |
| `id` | The record's id. |

**Body fields** (JSON; a field the API does not know is refused)

| Field | Description |
| --- | --- |

**Fields in each record:** `id`, `reminded`, `skippedBecauseRemindedWithinTheHour`

```bash
curl -X POST "https://app.staffedly.com/api/v1/sign-requests/<id>/remind" \
  -H "Authorization: Bearer $STAFFEDLY_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

