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

Create a private share link for a site

Creates a new named share link that grants access to the private site without requiring full user authentication. Share links are useful for sharing pre-publication content with reviewers or stakeholders. Each link has a unique key and can be activated or deactivated independently.

Available in MCP
post
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

Body
namestring · max: 50Required

Name of the share link

Responses
201

The share link has been created

application/json
post/orgs/{organizationId}/sites/{siteId}/share-links
POST /v1/orgs/{organizationId}/sites/{siteId}/share-links HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 15

{
  "name": "text"
}
201

The share link has been created

{
  "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