Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk-go): describe the POST limits of the retry policy

Yudhi Armyndharis41a6529bced6
diff --git a/sdk/README.md b/sdk/README.md
index 30b93a0ce..563b6105d 100644
--- a/sdk/README.md
+++ b/sdk/README.md
@@ -240,7 +240,9 @@ testing, retry, tracing, or metrics. See [`go/README.md`](go/README.md).
for `429`). The injectable transport (`fetch` / `transport` / `httpClient`) is
the extension point for retry or observability middleware. The Go client is
the exception: it ships an opt-in policy (`WithRetry(DefaultRetryPolicy())`)
- that handles `429`/`5xx`, honors `Retry-After`, and rewinds request bodies —
+ that retries idempotent requests on network errors and `429`/`5xx`, retries a
+ `POST` only on `429`/`503` (never after a network error), honors
+ `Retry-After`, and rewinds request bodies —
still off unless you ask for it.
- **Redirects are never followed.** A `3xx` surfaces to the caller rather than
being followed, so the API key is never re-sent to a redirect target.
diff --git a/sdk/go/README.md b/sdk/go/README.md
index a7ef276c0..a8b9fe10b 100644
--- a/sdk/go/README.md
+++ b/sdk/go/README.md
@@ -111,9 +111,13 @@ reached the owner node answers 502 or 504.
## Retries
-Off by default. Opt in with a policy; only network errors and retryable statuses
-(429/5xx) are retried, with exponential backoff and `Retry-After` support.
-Request bodies are safely rewound on each attempt.
+Off by default. Opt in with a policy. Idempotent requests (GET, HEAD, OPTIONS,
+PUT, DELETE) are retried on network errors and on the policy's statuses (default
+429/500/502/503/504). A POST, which covers every send endpoint, is never retried
+after a network error and is retried only on 429 or 503 (when the policy lists
+them): a 500/502/504 can arrive after the message was already sent, so replaying
+it could send it twice. Backoff is exponential, `Retry-After` is honored, and
+request bodies are safely rewound on each attempt.
```go
client, _ := openwa.New(baseURL, apiKey,