The endostyle is an organ found in invertebrate chordate species of tunicates and lancelets, and in the larval stage of vertebrate lampreys. It assists in filter-feeding. It has evolved into the thyroid in vertebrate chordates.
Since the endostyle is found in all three chordate lineages, it is presumed to have arisen in the common ancestor of these taxa, along with a shift to internal feeding for extracting suspended food particles from the water. When feeding, food particles suspended in the water adhere to the mucus the endostyle produces. The filtered water is then expelled through the gill slits, while the food and mucus are swept into the esophagus by movements of the cilia that coat the endostyle.