curl --request GET \
--url https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token \
--header 'Authorization: Bearer <token>' \
--header 'X-TL-Partner-Id: <x-tl-partner-id>'import requests
url = "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token"
headers = {
"X-TL-Partner-Id": "<x-tl-partner-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-TL-Partner-Id': '<x-tl-partner-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token', 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.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-TL-Partner-Id: <x-tl-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-TL-Partner-Id", "<x-tl-partner-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token")
.header("X-TL-Partner-Id", "<x-tl-partner-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-TL-Partner-Id"] = '<x-tl-partner-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workspace_id": "<string>",
"token": "<string>",
"rotated_at": "2024-01-01T12:00:00Z"
}Get public API token
Retrieves the current Public API token for a partner-managed workspace. If a token already exists it is returned as the raw token value so that the partner can configure it in their integration. If no token exists yet, the platform creates a new one and returns it. Only workspaces owned by the calling partner and not billed via are eligible. The response must be treated as sensitive: tokens are returned only over authenticated Partner API calls .
curl --request GET \
--url https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token \
--header 'Authorization: Bearer <token>' \
--header 'X-TL-Partner-Id: <x-tl-partner-id>'import requests
url = "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token"
headers = {
"X-TL-Partner-Id": "<x-tl-partner-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-TL-Partner-Id': '<x-tl-partner-id>', Authorization: 'Bearer <token>'}
};
fetch('https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token', 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.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"X-TL-Partner-Id: <x-tl-partner-id>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-TL-Partner-Id", "<x-tl-partner-id>")
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token")
.header("X-TL-Partner-Id", "<x-tl-partner-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.timelines.ai/partner/api/v1/workspaces/{workspace_id}/api-token")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-TL-Partner-Id"] = '<x-tl-partner-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"workspace_id": "<string>",
"token": "<string>",
"rotated_at": "2024-01-01T12:00:00Z"
}Authorizations
JWT bearer authentication. The token payload must include partner_id, nbf (not-before) and exp (expiry) claims. All Partner API requests must be authenticated with Authorization: Bearer .
Headers
The unique identifier for the partner.
Path Parameters
Response
Public API token
Response payload for retrieving or rotating a workspace Public API token. Returns the workspace_id and the raw token value, and, for rotation calls, the rotated_at timestamp that indicates when the previous token became invalid.

