Change 'visualization_settings' on question

I am trying to adjust the visualization_settings for an embedded question but I receive an error 'Unknown parameter :visualization_settings.'
The question I am wanting to change is a gauge and need to have dynamic 'gauge.segments'. I can't seem to find the right answer for this in the docs and I have been using the developer console to get the correct params.

 :params=>
  {:visualization_settings=>
    {:"table.pivot_column"=>"custom_id",
     :"table.cell_column"=>"sum",
     :"scalar.field"=>"sum",
     :"gauge.segments"=>
      [{:min=>250000, :max=>1000000, :color=>"#F9CF48", :label=>"Ok"}, 
{:min=>1000000, :max=>2000000, :color=>"#84BB4C", :label=>"Good"}],
     :"progress.goal"=>1000000,
     :column_settings=>{:"[\"name\",\"sum\"]"=>{:prefix=>"", :number_style=>"decimal"}}}},
 :exp=>1637366765}

Hi @ed.s
Use the browser developer Network-tab to see the requests, when saving a question, then you can see how it's supposed to look and then compare that to your code.

Hi @flamber, i hadn’t been using the request on the save so thank you for this.

Another related question though. Can I change the visualisation settings of an existing question or can it only be done with a new one?

@ed.s Everything you can do via the GUI in Metabase is basically just API calls, so yes.