This would require that you have a license to use the Photoshop API and some knowledge of how to make API calls...
Get API creds.
With the API creds you can then request a token.
Use the token to request an edit to a PS document that is stored on a public server or a SAS URL with the correct privs.
You can either use the Adobe Photoshop beta Modules or custom http API calls to do this. If you understand all of the above then I'll post more specific stuff to point you in the right direction.