How to connect robot to orchestrator using API calls

Hi All,
on weekend few robots are disconnecting from orchestrator.
so on monday morning few jobs are not running on those robots bcs those are disconnected.

so here i want to connect robot to orchestrator using uipath api calls. so that i can use that api call from other application to connect to robot.

can anyone help me on this requirement.