Save Accel data (25hz) to fit file

Hi, as a newbie to this forum, I have a question regarding saving Accel data into a FIT file. Could anyone kindly provide the steps and API to use for this process? The data rate is 25 Hz. Thank you!