Solved:
Script:
response="$(curl -k -X POST https://discourse.org/posts.json
-H “Content-Type: multipart/form-data;”
-F api_key=“234234sdfsdf”
-F api_username=“hubot”
-F topic_id=“46605”
-F raw=“Wiki_test_”")"
post_id="$(echo "$response" | grep -oP '"id":\K.*(?=,"name":)')"
echo "post_id= "$post_id
curl -k -X PUT https://discourse.org/posts/$post_id/wiki \
-H "Content-Type:multipart/form-data;" \
-F api_key=$API_KEY \
-F api_username=$API_USERNAME \
-F wiki=true