Space Sites

Create Space Site Link

Create a temporary link to a space site

post
/v1/space/{spaceId}/site/{siteId}/link/create

Description

Mints a signed link that opens the site, or one folder of it, until the link expires. This is how a private site is opened. The link is a credential; share it only with people who should see the content.

Authorization

ChatBotKit API Secret * Required

HTTP Authorization Scheme: bearer

Path Parameters

spaceIdstring* Required

siteIdstring* Required

Request Body * Required

Request Body Schema: application/json

pathstring

The folder the link unlocks, relative to the site root (e.g. reports/q1). Leave empty to unlock the whole site.

durationInSecondsinteger

How long the link stays valid, in seconds (60 to 604800, default 3600)

import { ChatBotKit } from '@chatbotkit/sdk'

const cbk = new ChatBotKit({

token: process.env.CHATBOTKIT_API_TOKEN!

})

const response = await cbk.space.site.link.create(

spaceId, siteId,
{
"path":"string",
"durationInSeconds":"integer"
}
)
{
"url":"string",
"expiresAt":"string"
}
The link was created