Better curl request creation + fix api changes