# Get signing document

Get a temporary download link for the original PDF or completed signed archive. Only people and credentials with access to the signing request can obtain the link.

POST https://api.brigg.app/v1/operations/signing.GetSigningDocument

## Access & visibility

Allow `signing.GetSigningDocument` on your API key.

**Workspace access by default.** Private member data requires [approved member delegation](https://developer.brigg.app/authentication#member-delegation) through `Brigg-Act-As`; the key supplies permissions while private ownership and project boundaries remain enforced.

[Set up authentication](https://developer.brigg.app/authentication) · [Choose permissions](https://developer.brigg.app/permissions)

## Request fields

Send a JSON object with the following fields. Required fields must be included; omit optional fields you do not need.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `signing_request_id` | string | Yes | Keep the signing_request_id returned when invitations were requested. A file_id or signer_id identifies something else. [signing.RequestFileSignatures](https://developer.brigg.app/reference/signing/RequestFileSignatures). At least 1 character. |
| `version` | string | No | Which document to download: the original source or the completed signed archive. Allowed: `"original"`, `"signed"`. Default: `"signed"`. |

## Follow one signing request through completion

[Upload a readable PDF](https://developer.brigg.app/files), then [request signatures](https://developer.brigg.app/reference/signing/RequestFileSignatures) and keep `signing_request_id`. The request keeps a fixed source; replacing the original file later does not change what recipients sign.

Read [Get signing request](https://developer.brigg.app/reference/signing/GetSigningRequest) for per-recipient progress. `completed` means everyone signed, but the archive can still be preparing: wait for non-null `file_id` before requesting the signed PDF. [Get signing document](https://developer.brigg.app/reference/signing/GetSigningDocument) returns a short-lived URL for either the fixed original or the signed archive.

Notification failures do not undo the signing request. Remind the affected pending recipients instead of creating a duplicate request. Recipients sign themselves; a delegated API call cannot supply a recipient's signature. See the [complete signing workflow](https://developer.brigg.app/signing).

## Response

Returns **200 OK** with a JSON body.
| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | Yes | Absolute URL, including its scheme. |
| `filename` | string | Yes | Original filename, including its extension. |
| `expires_at` | number | Yes | Signing deadline in Unix milliseconds. |

## Errors & retries

This operation reads data. It needs no idempotency key and can be retried after a transient failure.

For rate limits, follow the server’s retry guidance and back off. See [HTTP errors](https://developer.brigg.app/http#errors) and [safe retries and limits](https://developer.brigg.app/reliability).

| HTTP status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send a JSON object with Content-Type: application/json. |
| 400 | `invalid_input` | Check the request fields and types. |
| 401 | `invalid_key` | The workspace API key is missing, invalid or revoked. |
| 403 | `forbidden` | Check the key’s operation and resource grants. If Brigg-Act-As is supplied, the key must be authorized to delegate to that member. |
| 404 | `not_found` | The requested operation or resource is not available to this credential. |
| 429 | `rate_limited` | Wait for Retry-After before retrying. |
| 409 | `document_not_ready` | The requested original or signed archive is not available yet; read GetSigningRequest before retrying. |

## Next steps

- [Get signing request](https://developer.brigg.app/reference/signing/GetSigningRequest)
- [Remind signers](https://developer.brigg.app/reference/signing/RemindSigners)
- [Send a document for signing](https://developer.brigg.app/signing)
- [Request file signatures](https://developer.brigg.app/reference/signing/RequestFileSignatures)

[Download OpenAPI](https://developer.brigg.app/openapi.json) · [Versioning & retirement](https://developer.brigg.app/versioning)

## Examples

### Example request

Fictional values. Replace IDs and business details with values from your workspace.
#### cURL


```sh
curl 'https://api.brigg.app/v1/operations/signing.GetSigningDocument' \
  -H "Authorization: Bearer $BRIGG_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "signing_request_id": "sig_example",
  "version": "signed"
}'
```

#### TypeScript


```typescript
const response = await fetch("https://api.brigg.app/v1/operations/signing.GetSigningDocument", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.BRIGG_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "signing_request_id": "sig_example",
    "version": "signed"
  }),
});
const result = await response.json();
if (!response.ok) throw new Error(`${response.status}: ${result.error} — ${result.message}`);
console.log(result);
```

#### Python


```python
import json
import os
from urllib.request import Request, urlopen
from urllib.error import HTTPError

payload = {
  "signing_request_id": "sig_example",
  "version": "signed"
}
request = Request(
    "https://api.brigg.app/v1/operations/signing.GetSigningDocument",
    data=json.dumps(payload).encode("utf-8"),
    headers={
        "Authorization": f"Bearer {os.environ['BRIGG_API_KEY']}",
        "Content-Type": "application/json",
    },
    method="POST",
)
try:
    with urlopen(request) as response:
        print(json.load(response))
except HTTPError as error:
    print(error.code, json.load(error))
    raise
```

#### Response example


```json
{
  "url": "https://example.com/temporary-signed-download",
  "filename": "Consulting agreement.pdf",
  "expires_at": 1794301500000
}
```

## JSON schemas


```json-schema-request
{
  "type": "object",
  "properties": {
    "signing_request_id": {
      "type": "string",
      "minLength": 1,
      "description": "Keep the signing_request_id returned when invitations were requested. A file_id or signer_id identifies something else. [signing.RequestFileSignatures](https://developer.brigg.app/reference/signing/RequestFileSignatures)."
    },
    "version": {
      "type": "string",
      "enum": [
        "original",
        "signed"
      ],
      "default": "signed",
      "description": "Which document to download: the original source or the completed signed archive."
    }
  },
  "required": [
    "signing_request_id"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "signing_request_id": "sig_example",
      "version": "signed"
    }
  ]
}
```


```json-schema-response
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "Absolute URL, including its scheme."
    },
    "filename": {
      "type": "string",
      "description": "Original filename, including its extension."
    },
    "expires_at": {
      "type": "number",
      "description": "Signing deadline in Unix milliseconds."
    }
  },
  "required": [
    "url",
    "filename",
    "expires_at"
  ],
  "additionalProperties": false,
  "examples": [
    {
      "url": "https://example.com/temporary-signed-download",
      "filename": "Consulting agreement.pdf",
      "expires_at": 1794301500000
    }
  ]
}
```

