Change a share link
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.
apiKeyAuthorizationBearer <token>A secret API key from the dashboard (Developers → API keys): vl_live_…, or vl_test_… for test mode. Each operation says which scope the key needs.
linkId*stringThe share link id, from the list or from the answer that made it.
if-match?stringThe 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.
1 <= length <= 20application/json- body
title?stringA new page name.
1 <= length <= 80displayName?stringA new name shown as the sender.
1 <= length <= 80target?stringSwitch between live and draft.
"live""draft"privacyUrl?stringA new privacy policy address, https only.
length <= 500expiresAt?stringA new end, as a date and time one hour to 30 days from now.
date-timelimits?Any of the nine caps; the ones you leave out keep their value.
tools?The whole list of tools switched off, by name. A tool that is always off cannot be left out of it.
refreshSnapshot?booleantrue seals the link a new version from its source again.
The link after the change
application/json- response
id*stringThe link id.
agentId*stringThe agent the link opens.
uuidstate*stringactive, expired or revoked (turned off).
"active""expired""revoked"title*stringdisplayName*stringtarget*stringlive: the published version of the agent. draft: its draft as it is now. The link keeps the version it was made from until you update it.
"live""draft"sealedVersionLabel*stringWhat version the link runs, in words: "Published version of Nov 8" or "Draft of Nov 8, 3:12 pm".
sealedAt*stringdate-timeprivacyUrl*stringlimits*The nine caps of the link.
expiresAt*stringdate-timetools*Which tools the link has off. Tools that send, call or transfer to a destination from the conversation are always off.
usage*lastUsedAt*|date-timerevokedBy*|Who turned it off, when it was.
revokedAt*|date-timecreatedBy*stringcreatedAt*stringdate-timeupdatedAt*stringdate-timeversion*integerSend this back as If-Match when you change the link. A stale one is refused with 409.
behindPublishedReason?|Set when the link runs an older version than the agent publishes now, and says why it was not moved. Change the link to update it.
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 } }'{ "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}