Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk-js): mark the media filename optional for documents

Yudhi Armyndharis116fdd38aa06
diff --git a/sdk/javascript/src/types.ts b/sdk/javascript/src/types.ts
index 4c99c06c8..cad439785 100644
--- a/sdk/javascript/src/types.ts
+++ b/sdk/javascript/src/types.ts
@@ -277,7 +277,10 @@ export interface SendMediaRequest {
/** Requires `mimetype`. */
base64?: string;
mimetype?: string;
- /** Required for documents; max 255 chars. */
+ /**
+ * Shown only on document sends; defaults to `file` when omitted (whatsapp-web.js first tries the URL basename).
+ * Max 255 chars.
+ */
filename?: string;
/** Max 1024 chars. */
caption?: string;