A 400 error is a badly formed request. As a first step, like the other comments you should remove white space around your actual request (notice how it starts with \n\n\n\n\n). Do that by including hyphens in your tags like:
{%- endfor -%}
Also, both of your id’s are missing the quotes around them. Try something like
"{{ personalizationId }}"