We are building a data integration platform to connect to Salesforce.
Would like to know if there is any documentation to create a connected app programmatically using APIs. I see lot of documentation for creating connected apps via UI but not through API.
You can create Connected Apps through the Metadata API, like any other Salesforce metadata.
The easiest way to do this is to build the Connected App in a Salesforce org and then extract it with a Metadata API client (SFDX, Workbench, CumulusCI, Ant...). Excise the Consumer Key from the metadata, and you'll then be able to deploy that Connected App cleanly into another org.
Note, though, that this is rarely necessary. Connected Apps are global metadata: you typically maintain your Connected App in a single org that you control, and it's then available everywhere. I've really only seen the need to deploy Connected Apps when a different one is needed in each subscriber org.