Skip to content
Skip to Content
DevelopersAPI referenceLists

Change the expiry of the public link

PATCH
/v1/lists/{id}/public

Owner only. Keeps the URL. expires_at is required (null for never). 404 (share.not_found) when the link is off or expired.

Authorization

bearer
headerAuthorizationBearer <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.

Path Parameters

id*string

Request Body

application/json
  1. 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.

Formatdate-time

Response Body

The list with its link

application/json
  1. response
id*string
name*string
item_count*integer

Live items in the list, from every member

role*string

The caller's role in the list

Value in"owner""editor""viewer"
owner_email?string

Who shared the list. Not present on the caller's own lists

member_count?integer

Collaborators and pending invitations. Owner only

public_token?string

Secret in the public link. Owner only, and only while the link is on

public_url?string

The web page of the public link. Owner only, and only while the link is on

public_expires_at?|

When the public link expires; null means never. Owner only, and only while the link is on

Formatdate-time
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X PATCH 'https://example.com/v1/lists/string/public' \  -H 'Content-Type: application/json' \  -d '{  "expires_at": "2026-12-31T18:00:00Z"}'
Example Response
{  "id": "string",  "name": "string",  "item_count": 0,  "role": "owner",  "owner_email": "string",  "member_count": 0,  "public_token": "string",  "public_url": "string",  "public_expires_at": "2019-08-24T14:15:22Z",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}