Is it possible create artificial endorphins?
Yes. They already exist. Endorphins are simply chemical messengers in your brain. The messengers work like a key in a lock. Creating a chemical that binds with receptors in your brain the same way the specific endorphon does will have the same result. This is also used to block messeges in your brain by “plugging” the receptor ports with another similarly shaped chemical.