Rework API communication