v1
latestOpenAPI 3.1.12026-08-063445179.6 KBlayers
Create layer
Create a new layer.
post/v2/layers
Request body
Example request
{
"env_vars": [
{
"key": "DATABASE_URL",
"value": "postgres://localhost/dev"
}
]
}Response
OK
Example response
{
"id": "lyr_abc123",
"slug": "shared-secrets",
"description": "Common API keys and secrets for all customer apps",
"layers": [
{
"id": "lyr_base123",
"slug": "base-config"
}
],
"env_vars": [
{
"id": "00000000-0000-0000-0000-000000000000",
"key": "DATABASE_URL",
"value": "postgres://host/db",
"secret": false,
"contexts": "all"
},
{
"id": "00000000-0000-0000-0000-000000000000",
"key": "API_SECRET",
"secret": true,
"contexts": "all"
}
],
"app_count": 42,
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:30:00Z"
}