Look at Monarch API for HPO integration since HPO on it's own doesn't seem to have an API.
PanelApp API could also be used.
Aim is to return a list of genes known to be associated with a given phenotype term. This is probably an additional step since they can at least be provided manually by the gene list.