v1
latestOpenAPI 3.1.12026-08-063445179.6 KBapps
Create app
Apps can reference layers for shared configuration, have app-specific environment variables, and a config that provides defaults for revisions.
post/v2/apps
Request body
Example request
{
"labels": {
"custom.customer_id": "cust_123",
"custom.environment": "production",
"custom.regions": [
"us-east",
"eu-west"
]
},
"env_vars": [
{
"key": "DATABASE_URL",
"value": "postgres://localhost/dev"
}
],
"config": {
"framework": "nextjs",
"install": "npm install",
"build": "npm run build"
}
}Response
OK
Example response
{
"id": "00000000-0000-0000-0000-000000000000",
"slug": "my-customer-app",
"labels": {
"custom.customer_id": "cust_123",
"custom.environment": "production"
},
"layers": [
{
"id": "lyr_abc123",
"slug": "shared-secrets"
}
],
"env_vars": [
{
"id": "00000000-0000-0000-0000-000000000000",
"key": "APP_NAME",
"value": "My Customer App",
"secret": false,
"contexts": "all"
}
],
"config": {
"framework": "nextjs",
"install": "npm install",
"build": "npm run build"
},
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}