Skip to main content
POST
Add Database to Stack
Creates a database inside the stack and connects it to the applications you list. The database counts against your plan like any other, with the same limits as Create Database. Needs the stacks:write scope when called with an API key. The same body works on POST https://api.vertracloud.app/v1/apps/{id}/stack/databases, which starts from an application. When that application is not in a stack, the call also creates the stack, named by stack_name.
string
required
The stack ID. On /v1/apps/{id}/stack/databases, the path has the application ID instead.
string
The workspace the stack belongs to, when you act on it as the workspace owner.
string
required
The database engine.
string
required
The database name.
integer
required
Memory in MB.
string
The engine version.
string | null
Optional description.
object[]
The applications to connect it to. Each item has app_id and an optional env_map (see Create Stack Connection).
string
Only for POST /v1/apps/{id}/stack/databases on an application that is not in a stack: the name of the stack that is created.

Response

object
201.

Errors

Last modified on October 28, 2026