It looks like you curl request is using single quotes for the parameter.
In bash single quotes are used to preserve the literal value of each character inside the string. To fix this, change the single quotes to double quotes, and escape the double quotes inside the string, like in the example below.