Build the component which requests other API's as a microservice. Use this as a base to build email services and SMS services that takes the details from main server and executes the job.
$ git clone https://github.com/sih-sosc/microservice-template.git
$ cd microservice-template
$ npm install
$ npm start
$ npm run dev
Add your microservice logic in the main route a.k.a indexroute ('/')
$ curl -X POST -H "AUTH_KEY: AuthorizationKey" http://localhost:3000