Skip to main content

Create or update the outbound proxy configuration

PATCH 

/config/proxy

Merges the supplied fields into the stored proxy configuration and saves it.

Only protocol, host, port, verify_ssl, auth.username and auth.password are read; other fields are ignored. After the merge the resulting configuration must have a valid protocol, host and port. A leading http:// or https:// on host is stripped. Any update that includes protocol, host or port but omits auth (or sends an empty auth) removes the stored credentials. Resend auth.username and auth.password with every such change. A body containing only verify_ssl keeps them. If auth is present, both username and password must be non-empty. Credentials are stored encrypted. Accepts JSON or application/x-www-form-urlencoded bodies. Required role: admin or superadmin. port is any non-empty string or number (a number is cast to a string); it is not range-checked, so "0" and "abc" are accepted and Invalid Port is returned only when the merged port is empty or missing. verify_ssl alone fails with 422 Invalid Protocol when no proxy is stored yet. The response includes updatedAt, and createdAt and __v only on the call that creates the document. A flat form key such as auth.username=x (instead of auth[username]=x) returns 500 after the other fields are saved; use JSON or bracketed keys.

Request​

Responses​

The saved proxy configuration (password omitted).