---
title: "Attach a managed database"
method: POST
path: "/client/apps/{id}/database"
tags: ["App data"]
---

# Attach a managed database

`POST /client/apps/{id}/database`

## Request

- Base URL: `https://api.roar-ai.com`
- URL: `https://api.roar-ai.com/client/apps/{id}/database`
- Auth: HTTP bearer

Provisions Postgres for the app and injects `DATABASE_URL` at its next deploy. Idempotent. Requires `apps:deploy`.

## Path parameters

- `id` string, uuid, required

## Response `200`

The database, provisioning or ready. (Response shape not yet modelled in this spec.)

- object

## Other responses

- `404`: No such app for you

---

[API](https://skmtc.dev/roar-ai/apis/roar-ai-api.md) · [All operations](https://skmtc.dev/roar-ai/apis/roar-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/roar-ai/apis/roar-ai-api/revisions/37e4d0d5a7fe?raw)
