---
title: "Create a temporary link to a space site"
method: POST
path: "/space/{spaceId}/site/{siteId}/link/create"
tags: ["Space Site"]
---

# Create a temporary link to a space site

`POST /space/{spaceId}/site/{siteId}/link/create`

## Request

- Base URL: `https://api.chatbotkit.com/api/v1`
- URL: `https://api.chatbotkit.com/api/v1/space/{spaceId}/site/{siteId}/link/create`
- Auth: HTTP bearer

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.

## Path parameters

- `spaceId` string, required
- `siteId` string, required

## Request body

- object
  - `path` string: The folder the link unlocks, relative to the site root (e.g. reports/q1). Leave empty to unlock the whole site.
  - `durationInSeconds` integer: How long the link stays valid, in seconds (60 to 604800, default 3600)

## Response `200`

The link was created

- object
  - `url` string, required: The temporary link to the site
  - `expiresAt` string, date-time, required: When the link stops working

## Other responses

- `default`: An error response

---

[API](https://skmtc.dev/chatbotkit/apis/cbk-api.md) · [All operations](https://skmtc.dev/chatbotkit/apis/cbk-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatbotkit/apis/cbk-api/revisions/13d250576136?raw)
