Update a private share link for a site
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequiredPattern:
A unique entity identifier
^[a-zA-Z0-9_-]+$siteIdstringRequired
The unique id of the site
shareLinkIdstringRequired
The unique id of the share link
Body
activebooleanOptional
namestring · max: 50Optional
Name of the share link
Responses
200
The site share link has been updated
application/json
objectstring · enumRequiredPossible values:
Type of Object, always equals to "share-link"
idstringRequired
Unique identifier for the share-link
createdAtstring · date-timeRequired
namestring · max: 50Optional
Name of the share link
activebooleanOptional
patch/orgs/{organizationId}/sites/{siteId}/share-links/{shareLinkId}
PATCH /v1/orgs/{organizationId}/sites/{siteId}/share-links/{shareLinkId} HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 29
{
"active": true,
"name": "text"
}200
The site share link has been updated
{
"object": "share-link",
"id": "text",
"createdAt": "2026-01-01T00:00:00.000Z",
"name": "text",
"active": true,
"urls": {
"published": "https://example.com"
}
}Last updated
Was this helpful?