/Docs
Search docs or ask a question⌘K
DocsAgent
Changelog
API Reference Apply Organization Theme

Apply Organization Theme

Set a theme on up to 50 projects at once — one pull request, commit or hosted save per project

POST/v1/orgs/{orgId}/themes/{slug}/applyTry it
Session token

Sets theme to this organization theme on many projects in one call. Each project is changed exactly as Publish Appearance Changes would change it, so each one gets its own pull request, commit or hosted save, with that project's own permission checks. Only theme is written; each project's appearance and themeOverrides stay as they are.

Needs the organization admin role (or owner). A caller outside the organization gets 404. These endpoints need a session token; API keys get 401. The call is recorded in the audit log as org_theme.applied.

Path Parameters

NameDescription
orgId:stringpathRequired
The organization ID.
slug:stringpathRequired
The theme's slug.

Request Body

NameDescription
projects:arraybodyRequired
1 to 50 projects, each { id, pin }. A project listed twice is applied once.
Show 2 child attributesarray
target:stringbodyRequired
pr opens a pull request in each project; commit commits straight to each project's branch and needs deploy rights there. Projects without a repository always get a hosted save, which also needs deploy rights.

Response

The request succeeds even when some projects fail: one project failing never stops the others. Check each entry's error.

NameDescription
results:array
One entry per project, in the order sent.
Show 5 child attributesarray

Per-project error codes:

CodeWhen
not_foundNo such project in this organization (including deleted projects)
version_not_foundpin is higher than the theme's latest version
admin_requiredYou're not an admin of this project
deploy_rights_requiredcommit, or a hosted save, without deploy rights on this project
no_changesThe project's config already has this theme
CONFLICT, branch_protected, github_error, config_unreadable, USAGE_LIMIT_EXCEEDEDAs in Publish Appearance Changes
internal_errorSomething unexpected. Try again

Error Responses

These fail the whole request; nothing is applied.

StatusCodeWhen
400validation_errorThe body isn't of the shape above — for example no projects, more than 50, or a missing target
401unauthorizedNo session token, or an API key
403org_admin_requiredYou're a member, not an admin
404not_foundThe organization doesn't exist, or you're not in it
404theme_not_foundNo theme with this slug
Was this page helpful? Yes No
Request
cURLJavaScriptPythonGoRubyPHPJavaC#cURL
curl -X POST https://api.syntext.dev/v1/orgs/org_123/themes/brand/apply \
-H "Authorization: Bearer <session token>" \
-H "Content-Type: application/json" \
-d '{
"projects": [
{ "id": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e", "pin": null },
{ "id": "3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c", "pin": 3 },
{ "id": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d", "pin": 9 }
],
"target": "pr"
}'
Responseapplication/json
json
{
"data": {
"results": [
{ "projectId": "b4c5d6e7-f8a9-4b0c-9d1e-2f3a4b5c6d7e", "mode": "pr", "url": "https://github.com/acme/docs/pull/42" },
{ "projectId": "3f2a9c1e-8b4d-4e7a-9c21-5d6e7f8a9b0c", "mode": "hosted", "buildId": "bld_9k2m4n" },
{
"projectId": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"mode": "pr",
"error": { "code": "version_not_found", "message": "Theme \"brand\" has no version 9 (latest is 4)." }
}
]
}
}
Product
Resources
Company
© 2026 SyntextBuilt with Syntext