Api example to upload a file

Hi all
1- How I can get the design_id using API?
2- How I can import a file from my local machine to my account using API?

could you give me an example? I could not find an example in API documents.