How to migrate custom field property which is Text Field to Number Field without loosing data

Can we do this via the “update property” API? Will it cause any adverse effects if I try to update the fieldType to number directly? Or should I be creating a new field copy the data to the new field, delete the old field, and create the new field as number