Here is the correct syntax:
curl -X POST \
-H "Authorization: Bearer $BOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"channel": "CXXXXXXXX", "text": "Hello, world! <@UXXXXXXXX>"}' \
https://slack.com/api/chat.postMessage
Just replace the CXXXXXXXX with the channel id you want to target and the UXXXXXXXX with the user id you want to tag (optional). To learn more on how to find these values and generate a $BOT_TOKEN, read my blog: https://ducttapecode.com/blog/slack-integration/article/