To upload via the command line, you need an API Token that has the Upload Symbols Files (or Upload Try Symbols Files) permission attached to it.
Upload Symbols Files
Upload Try Symbols Files
Use the official documentation for how to use curl or Python.
curl