Terrain API where is?

I wish to create a C++ plugin to import terrain from file.
The terrain will be a heightmap and overlay in custom format which I will read in (fine no problem).
Can someone point me in the right direction how I create a terrain in C++ and do a setHeight() etc?
Which UE4 functions/libraries do I use?