List teamspaces
The teamspaces the caller is a member of, oldest first. An API key sees only its own teamspace.
1 min read
get/v2/teamspaces
Request example
curl --request GET \
--url https://context7.com/api/v2/teamspaces \
--header 'Authorization: Bearer <token>'import requests
url = "https://context7.com/api/v2/teamspaces"
headers = {
"Authorization": "Bearer <token>",
}
response = requests.request("GET", url, headers=headers)
print(response.text)const response = await fetch('https://context7.com/api/v2/teamspaces', {
method: 'GET',
headers: {
'Authorization': 'Bearer <token>'
}
});
const data = await response.json();
console.log(data);<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://context7.com/api/v2/teamspaces',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer <token>',
],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://context7.com/api/v2/teamspaces"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://context7.com/api/v2/teamspaces"))
.header("Authorization", "Bearer <token>")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());require 'uri'
require 'net/http'
url = URI('https://context7.com/api/v2/teamspaces')
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = url.scheme == 'https'
request = Net::HTTP::Get.new(url)
request['Authorization'] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyResponse
{
"teamspaces": [
{
"id": "<string>",
"name": "<string>",
"isPersonal": true,
"role": "owner",
"ownerPlan": "free",
"billingModel": "seat",
"billingSource": "context7",
"docs7ProEnabled": true,
"createdAt": "2026-08-10T12:00:00Z"
}
]
}{
"error": "invalid_api_key",
"message": "Invalid API key. Please check your API key. API keys should start with 'ctx7sk' prefix."
}{
"error": "internal_error",
"message": "An error occurred while processing your request"
}get/v2/teamspaces
Authorization
Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely.
Responses
application/json
Teamspaces
Show child attributesHide child attributes
The user's personal project. It has no members and no private sources.
The owner's plan. The teamspace's features follow it.
Options:
freeproenterpriseOptions:
seatpaygvercel_marketplace teamspaces are billed and managed by Vercel.Options:
context7vercel_marketplaceWas this page helpful?