Auto Promote App
POST/apps/{appId}/promote
Deploys an app by pulling the latest changes from Git and promoting the latest version to the production environment.
Path Parameters
ID of the app to promote.
Error Responses
Invalid UUID, MULTI_ENVIRONMENT check failed, or the app version is still in DRAFT state.
Missing or invalid Authorization token.
Insufficient permissions to promote this app.
App not found.
currentEnvironmentId is stale — the version has already been promoted.
No higher-priority environment exists to promote to.
Request
curl -X POST "https://{your-domain}/api/ext/apps/{appId}/promote" -H "Authorization: Basic <access_token>" -H "Content-Type: application/json"Response — 200
{
"editorEnvironment": {
"id": "env-uuid-staging",
"organizationId": "45892c81-c1f0-48c6-8875-c2e4fca516f8",
"name": "staging",
"isDefault": false,
"priority": 2,
"enabled": true,
"createdAt": "2024-01-01T00:00:00.000Z",
"updatedAt": "2024-05-01T10:00:00.000Z"
},
"environments": [
{
"id": "env-uuid-dev",
"name": "development",
"priority": 1,
"enabled": true,
"appVersionsCount": 3
},
{
"id": "env-uuid-staging",
"name": "staging",
"priority": 2,
"enabled": true,
"appVersionsCount": 2
}
]
}