Hi @Leon Pappadopoulos,
As far as I know
403 error usually caused by your permissions to the folder haven’t replicated correctly on the server.
Maybe you can try this
curl --ntlm --user user:password --upload-file myPDF.pdf https://my.sharepoint.com/site/path/myPDF.pdf -H "Content-type:application/pdf"
However, during my investigation, I found that it may not necessarily be supported:
https://sharepoint.stackexchange.com/questions/205271/use-curl-to-upload-files-to-sharepoint-online
I think Power shell might be a better choice:
Here is a link for your referece:
https://theitbros.com/powershell-upload-file-to-sharepoint/
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Best Regards
Cheng Feng