API Reference List Projects
List Projects
List the projects you can access, optionally with each one's latest build, domain and access mode.
Session token
Returns the documentation projects in your workspaces, newest first. Add include to get each project's latest build, custom domain and site access mode in the same request.
Note
Any signed-in user, with a session JWT. API keys are not accepted. Any plan. You only see projects of workspaces you are a member of.
Query Parameters
NameDescription
orgIdOnly projects of this workspace. You must be a member, or the request returns
403 forbidden. Without it, you get the projects of every workspace you belong to.includeComma-separated extras to attach to each project:
lastBuild, domain, access. Any other value returns 400 validation_error. Without include, the response has no extra fields.The list is not paginated: every matching project is returned.
Response
NameDescription
dataProject objects, each with
docsUrl and the workspace's plan (free when it has no subscription). With include, each project also has:Show 4 child attributesarray
lastBuildWith
include=lastBuild. The newest production (non-preview) build, in any status, as a build object without logs, plus triggeredBy and errors. null when the project has no production build.Show 2 child attributesobject | null
errorsWhen the build
failed, up to 20 error-level lines from its log ({ timestamp, level, message, stage? }). Otherwise [].progress{ done, total } pages compiled while the build is running, as on List Builds rows. Always present on a non-null lastBuild; null when the build is queued or finished, or when progress can't be read in time. lastDeployedBuild has no progress.lastDeployedBuildWith
include=lastBuild. The newest production build with status deployed — the version the site is serving — without logs, plus triggeredBy. null when none has deployed.domainWith
include=domain. { domain, status, verified } for the project's custom domain. A verified domain (status ready, ssl_active or active) is preferred; otherwise the newest pending one. null when the project has no custom domain.accessModeWith
include=access. Who can read the doc site: public, password, invite or sso.Response — 200 OK
Build objects are shortened here. They carry every field listed on Get Build except logs.
Error Responses
| Status | error.code | When |
|---|---|---|
| 400 | validation_error | include contains an unknown value. details.include lists the accepted ones |
| 401 | unauthorized | No session JWT, an invalid or expired one, or an API key |
| 401 | session_revoked | The session has been signed out |
| 403 | forbidden | You are not a member of the workspace named by orgId |
400 Bad Request
json
{
"error": {
"code": "validation_error",
"message": "Unknown include \"customDomain\"",
"details": {
"include": ["lastBuild", "domain", "access"],
"traceId": "6f1c2a9e-3b7d-4c11-9a0e-2d5f8b4c7e10"
}
}
}
Was this page helpful? Yes No
Previous
Next
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl "https://api.syntext.dev/v1/projects?include=lastBuild,domain,access" \
-H "Authorization: Bearer $SYNTEXT_JWT"
// A browser has no environment variables: set these to your values.
const SYNTEXT_JWT = '<SYNTEXT_JWT>';
const response = await fetch('https://api.syntext.dev/v1/projects?include=lastBuild,domain,access', {
method: 'GET',
headers: {
'Authorization': `Bearer ${SYNTEXT_JWT}`,
},
});
const data = await response.json();
console.log(response.status, data);
import os
import requests
url = "https://api.syntext.dev/v1/projects?include=lastBuild,domain,access"
headers = {
"Authorization": f"Bearer {os.environ['SYNTEXT_JWT']}",
}
response = requests.get(url, headers=headers)
print(response.status_code)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"os"
)
func main() {
req, err := http.NewRequest("GET", "https://api.syntext.dev/v1/projects?include=lastBuild,domain,access", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer "+os.Getenv("SYNTEXT_JWT"))
res, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
panic(err)
}
fmt.Println(res.Status)
fmt.Println(string(body))
}
require "net/http"
require "uri"
uri = URI("https://api.syntext.dev/v1/projects?include=lastBuild,domain,access")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
request = Net::HTTP::Get.new(uri)
request["Authorization"] = "Bearer #{ENV.fetch("SYNTEXT_JWT")}"
response = http.request(request)
puts response.code
puts response.body
<?php
$ch = curl_init();
curl_setopt_array($ch, [
CURLOPT_URL => 'https://api.syntext.dev/v1/projects?include=lastBuild,domain,access',
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('SYNTEXT_JWT'),
],
]);
$response = curl_exec($ch);
if ($response === false) {
throw new RuntimeException(curl_error($ch));
}
$status = curl_getinfo($ch, CURLINFO_RESPONSE_CODE);
curl_close($ch);
echo $status, PHP_EOL, $response, PHP_EOL;
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.syntext.dev/v1/projects?include=lastBuild,domain,access"))
.header("Authorization", "Bearer " + System.getenv("SYNTEXT_JWT"))
.GET()
.build();
HttpResponse<String> response = HttpClient.newHttpClient()
.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.statusCode());
System.out.println(response.body());
}
}
using System.Net.Http;
using System.Text;
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.syntext.dev/v1/projects?include=lastBuild,domain,access");
request.Headers.TryAddWithoutValidation("Authorization", "Bearer " + Environment.GetEnvironmentVariable("SYNTEXT_JWT"));
using var response = await client.SendAsync(request);
Console.WriteLine((int)response.StatusCode);
Console.WriteLine(await response.Content.ReadAsStringAsync());
Responseapplication/json
200OK
{
"data": [
{
"id": "3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c",
"orgId": "org_abc123",
"name": "API Docs",
"slug": "api-docs",
"description": "Documentation for our REST API",
"repoUrl": "https://github.com/acme/api-docs",
"repoBranch": "main",
"customDomain": null,
"subdomain": "api-docs-docs",
"docsUrl": "https://docs.example.com",
"plan": "pro",
"createdAt": "2026-01-15T12:00:00Z",
"updatedAt": "2026-06-28T11:00:00Z",
"lastBuild": {
"id": "bld_abc456",
"status": "failed",
"trigger": "push",
"branch": "main",
"isPreview": false,
"commitSha": "f6e5d4c3b2a1f6e5d4c3b2a1f6e5d4c3b2a1f6e5",
"commitMessage": "Restructure quickstart",
"error": "MDX compilation failed",
"createdAt": "2026-11-08T09:00:00Z",
"completedAt": "2026-11-08T09:00:06Z",
"triggeredByUserId": "usr_abc123",
"triggeredBy": {
"id": "usr_abc123",
"name": "Ada Lovelace",
"avatarUrl": "https://avatars.githubusercontent.com/u/1234567"
},
"errors": [
{
"timestamp": "2026-11-08T09:00:05Z",
"level": "error",
"message": "docs/quickstart.mdx: Unexpected closing tag </Steps>",
"stage": "compiling"
}
],
"progress": null
},
"lastDeployedBuild": {
"id": "bld_xyz789",
"status": "deployed",
"trigger": "push",
"branch": "main",
"isPreview": false,
"deployUrl": "https://api-docs-docs.syntext.dev",
"completedAt": "2026-11-07T10:00:05Z",
"triggeredByUserId": null,
"triggeredBy": null
},
"domain": {
"domain": "docs.example.com",
"status": "ssl_active",
"verified": true
},
"accessMode": "public"
}
]
}