Themes
Theme management β colors, fonts, and palette customization.
List themes
Returns a paginated list of the user's themes.
Authorization
AuthorizationRequiredBearer <token>NextDocs API key (nxd_xxx format)
In: header
Query Parameters
limitintegerNumber of items to return (1-20).
20Minimum: 1Maximum: 20afterstringCursor for pagination. Pass the ID of the last item from the previous page.
org_idstringOrganization ID returned by organizations.list. Omit for personal scope.
1Response Body
A paginated list of resources.
TypeScript Definitions
Use the response body type in TypeScript.
objectRequiredstring"list"dataRequiredarray<object>has_moreRequiredbooleanWhether there are more items after this page.
Authentication required or API key is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X GET "https://api.nextdocs.io/v1/themes?limit=20&after=clxyz123...&org_id=org_2abc123" \
-H "Authorization: Bearer <token>"fetch("https://api.nextdocs.io/v1/themes?limit=20&after=clxyz123...&org_id=org_2abc123", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.nextdocs.io/v1/themes?limit=20&after=clxyz123...&org_id=org_2abc123"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.nextdocs.io/v1/themes?limit=20&after=clxyz123...&org_id=org_2abc123"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text){
"object": "list",
"data": [
{
"id": "abc123",
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"created_at": "2026-01-15T10:30:00.000Z",
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"is_custom": true,
"name": "Midnight Blue",
"object": "theme",
"updated_at": "2026-04-01T08:00:00.000Z"
}
],
"has_more": false
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}Create a theme
Creates a custom theme with the specified colors and fonts.
Authorization
AuthorizationRequiredBearer <token>NextDocs API key (nxd_xxx format)
In: header
Request Body
application/jsonOptionalcolorsobjectPartial theme color palette. Provide only the fields you want to set.
font_primarystringHeading font family (Google Fonts name).
100font_secondarystringBody font family (Google Fonts name).
100nameRequiredstringDisplay name for the theme.
1Maximum length: 100org_idstringOrganization ID returned by organizations.list. Omit for personal scope.
1Response Body
Resource created successfully.
idRequiredstringcolorsRequiredobjectcreated_atRequiredstringfont_primaryRequiredstring | null | nullfont_secondaryRequiredstring | null | nullis_customRequiredbooleannameRequiredstringobjectRequiredstring"theme"updated_atRequiredstringRequest validation failed.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectAuthentication required or API key is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectThe requested resource was not found.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectRate limit or usage quota exceeded.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X POST "https://api.nextdocs.io/v1/themes" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "My Brand Theme",
"org_id": "org_2abc123"
}'const body = JSON.stringify({
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "My Brand Theme",
"org_id": "org_2abc123"
})
fetch("https://api.nextdocs.io/v1/themes", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.nextdocs.io/v1/themes"
body := strings.NewReader(`{
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "My Brand Theme",
"org_id": "org_2abc123"
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.nextdocs.io/v1/themes"
body = {
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "My Brand Theme",
"org_id": "org_2abc123"
}
response = requests.request("POST", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){
"id": "abc123",
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"created_at": "2026-01-15T10:30:00.000Z",
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"is_custom": true,
"name": "Midnight Blue",
"object": "theme",
"updated_at": "2026-04-01T08:00:00.000Z"
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}Get a theme
Returns a single theme by ID.
Authorization
AuthorizationRequiredBearer <token>NextDocs API key (nxd_xxx format)
In: header
Path Parameters
idRequiredstringTheme ID
Query Parameters
org_idstringOrganization ID returned by organizations.list. Omit for personal scope.
1Response Body
The requested resource.
idRequiredstringcolorsRequiredobjectcreated_atRequiredstringfont_primaryRequiredstring | null | nullfont_secondaryRequiredstring | null | nullis_customRequiredbooleannameRequiredstringobjectRequiredstring"theme"updated_atRequiredstringAuthentication required or API key is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectThe requested resource was not found.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X GET "https://api.nextdocs.io/v1/themes/theme_abc123?org_id=org_2abc123" \
-H "Authorization: Bearer <token>"fetch("https://api.nextdocs.io/v1/themes/theme_abc123?org_id=org_2abc123", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.nextdocs.io/v1/themes/theme_abc123?org_id=org_2abc123"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.nextdocs.io/v1/themes/theme_abc123?org_id=org_2abc123"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text){
"id": "abc123",
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"created_at": "2026-01-15T10:30:00.000Z",
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"is_custom": true,
"name": "Midnight Blue",
"object": "theme",
"updated_at": "2026-04-01T08:00:00.000Z"
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}Update a theme
Partially updates a theme. Only provided fields are changed.
Authorization
AuthorizationRequiredBearer <token>NextDocs API key (nxd_xxx format)
In: header
Request Body
application/jsonOptionalcolorsobjectPartial theme color palette. Provide only the fields you want to set.
font_primarystringUpdated heading font family.
100font_secondarystringUpdated body font family.
100namestringUpdated display name for the theme.
1Maximum length: 100org_idstringOrganization ID returned by organizations.list. Omit for personal scope.
1Path Parameters
idRequiredstringTheme ID
Response Body
Resource updated successfully.
idRequiredstringcolorsRequiredobjectcreated_atRequiredstringfont_primaryRequiredstring | null | nullfont_secondaryRequiredstring | null | nullis_customRequiredbooleannameRequiredstringobjectRequiredstring"theme"updated_atRequiredstringRequest validation failed.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectAuthentication required or API key is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectThe requested resource was not found.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectRate limit or usage quota exceeded.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X PATCH "https://api.nextdocs.io/v1/themes/theme_abc123" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "Updated Theme",
"org_id": "org_2abc123"
}'const body = JSON.stringify({
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "Updated Theme",
"org_id": "org_2abc123"
})
fetch("https://api.nextdocs.io/v1/themes/theme_abc123", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.nextdocs.io/v1/themes/theme_abc123"
body := strings.NewReader(`{
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "Updated Theme",
"org_id": "org_2abc123"
}`)
req, _ := http.NewRequest("PATCH", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.nextdocs.io/v1/themes/theme_abc123"
body = {
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"name": "Updated Theme",
"org_id": "org_2abc123"
}
response = requests.request("PATCH", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){
"id": "abc123",
"colors": {
"background": "#FFFFFF",
"foreground": "#1F1F1F",
"muted": "#F5F5F5",
"card": "#FAFAFA",
"text_on_muted": "#6B7280",
"text_on_card": "#374151",
"primary": "#3B82F6",
"secondary": "#8B5CF6",
"tertiary": "#EC4899",
"text_on_primary": "#FFFFFF",
"text_on_secondary": "#FFFFFF",
"text_on_tertiary": "#FFFFFF",
"border": "#E5E7EB"
},
"created_at": "2026-01-15T10:30:00.000Z",
"font_primary": "Playfair Display",
"font_secondary": "Inter",
"is_custom": true,
"name": "Midnight Blue",
"object": "theme",
"updated_at": "2026-04-01T08:00:00.000Z"
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}Delete a theme
Deletes a theme. Fails with 409 if any brand kits still reference it.
Authorization
AuthorizationRequiredBearer <token>NextDocs API key (nxd_xxx format)
In: header
Request Body
application/jsonOptionalorg_idstringOrganization ID returned by organizations.list. Omit for personal scope.
1Path Parameters
idRequiredstringTheme ID
Response Body
Resource deleted.
Authentication required or API key is invalid.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectThe requested resource was not found.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectRequest conflicts with the current state of the resource.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredobjectcurl -X DELETE "https://api.nextdocs.io/v1/themes/theme_abc123" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"org_id": "org_2abc123"
}'const body = JSON.stringify({
"org_id": "org_2abc123"
})
fetch("https://api.nextdocs.io/v1/themes/theme_abc123", {
headers: {
"Authorization": "Bearer <token>"
},
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://api.nextdocs.io/v1/themes/theme_abc123"
body := strings.NewReader(`{
"org_id": "org_2abc123"
}`)
req, _ := http.NewRequest("DELETE", url, body)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://api.nextdocs.io/v1/themes/theme_abc123"
body = {
"org_id": "org_2abc123"
}
response = requests.request("DELETE", url, json = body, headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
})
print(response.text){
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The requested resource was not found."
}
}