update api to send attachment file