Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(api): say archive and pin accept the string "false"

Yudhi Armyndharis791f3e7863c5
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index 600e12987..210149683 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -1067,10 +1067,10 @@ Archive or unarchive a chat.
**Request body** — `ArchiveChatDto`
-| Field | Type | Required | Constraints | Description |
-| --------- | ------- | -------- | ------------------------------------------------------------------------------------------- | --------------------------------------------- |
-| `chatId` | string | Yes | `@IsString`; `@IsNotEmpty`; `@Matches(/^[^\s@]+@[^\s@]+$/)` (localpart@host, no whitespace) | Engine-native JID, e.g. `[email protected]` |
-| `archive` | boolean | Yes | `@IsBoolean` (strict — the string `"false"` is rejected, not coerced to `true`) | `true` to archive, `false` to unarchive |
+| Field | Type | Required | Constraints | Description |
+| --------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
+| `chatId` | string | Yes | `@IsString`; `@IsNotEmpty`; `@Matches(/^[^\s@]+@[^\s@]+$/)` (localpart@host, no whitespace) | Engine-native JID, e.g. `[email protected]` |
+| `archive` | boolean | Yes | `@IsBoolean` (strict: the exact strings `"true"`/`"false"` map to booleans; any other string such as `"0"` or `"no"` is rejected, not coerced to `true`) | `true` to archive, `false` to unarchive |
```json
{ "chatId": "[email protected]", "archive": true }
@@ -1159,10 +1159,10 @@ Pin a chat to the top of the chat list, or unpin it. Chat-level — distinct fro
**Request body** — `PinChatDto`
-| Field | Type | Required | Constraints | Description |
-| -------- | ------- | -------- | ------------------------------------------------------------------------------------------- | --------------------------------------------- |
-| `chatId` | string | Yes | `@IsString`; `@IsNotEmpty`; `@Matches(/^[^\s@]+@[^\s@]+$/)` (localpart@host, no whitespace) | Engine-native JID, e.g. `[email protected]` |
-| `pin` | boolean | Yes | `@IsBoolean` (strict — the string `"false"` is rejected, not coerced to `true`) | `true` to pin, `false` to unpin |
+| Field | Type | Required | Constraints | Description |
+| -------- | ------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
+| `chatId` | string | Yes | `@IsString`; `@IsNotEmpty`; `@Matches(/^[^\s@]+@[^\s@]+$/)` (localpart@host, no whitespace) | Engine-native JID, e.g. `[email protected]` |
+| `pin` | boolean | Yes | `@IsBoolean` (strict: the exact strings `"true"`/`"false"` map to booleans; any other string such as `"0"` or `"no"` is rejected, not coerced to `true`) | `true` to pin, `false` to unpin |
```json
{ "chatId": "[email protected]", "pin": true }