Create app
Changed onCreate an app within a project. The app is created with default production and preview environments.
Set exactly one source. Use git to create a GitHub-sourced app and connect its repository. Use oci to create an app from a prebuilt OCI image.
The slug you provide is the stable, caller-defined handle used to reference this app. It must be unique within the project.
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:
- project.*.create_app (to create apps in any project)
- project.<project_id>.create_app (to create apps in a specific project)
Request
- Base URLhttps://api.unkey.com
- URLhttps://api.unkey.com/v2/apps.createApp
- AuthHTTP bearer
Request body
Example request
{
"project": "proj_1234abcd",
"name": "Payments API",
"slug": "proj_1234abcd",
"git": {
"repository": "unkeyed/unkey",
"defaultBranch": "main"
},
"oci": {
"image": "ghcr.io/acme/api:v1.2.3"
}
}Response
App created successfully. The response contains the app id used to reference it in subsequent operations.
Example response
{
"meta": {
"requestId": "req_123"
},
"data": {
"appId": "app_1234abcd"
}
}Changes
- info
added the new optional request property
- info
added
subschema #1subschema #2to the request bodyoneOflist - info
the request property
/became optional
- info
- info
added the new optional request property
- info