List Docs7 sites
The teamspace’s Docs7 sites. GitHub sites are in
data, sites deployed with the docs7 deploy CLI in localSites. Any member.1 min read
get/v2/teamspaces/{teamspaceId}/sites
Request example
curl --request GET \
--url https://context7.com/api/v2/teamspaces/{teamspaceId}/sites \
--header 'Authorization: Bearer <token>'import requests
url = "https://context7.com/api/v2/teamspaces/{teamspaceId}/sites"
headers = {
"Authorization": "Bearer <token>",
}
response = requests.request("GET", url, headers=headers)
print(response.text)const response = await fetch('https://context7.com/api/v2/teamspaces/{teamspaceId}/sites', {
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/{teamspaceId}/sites',
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/{teamspaceId}/sites"
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/{teamspaceId}/sites"))
.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/{teamspaceId}/sites')
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
{
"data": [
{
"id": "<string>",
"projectId": "<string>",
"createdBy": "<string>",
"repoUrl": "<string>",
"repositoryId": "<string>",
"installationId": 1,
"branch": "<string>",
"defaultBranch": "<string>",
"docsPath": "<string>",
"hosting": "off",
"analyticsUrl": "<string>",
"workerName": "<string>",
"platformHostname": "acme-docs.docs7.io",
"customDomain": "<string>",
"customDomainPath": "<string>",
"customDomainRouting": "dns",
"customHostnameId": "<string>",
"customDomainStatus": "none",
"customDomainError": "<string>",
"customDomainRecords": [
{
"purpose": "domain_ownership",
"type": "CNAME",
"name": "<string>",
"value": "<string>"
}
],
"context7Index": true,
"context7LibraryName": "/acme/docs",
"improveSchedule": "off",
"pullRequestReview": {
"enabled": true,
"response": "comment"
},
"codeWatch": {
"enabled": true,
"repositories": [
{
"repositoryId": "<string>",
"repoUrl": "<string>"
}
]
},
"createdAt": "2026-08-10T12:00:00Z",
"updatedAt": "2026-08-10T12:00:00Z",
"buildFixSchedule": "off"
}
],
"localSites": [
{
"source": "local",
"id": "<string>",
"projectId": "<string>",
"createdBy": "<string>",
"name": "<string>",
"slug": "<string>",
"hosting": "on",
"workerName": "<string>",
"platformHostname": "<string>",
"customDomain": "<string>",
"customDomainPath": "<string>",
"customDomainRouting": "<string>",
"customHostnameId": "<string>",
"customDomainStatus": "none",
"customDomainError": "<string>",
"customDomainRecords": [
{
"purpose": "domain_ownership",
"type": "CNAME",
"name": "<string>",
"value": "<string>"
}
],
"createdAt": "2026-08-10T12:00:00Z",
"updatedAt": "2026-08-10T12:00:00Z"
}
],
"configuration": {
"hostingZone": "<string>",
"customDomainCnameTarget": "<string>"
}
}{
"error": "invalid_id",
"message": "Invalid site id."
}{
"error": "unauthorized",
"message": "Authentication required."
}{
"error": "forbidden",
"message": "You do not have permission to do this."
}{
"error": "not_found",
"message": "Site not found."
}{
"error": "internal_error",
"message": "Internal server error."
}get/v2/teamspaces/{teamspaceId}/sites
Authorization
Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely.
Path parameters
Teamspace id.
Responses
application/json
The sites
Show child attributesHide child attributes
Teamspace id.
GitHub repository id.
GitHub App installation id.
Pinned production branch. Null follows the default branch.
Docs folder in the repository;
. is the root.External docs URL for browser analytics of a site that Docs7 does not host.
Path prefix the docs are served under on the custom domain.
Options:
dnsproxyOptions:
nonepending_ownershippending_dnspending_validationpending_certificatepending_proxyactivefailedWhether the repository is indexed in Context7.
How often the Context7 Agent runs on its own.
Options:
offdailyweeklyPR Review Agent settings.
Code Watch Agent settings: code repositories whose merged pull requests can change the docs.
When the Build Fix Agent fixes the issues of the latest production build (hosted sites).
Options:
offafter_builddailyweeklyShow child attributesHide child attributes
Options:
localOptions:
onOptions:
noneItems: max 0
Was this page helpful?