> ## Documentation Index
> Fetch the complete documentation index at: https://tapace.lk/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a download link

> Creates a link to the pass that expires.

Use this instead of the permanent `distributionUrl` when a link should stop working after a while. See [Deliver passes](https://tapace.lk/docs/guides/deliver-passes.md).

**id** `string` *required*

The pass ID.

**Idempotency-Key** `string` *required*

A unique value for this request.

**expiresInSeconds** `integer` (default: 3600)

How long the link works, in seconds.

### Response

**id** `string`

Unique ID, starting with `dlink_`. Use it to revoke the link.

**passId** `string`

The pass the link opens.

**url** `string`

The link to send to the holder. It's returned only once.

**expiresAt** `string`

When the link stops working.

**createdAt** `string`

When the link was created.

```bash cURL theme={null}
curl https://api.tapace.lk/v1/passes/pass_7hGk2LmQ9xVt4RnB8cYe/download-links \
  -H "Authorization: Bearer $TAPACE_API_KEY" \
  -H "Idempotency-Key: 3e7a1c9b-2d4f-4a6e-b8c1-7f5d2e9a4b10" \
  -H "Content-Type: application/json" \
  -d '{ "expiresInSeconds": 3600 }'
```

```json 201 theme={null}
{
  "object": "download_link",
  "id": "dlink_Vb3Nq8Lm2Xr7Tk4Pz9Wc",
  "passId": "pass_7hGk2LmQ9xVt4RnB8cYe",
  "url": "https://tapace.lk/p/dl/kX2r9QvL7mT4nB8cYe3WpZ",
  "expiresAt": "2026-10-13T11:00:00.000Z",
  "createdAt": "2026-10-13T10:00:00.000Z"
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.