Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(plugins): pin the install-url example URLs

Yudhi Armyndharisace7ce3ceea5
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.md
index 7d7dca37c..fe7f63621 100644
--- a/docs/06-api-specification.md
+++ b/docs/06-api-specification.md
@@ -5968,9 +5968,13 @@ Content pinning: append `#sha256=<64 hex>` (URL fragment — never sent to the s
| `url` | string | Yes | `@IsUrl({ protocols:['http','https'], require_protocol:true })` | Absolute URL of the package; plain http only with a `#sha256=` digest pin, which production also requires on https |
```json
-{ "url": "https://github.com/openwa-plugins/chat-flow/releases/download/v1.0.0/chat-flow.zip" }
+{
+ "url": "https://github.com/openwa-plugins/chat-flow/releases/download/v1.0.0/chat-flow.zip#sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
+}
```
+The digest shown is a placeholder: use the SHA-256 of the `.zip` (`sha256sum chat-flow.zip`).
+
**Response** `201` — the newly installed `PluginDto`.
**Errors:** `400` invalid URL / download, integrity check, or package invalid · `401` · `403` · `409` already installed
@@ -6142,7 +6146,9 @@ Update an installed plugin in place from a URL, preserving config + enabled stat
| `url` | string | Yes | `@IsUrl({ protocols:['http','https'], require_protocol:true })` | Absolute URL of the new `.zip` (SSRF-guarded download); http only with a `#sha256=` pin, which production also requires on https |
```json
-{ "url": "https://example.com/plugins/chat-flow-1.1.0.zip" }
+{
+ "url": "https://example.com/plugins/chat-flow-1.1.0.zip#sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
+}
```
**Response** `201` — the updated `PluginDto`.
diff --git a/docs/07-api-collection.md b/docs/07-api-collection.md
index 260f38b92..11b4a3fec 100644
--- a/docs/07-api-collection.md
+++ b/docs/07-api-collection.md
@@ -1562,13 +1562,14 @@ curl -X POST "$BASE/api/plugins/install" \
#### POST /api/plugins/install-url
-Install a plugin by downloading its .zip from a URL (SSRF-guarded).
+Install a plugin by downloading its .zip from a URL (SSRF-guarded). Under `NODE_ENV=production` the
+URL needs a `#sha256=` pin by default; the digest below is a placeholder for the SHA-256 of the `.zip`.
```bash
curl -X POST "$BASE/api/plugins/install-url" \
-H "X-API-Key: $API_KEY" \
-H "Content-Type: application/json" \
- -d '{ "url": "https://github.com/openwa-plugins/chat-flow/releases/download/v1.0.0/chat-flow.zip" }'
+ -d '{ "url": "https://github.com/openwa-plugins/chat-flow/releases/download/v1.0.0/chat-flow.zip#sha256=0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef" }'
```
#### POST /api/plugins/:id/enable