It is because of the uncontinued blank line and the single quotes around
$password
. The following works*:
curl "https://somewebsite.com" \
--request POST \
--header "Accept:application/json" \
--header "Content-Type:application/json" \
--data "{\"header1\":\"text1\",\"header2\":\"text2\",\"header3\":\"text3\"}" \
--user 'Administrator':"$password"
*my test did not use curl, but echo, just to check the generated command.