Basic api in c