# Download the sealed (completed) document or its completion certificate

> GET /api/v1/envelopes/{id}/download: Download the sealed (completed) document or its completion certificate.

`GET https://appliflo.com/api/v1/envelopes/{id}/download`

Send your API key in the `Authorization: Bearer` header. Every response is JSON: `{ success, data, error }`.

## Parameters

| Name | In | Required | Description |
| --- | --- | --- | --- |
| `id` | path | yes | Envelope id |
| `artifact` | query | yes | "sealed" is the signed PDF; "certificate" is the Completion Certificate (signers, timestamps, identity method, document hash, seal details). A certificate that was never generated returns 404. One of: sealed, certificate |

## Responses

| Status | Description |
| --- | --- |
| 200 | Short-lived signed download URL. |
| 401 | Missing or invalid API key, or `api_key_expired` for a key past its expiry. |
| 403 | The API key's workspace does not have access to this resource, or `insufficient_scope` (with `required_scope`) for a key without the scope this route needs. |
| 404 | Resource not found in this workspace. |
| 422 | Request failed validation. |
| 500 | Internal error. |

## 200 response

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | true | yes |  |
| `data` | object | yes |  |
| `data.url` | string | yes | Format: uri |

See also: [Errors](https://dev.appliflo.com/guides/errors), [Rate limits](https://dev.appliflo.com/guides/rate-limits), [Idempotency](https://dev.appliflo.com/guides/idempotency).
