# Create a share link

URL: https://heaven.dev/docs/reference/computers/share-link-add
Updated: 2026-11-21

Create a link that opens a Computer's main website without requiring the visitor to sign in. Each new browser that claims the link uses one claim. The response returns the link to send.

`POST /v1/computer/modify`

## Parameters

- `computer` (string, required): Computer name or ID.
- `label` (string): Label for identifying the link in `access`. At most 100 bytes on one line.
- `expires` (string): Link lifetime, from 1s through 365d, or `never`. Defaults to 30d.
- `max_uses` (string): Maximum number of different browsers that can claim the link. Each browser counts once. Omit for unlimited claims.

## Returns

- `data` (object, always present): A claimable link granting Web access to a Computer.
  - `computer_id` (string, always present): Computer the link reaches.
  - `created_by` (string, always present): User who created the link.
  - `expires_at` (string (date-time) | null, always present): When the link stops accepting claims, or null if it has no expiry.
  - `id` (string, always present): Share link's ID.
  - `label` (string, always present): Saved label identifying the link.
  - `max_uses` (integer | null, always present): Maximum number of claims, or null without a limit.
  - `url` (string): Claimable URL, returned on creation. Anyone holding it can claim access while valid. May be omitted.
  - `uses` (integer, always present): Number of claims already made.

## Errors

Each code is explained in full at https://heaven.dev/docs/reference/errors.

| Code | Status | What happened |
|---|---:|---|
| `invalid` | 400 | An input is missing or invalid. |
| `unauthenticated` | 401 | The credential is missing, invalid, expired or revoked. |
| `denied` | 403 | The caller lacks permission for this action. |
| `not_found` | 404 | The resource is absent or inaccessible to this caller. |
| `conflict` | 409 | The request conflicts with the current resource state or an earlier request. |
| `over_capacity` | 409 | The request exceeds a resource or credential allowance. |
| `access_list_full` | 409 | The change would exceed the access-list allowance. |
| `payment_required` | 402 | Payment or credit is required. |
| `rate_limited` | 429 | The caller's request rate exceeds its limit. |
| `busy` | 429 | Too much work is in progress to accept this request. |
| `unknown` | 503 | The outcome is unconfirmed; a change may have happened. |
| `unavailable` | 503 | The service or requested feature is unavailable. |

## Notes

- CLI: `heaven login` with `HEAVEN_API_KEY` unset. MCP: Heaven sign-in. cURL: `HEAVEN_SIGN_IN_KEY` from approved device sign-in (`POST /v1/auth/create`).
- A key limited to a command list cannot run this command.

## Examples

```sh tab="heaven CLI"
heaven share link add COMPUTER
  [--label LABEL]
  [--expires DURATION]
  [--max-uses N]
  [--qr]
```

```sh tab="SSH"
ssh cli@heaven.dev share link add COMPUTER
  [--label LABEL]
  [--expires DURATION]
  [--max-uses N]
  [--qr]
```

```sh tab="cURL"
curl https://heaven.dev/v1/computer/modify \
  -H "Authorization: Bearer $HEAVEN_SIGN_IN_KEY" \
  --json '{"action": "share link add", "computer": "my-site"}'
```

```json tab="MCP"
{ "tool": "share_link_add",
  "arguments": { "computer": "my-site" } }
```

Response:

```json title="Response excerpt"
{
  "version": 1,
  "data": {
    "computer_id": "3f1c9e2a-7b4d-4c8e-9a6f-2d5b8e1c7a90",
    "created_by": "08056ba4-2e75-4bcf-afd9-b1e0f9c6e00f",
    "expires_at": "2026-12-16T12:00:00Z",
    "id": "de74219e-f485-47a9-afd2-28ace5ec099b",
    "label": "",
    "max_uses": null,
    "url": "https://heaven.dev/s/MDVhMmUzMjMxNTlmYzlkNDU0MjQ0ODJh",
    "uses": 0
  }
}
```
