Endoscopy is a medical procedure that involves the use of an endoscope, which is a long, thin, flexible tube with a camera and light at the end, to examine the inside of the body. It is a minimally invasive procedure that can be used to diagnose and treat a variety of conditions.