# Change a share link

Source: https://docs.vlayers.ai/reference/share-links/update-share-link

`PATCH /v1/share-links/{linkId}` · scope `share_links:write`

Changes a link's name, caps, end, privacy address, tools or version. Send the `version` you read as `If-Match`. Tightening is open to any member, or a key with the `share_links:write` scope: a lower cap, a shorter end, a tool switched off, a new name. Loosening is an admin's: a higher cap, a later end, a tool switched on, a change of version, a refreshed snapshot or a new privacy address; a change that does both is loosening. `refreshSnapshot: true` seals the link a new version from its source again, and what was off stays off. A link that was turned off cannot be changed: make a new one.

Requires an API key with the `share_links:write` scope.

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `linkId` | path | string | yes | The share link id, from the list or from the answer that made it. Example: `"grt_0192f5e1a2b37c4d8e5f6a7b8c9d0e1f"` |
| `if-match` | header | string | no | The link's `version` from the last read. A stale one is refused with 409 `version_conflict` instead of overwriting a newer change; leaving it out is refused with 428. Example: `"3"` |
| `title` | body | string | no | A new page name. |
| `displayName` | body | string | no | A new name shown as the sender. |
| `target` | body | "live" \| "draft" | no | Switch between `live` and `draft`. |
| `privacyUrl` | body | string | no | A new privacy policy address, https only. |
| `expiresAt` | body | string | no | A new end, as a date and time one hour to 30 days from now. |
| `limits` | body | object | no | Any of the nine caps; the ones you leave out keep their value. |
| `tools` | body | object | no | The whole list of tools switched off, by name. A tool that is always off cannot be left out of it. |
| `refreshSnapshot` | body | boolean | no | `true` seals the link a new version from its source again. |

## Request

cURL:

```bash
curl -X PATCH "https://api.vlayers.ai/v1/share-links/$SHARE_LINK_ID" \
  -H "Authorization: Bearer $VOICELAYER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "limits": {
      "dollarsMicros": 2000000
    }
  }'
```

TypeScript:

```ts
import { VoiceLayer } from '@voicelayer/api';

const voicelayer = new VoiceLayer();

const { version } = await voicelayer.shareLinks.updateShareLink('<share-link-id>', {
  limits: { dollarsMicros: 2000000 }
});
console.log(version);
```

Python:

```python
from voicelayer import VoiceLayer

vl = VoiceLayer()

result = vl.shareLinks.update_share_link(
    "<share-link-id>",
    limits={
        "dollarsMicros": 2000000,
    },
)
print(result.version)
```

## Response `200`

```json
{
  "id": "grt_0192f5e1a2b37c4d8e5f6a7b8c9d0e1f",
  "agentId": "0192f5c2-6f7a-7b9c-8d1e-2f3a4b5c6d78",
  "state": "active",
  "title": "Books team test",
  "displayName": "Acme Books",
  "target": "live",
  "sealedVersionLabel": "Published version of Nov 8",
  "sealedAt": "2026-11-08T15:12:00.000Z",
  "privacyUrl": "https://acmebooks.example/privacy",
  "limits": {
    "conversations": 20,
    "voiceMinutes": 60,
    "dollarsMicros": 2000000,
    "atOnce": 2,
    "callMinutes": 5,
    "typedMessages": 40,
    "typedDollarsMicros": 1000000,
    "perAddressPerDay": 5,
    "perAddressPerHour": 3
  },
  "expiresAt": "2026-11-10T15:12:00.000Z",
  "tools": {
    "off": [
      "refund_order",
      "vl_send_text"
    ]
  },
  "usage": {
    "conversations": 3,
    "minutes": 12.5,
    "spentMicros": 1500000
  },
  "lastUsedAt": "2026-11-09T09:30:00.000Z",
  "revokedBy": null,
  "revokedAt": null,
  "createdBy": "user_2abc",
  "createdAt": "2026-11-08T15:12:00.000Z",
  "updatedAt": "2026-11-08T15:12:00.000Z",
  "version": 4
}
```
