Write to API