begin API