Here is the correct syntax:
curl -X POST \
-u "$USER_EMAIL:$ATLASSIAN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spaceId": "12345",
"title": "Hello World",
"status": "draft",
"body": {
"representation": "storage",
"value": "<p>Page created from cURL</p>"
}
}' \
"https://$ATLASSIAN_INSTANCE/wiki/api/v2/pages"
Just replace the "12345" with the space id you want to target (beware: you can't use $VARIABLE there, due to sigle quote). To learn more on how to find the other variables, read my blog: https://ducttapecode.com/blog/confluence-integration/article/