apps
Update app
Changed onUpdate an existing app, identified by its id.
The app name, slug, default branch, and delete protection setting can be changed. Omitted fields are left unchanged. Changing the slug affects the deployment domains generated for this app.
Important: The slug cannot collide with an existing app in the same project. A duplicate slug returns a 409 conflict.
Required Permissions
Your root key must have one of the following permissions:
- app.*.update_app (to update any app)
- app.<app_id>.update_app (to update a specific app)
post/v2/apps.updateApp
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/apps.updateApp
- AuthHTTP bearer
Request body
Example request
{
"project": "proj_1234abcd",
"app": "proj_1234abcd",
"name": "Payments API",
"slug": "proj_1234abcd",
"git": {
"repository": "unkeyed/unkey",
"defaultBranch": "main"
},
"oci": {
"image": "ghcr.io/acme/api:v1.2.3"
},
"deleteProtection": true
}Response
Successfully updated the app.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"id": "app_1234abcd",
"name": "Payments API",
"slug": "payments-api",
"sourceType": "oci",
"git": {
"repository": "unkeyed/unkey",
"defaultBranch": "main"
},
"oci": {
"image": "ghcr.io/acme/api:v1.2.3"
},
"currentDeploymentId": "d_1234abcd",
"createdAt": 1704067200000,
"updatedAt": 1704153600000
}
}Changes
- info
added the new optional request property
- info
- info
added the optional property
/to the response with the status - info
added the optional property
/to the response with the status
- info