write api client