How can I add dashboard.json file to Grafana.com dashboards?

My aim is to upload a dashboard to Grafana.com dashboard. I tried export the dashboard using API.
Can someone please give me a hint on whether I can use API instead of using Grafana.com UI. Another thing could you please tell me, How we use Grafana.com API key tokens.