curl --request POST \
--url https://app.teamai.com/api/v1/chats/{chatId}/share \
--header 'Content-Type: application/json' \
--header 'x-teamai-api-key: <api-key>' \
--data '{}'import requests
url = "https://app.teamai.com/api/v1/chats/{chatId}/share"
payload = {}
headers = {
"x-teamai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-teamai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.teamai.com/api/v1/chats/{chatId}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teamai.com/api/v1/chats/{chatId}/share",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-teamai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teamai.com/api/v1/chats/{chatId}/share"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamai.com/api/v1/chats/{chatId}/share")
.header("x-teamai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/chats/{chatId}/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"title": "<string>",
"shareUrl": "<string>",
"isActive": true,
"viewCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scope": "workspace"
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Create or refresh chat share link
Creates a share link for the chat, or refreshes it when the chat already has one. A refresh takes a new snapshot of the conversation, applies the requested scope, and switches the link back on if it was off. The share ID and URL stay the same.
A share link shows the conversation as it was when it was created or last refreshed. Call this endpoint again to bring it up to date.
The API key acts as its user: the chat must be in the key’s workspace and that user must have access to it. Any user with access may manage the chat’s share link, whoever created it. Keys created before June 2025 have no user and are refused with 403.
With scope set to public, anyone with the link can open it without signing in. They can read the conversation, including tool inputs, tool outputs and reasoning, and download the files the chat produced.
curl --request POST \
--url https://app.teamai.com/api/v1/chats/{chatId}/share \
--header 'Content-Type: application/json' \
--header 'x-teamai-api-key: <api-key>' \
--data '{}'import requests
url = "https://app.teamai.com/api/v1/chats/{chatId}/share"
payload = {}
headers = {
"x-teamai-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-teamai-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://app.teamai.com/api/v1/chats/{chatId}/share', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.teamai.com/api/v1/chats/{chatId}/share",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-teamai-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.teamai.com/api/v1/chats/{chatId}/share"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamai.com/api/v1/chats/{chatId}/share")
.header("x-teamai-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/chats/{chatId}/share")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"title": "<string>",
"shareUrl": "<string>",
"isActive": true,
"viewCount": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"scope": "workspace"
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Authorizations
Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).
Path Parameters
Chat ID. Must be a chat in the API key's workspace that the key's user can access. Organization API keys are bound to the organization's own workspace, so chats in its member workspaces return 404; use a workspace key.
Body
Who can open the link. workspace: signed-in members of the chat's workspace. organization: signed-in members of any workspace in its organization. public: anyone with the link.
workspace, organization, public Response
The created or refreshed share link.
Show child attributes
Show child attributes
Was this page helpful?