Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

fix(openapi): show session ids that can actually match in the key allow-list

Yudhi Armyndharis0d38c1e01238
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 433df62a9..981ff118e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
+- **An API key's session allow-list showed ids that can never match** — `allowedSessions` is compared by exact equality against the session id in the request path, but the published example was `['session-uuid-1', 'session-uuid-2']`, so a reader copying its shape would scope a key to nothing and see every request denied; the field now shows real UUIDs and states that names are not accepted, which the MCP tool schema has said all along.
+
- **Seven published examples showed values the API cannot produce** — the session id carried a `sess_` prefix that every session route's `ParseUUIDPipe` rejects before the handler runs, two row ids were UUIDs truncated to `4f1c9b2a-...`, the logout response example omitted `engineLoaded` although its own schema marks it required, the readiness probe keyed its details on `database` where the code writes `mainDatabase` and `dataDatabase`, the engine list advertised a `send-text` capability neither engine declares, and the Baileys-only product send documented the whatsapp-web.js `true_<jid>_<id>` id form that route never returns.
## [0.14.6] - 2026-08-08
diff --git a/openapi.json b/openapi.json
index fd52ceaac..e86fe5d4e 100644
--- a/openapi.json
+++ b/openapi.json
@@ -8882,10 +8882,10 @@
}
},
"allowedSessions": {
- "description": "Allowed session IDs this key can access",
+ "description": "Session **ids** this key may act on — the server-generated UUIDs, not session names. Matched by exact equality against the id in the request path, so a name never matches and would silently scope the key to nothing. Omit or leave empty to let the key reach every session.",
"example": [
- "session-uuid-1",
- "session-uuid-2"
+ "0a941dac-a965-45e7-b318-74ae8be134f0",
+ "8f3c2b1a-9d4e-4c7a-8b2f-1e6d5a4c3b2a"
],
"type": "array",
"items": {
diff --git a/src/modules/auth/dto/api-key.dto.ts b/src/modules/auth/dto/api-key.dto.ts
index c9f677590..ac9a30ed8 100644
--- a/src/modules/auth/dto/api-key.dto.ts
+++ b/src/modules/auth/dto/api-key.dto.ts
@@ -33,8 +33,11 @@ export class CreateApiKeyDto {
allowedIps?: string[];
@ApiPropertyOptional({
- description: 'Allowed session IDs this key can access',
- example: ['session-uuid-1', 'session-uuid-2'],
+ description:
+ 'Session **ids** this key may act on — the server-generated UUIDs, not session names. Matched by ' +
+ 'exact equality against the id in the request path, so a name never matches and would silently ' +
+ 'scope the key to nothing. Omit or leave empty to let the key reach every session.',
+ example: ['0a941dac-a965-45e7-b318-74ae8be134f0', '8f3c2b1a-9d4e-4c7a-8b2f-1e6d5a4c3b2a'],
})
@IsOptional()
@IsArray()