Attachments with cases

Hi,

Can somebody please help to create a case with attachments using Sugar API?

I want to create a case having an attachment and then i want to retrieve it back on some case detail page.

I am creating cases using Curl.

Thank you