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
id:stringbodyRequired
The project ID.
pin:number | nullbodyRequired
null to follow the latest version ("@acme/brand"), or a version number to pin to ("@acme/brand@3").
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
projectId:string
The project ID.
mode:string
pr, commit or hosted.
url:string
The pull request or commit URL. Absent for hosted and on failure.
buildId:string
The build started by a commit or hosted save.
error:object
{ code, message } when this project wasn't changed.
Per-project error codes:
Code
When
not_found
No such project in this organization (including deleted projects)
version_not_found
pin is higher than the theme's latest version
admin_required
You're not an admin of this project
deploy_rights_required
commit, or a hosted save, without deploy rights on this project