Skip to content

Free, Open Source, Self-Hosted WhatsApp API Gateway

docs(sdk-go): correct when session config and proxy updates apply

Yudhi Armyndharis4210bfda4836
diff --git a/sdk/go/sessions.go b/sdk/go/sessions.go
index dd9c614cf..253833837 100644
--- a/sdk/go/sessions.go
+++ b/sdk/go/sessions.go
@@ -23,8 +23,9 @@ func (s *SessionsService) GetConfig(ctx context.Context, sessionID string) (*Ses
return &out, nil
}
-// UpdateConfig changes a RUNNING session's configuration. It takes effect without re-linking the
-// account — all three fields were fixed at creation before this route existed.
+// UpdateConfig merges the given keys into a session's stored configuration, running or stopped,
+// with no restart or re-link. AutoRejectCalls applies immediately; MaxReconnectAttempts and
+// ReconnectBaseDelay apply on the next start.
func (s *SessionsService) UpdateConfig(ctx context.Context, sessionID string, body UpdateSessionConfigRequest) (*SessionConfig, error) {
var out SessionConfig
err := s.client.do(ctx, "PATCH", "/api/sessions/"+pathEscape(sessionID)+"/config", nil, body, &out)
@@ -45,7 +46,8 @@ func (s *SessionsService) GetProxy(ctx context.Context, sessionID string) (*Sess
}
// UpdateProxy changes per-session proxy settings. No restart is performed -- changes apply on the
-// next start. Send ProxyURL as JSON null to clear the proxy. Requires an unscoped ADMIN key.
+// next start. Set ClearProxyURL to send an explicit null and clear the proxy; a nil ProxyURL leaves
+// it unchanged. Requires an unscoped ADMIN key.
func (s *SessionsService) UpdateProxy(ctx context.Context, sessionID string, body UpdateSessionProxyRequest) (*SessionProxy, error) {
var out SessionProxy
err := s.client.do(ctx, "PATCH", "/api/sessions/"+pathEscape(sessionID)+"/proxy", nil, body, &out)