An endoscopy is a test to look inside your body. A long, thin tube with a small camera inside, called an endoscope, is passed into your body through a natural opening such as your mouth. Your GP may refer you for an endoscopy if you're having certain symptoms.