How Can Doctor and patients send 1-1 messages each other?

How Can Doctor and patients send 1-1 messages each other ? which APi we need to use that to implement in 3rd party website ?