The Thampis are the sons of the Maharajahs of Travancore and their morganatic wives belonging to Illathu Nair or other similar Kshatriya castes. They form a part of the Nair caste (even if the mother is a non-Nair, as in the case of the Kunju Thampies) and had no title of succession to the throne.
Origin
Since the Maharajahs of South Kerala (Travancore) also belong to the warrior race of the Nairs, they followed the matrilineal system (Marumakkathayam) of inheritance. Hence when a king died his sister's son would become the next Varma (Samantha Kshatriya) ruler and his own son born of his wife, usually of the Illathu Nair caste would be called Thampi with the title "Kannaku Chempakaraman" which was also one of the highest titles of nobility in Travancore.
All of the Maharajahs' female descendants were known by the style of Kochamma or Thankachi added to their name. The sons, as mentioned, were styled Thampis with the title of Kanakku Chempakaraman. Since the Marumakkathayam law of matrilineal inheritance existed in Travancore, the sons of these Thampi gentlemen would, however, not gain any distinguishing title.
Families from where Maharajas got married are known as "Ammaveedus". Arumana Ammaveedu, Vadasseri Ammaveedu, Nagercoil Ammaveedu, Thiruvattar Ammaveedu, etc. are some of the prominent families in Trivandrum from where the Maharajas of Travancore married. The Rajahs of Travancore traditionally took wives from Ammaveedus and such Royal consorts, known as Ammachis would get the additional title of Panapillai Amma. If at all another lady from outside the Ammaveedu's was to be married to the Rajah, she would be adopted to one of the Ammaveedus first and then wed to the King. This was the case in the marriage of Maharajah Swathi Thirunal, Maharajah Ayilyam Thirunal and Maharajah Moolam Thirunal.