Share the item, or change the expiry of its link
Turns the public link on, or changes the expiry of the link that is on without changing its URL. With no body or no
expires_at, a new link never expires and an existing one keeps its expiry; null means never. An expired link is
replaced by a new URL. 402 when the plan lacks sharing or is at its public_links limit; 422 for an expiry that is
not in the future (in_past) or more than 365 days ahead (too_far_ahead).
bearerAuthorizationBearer <token>A personal API key (ga_…), sent as Authorization: Bearer ga_…. A key gets 403 on a resource it has no access to, and on anything that changes data without write access.
id*stringapplication/json- body
expires_at?|RFC 3339. In the future and at most 365 days ahead; null means never. Leave it out to keep the current expiry.
date-timeThe link
application/json- response
token*stringThe secret in the link (22 characters). Owner only.
url*stringThe web page of the link: WEB_URL/s/{token}
expires_at*|Null means never
date-timecreated_at*stringWhen this URL was made (a rotation keeps it)
date-timeview_count*integerTimes the link was opened
curl -X PUT 'https://example.com/v1/items/string/share' \ -H 'Content-Type: application/json' \ -d '{ "expires_at": "2026-12-31T18:00:00Z"}'{ "token": "string", "url": "string", "expires_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "view_count": 0}