databases
POST /v1/databases
Validate a managed database, and say where to buy it.
Autenticazione
Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.
Questo endpoint non richiede alcun ID organizzazione. La tua chiave identifica già l'organizzazione a cui appartiene e la risposta è limitata ad essa.
Provalo
Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.
curl -X POST https://api.zinndigital.com/v1/databases \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "label": <string>, "size": <string> }'Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API
Dettagli
⛔ **This endpoint no longer creates a database — it always answers `422`** (`docs/497` §8). Until 2026-09-05 it created a real cluster for nothing: no order, no invoice, no subscription and no charge, so a customer could run a highly-available database that never appeared on any bill. A managed database is **bought**: `POST /v1/carts/{cartId}/lines` with `kind=managed_database` and a `database` block, then checkout. Fulfilment creates the instance in `provisioning` and starts the Temporal workflow that builds it. The request is still **validated first**, so a caller learns *why* it would be refused before it goes to the basket and pays: the account is not in good standing, the label is blank or already used in this organisation, the size is not on sale, the engine or version is not one we run, the size belongs to a different engine, or the organisation already holds the self-service maximum. Only when all of that passes does it answer with the `PURCHASE_REQUIRED` code that names the basket. Gated on `databases.manage` in addition to `databases.view`.
Corpo della richiesta
| Nome | Tipo | Obbligatorio | Che cos'è |
|---|---|---|---|
label | string | Sì | — |
size | string | Sì | A size code from `GET /v1/databases/catalogue`. |
engine | string<postgres, mysql> | No | Optional. Omitted uses PostgreSQL. ⛔ Must match the engine the `size` code belongs to — a MySQL request carrying a `db_pg_*` size is refused, because it would run one engine and… |
engine_version | string | No | Optional engine version — `"18"`, `"8.4"`. Omitted uses the newest we offer for the chosen engine. ⛔ A version too close to end of life is refused **by name** rather than silent… |
Errori che questo endpoint può restituire
401 · 403 · 422