From b79155a2be4846bd80885689318ebf41ff859a3f Mon Sep 17 00:00:00 2001 From: ysyneu Date: Sun, 20 Sep 2026 03:19:37 -0700 Subject: [PATCH] docs(api): drop dry_run from member notify, document html validation 400 dry_run made "does this call have a side effect" a boolean inside the request body, while the documented workflow builds one body and reuses it for both calls. The response echoed no mode, so the only discriminator was whether html came back non-empty -- and the generated SDK declares html without omitempty, so a real send also returns the key. The result was a call that could silently do nothing while looking exactly like a successful send. Remove dry_run from the request schema and html from the response schema in all four OpenAPI spec files (openapi.{en,zh}.json, platform.openapi.{en,zh}.json), and document the new mandatory server-side check: the raw html is inspected before sanitizing, and a construct whose removal would change what recipients see (style, svg, iframe, object, embed, form, input, button tags; an img with a missing or non-https src; a link outside http/https/mailto) now returns 400 / InvalidParameter instead of being silently stripped. Constructs whose removal never changes rendering (script, meta, link, base tags, on* handlers) are still sanitized silently. Also updates the Go SDK reference page, which documented the same removed field. --- api-reference/openapi.en.json | 35 +++++++++++++++----------- api-reference/openapi.zh.json | 35 +++++++++++++++----------- api-reference/platform.openapi.en.json | 35 +++++++++++++++----------- api-reference/platform.openapi.zh.json | 35 +++++++++++++++----------- en/developer/go-sdk.mdx | 2 +- zh/developer/go-sdk.mdx | 2 +- 6 files changed, 82 insertions(+), 62 deletions(-) diff --git a/api-reference/openapi.en.json b/api-reference/openapi.en.json index 50243ea7..9ea6dd53 100644 --- a/api-reference/openapi.en.json +++ b/api-reference/openapi.en.json @@ -29251,12 +29251,7 @@ "html": { "type": "string", "maxLength": 102400, - "description": "Email body as an HTML fragment (no ``/``/`` wrapper needed); recipients receive it as the whole email body. Required, up to 102,400 bytes of raw UTF-8 input (larger messages are clipped by common email clients), and must be non-empty after sanitization. Sanitized server-side: `