Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(api): describe the built-in flags as the config save applies them

Yudhi Armyndharis2458431758e7
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index deeb85395..7bb1c943f 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -5698,12 +5698,12 @@ Merge-save infrastructure config to `data/.env.generated` (a `0600` secret file)
| `database.poolSize` | number | No | — | Default 10 |
| `database.sslEnabled` | boolean | No | — | Default false |
| `database.sslRejectUnauthorized` | boolean | No | — | Only written when `sslEnabled` is true; default true |
-| `redis.enabled` / `.builtIn` | boolean | No | — | `builtIn`+enabled forces `redis` container + profile |
+| `redis.enabled` / `.builtIn` | boolean | No | — | `builtIn` writes host `redis`; the `redis` profile follows only while something uses Redis (see below) |
| `redis.host` / `.port` | string | No | `port` is a string | Defaults `localhost`/`6379` |
| `redis.password` | string | No | secret | Empty keeps existing |
| `queue.enabled` | boolean | No | — | Writes `QUEUE_ENABLED` |
| `storage.type` | `'local' \| 's3'` | If none stored or pinned | enum | `local` drops stale S3 keys; `s3` drops `STORAGE_LOCAL_PATH`. Absent keeps the stored selection (else the pinned one); a pin of the other skips the section |
-| `storage.builtIn` | boolean | No | — | `true`+s3 uses bundled MinIO defaults + pushes `minio` profile |
+| `storage.builtIn` | boolean | No | — | `true`+s3 writes the bundled endpoint and bucket, keeps the stored keys the bundled MinIO uses (else `minioadmin`), pushes `minio` (see below) |
| `storage.localPath` | string | No | — | Default `./data/media` |
| `storage.s3Bucket` / `.s3Region` / `.s3Endpoint` | string | No | — | External S3 |
| `storage.s3AccessKey` / `.s3SecretKey` | string | No | secret | Empty keeps existing |
@@ -5712,6 +5712,8 @@ Merge-save infrastructure config to `data/.env.generated` (a `0600` secret file)
| `engine.sessionDataPath` | string | No | — | Default `./data/sessions` |
| `engine.browserArgs` | string | No | — | Saved as `PUPPETEER_ARGS`. Empty saves the default `--no-sandbox --disable-setuid-sandbox --disable-dev-shm-usage --disable-gpu`; a non-empty value replaces that list in full |
+Built-in flags: a section sent without `builtIn` stays in the stored mode. A stored `POSTGRES_BUILTIN`, `REDIS_BUILTIN` or `MINIO_BUILTIN` of `true` writes the bundled connection values again, and the fields sent apply only to an external service; send `builtIn: false` with them to switch it, as the dashboard does once a card beside a host the environment pins elsewhere is edited. A built-in Redis asks for the `redis` profile only while something the next boot runs uses Redis (`REDIS_ENABLED`, `QUEUE_ENABLED` or `CACHE_ENABLED`, pinned, sent or stored); a save where nothing uses it, in the file either, writes `REDIS_BUILTIN=false` whatever `builtIn` says and drops a `REDIS_HOST` that names the bundled container. A built-in save keeps the stored database password and S3 keys (`S3_ACCESS_KEY_ID`/`S3_SECRET_ACCESS_KEY`, else the legacy `S3_ACCESS_KEY`/`S3_SECRET_KEY`) when the flag was already `true` or the next boot's host already reaches the bundled container, and writes `openwa` or `minioadmin` otherwise. The bundled container counts in any spelling: its alias (`postgres`, `redis`, `minio`) or its container name (`openwa-postgres`, `openwa-redis`, `openwa-minio`), in any letter case, with or without a trailing dot, and for storage as the host of the endpoint URL.
+
```json
{
"database": {