For the complete documentation index, see llms.txt. This page is also available as Markdown.

Update a private share link for a site

Updates a share link's properties. Use this to temporarily disable a share link without losing its configuration.

Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
organizationIdstringRequired

A unique entity identifier

Pattern: ^[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 · enumRequired

Type of Object, always equals to "share-link"

Possible values:
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?

Powered by GitBook