The topic of the Indian ideal & idea of King is very interesting, to say the least. And fortunately for us, unlike other topics of Indian history where records are scant, we have plenty of material in the form of political treatise, religious epics, & literary works to form a basic idea of what ancient Indians thought about the status of kings in the society. So let us begin to see how the idea developed & what implications it had on the society. So to answer your question we would look directly at the ancient Indian sources to see what they think of the subject
Origins
Traditionally it is held that earlier humanity was without a ruler & society worked on the principles of MatasyaNyaya (law of the fish) where the strong would bully the weak. Tired of this anarchy people went to Brahma the creator God who appointed Manu as the first ruler among men. People agreed that they would give him 1/6 of all grain & 1/10 of other material earnings & in return he would establish laws & make sure that justice prevails.
This account of origins of monarchy is attested by various Indian political tretises such as Manusmriti, Arthashastra, Shukraneeti, & Vidurneeti. We would discuss it's implications later, but first we also need to see at another account detailing the origins of the word Raja which is the most common title for a royal in India.
In old times lived the king Prithu (who among other things, is credited with introducing agriculture to humanity) who established justice in all his domains. Thus being very pleasant to his subjects (the Sanskrit word used here is the root verb रंज (ranja) which means pleasing) people started calling him Raja. (Mahabharat - Shantiparva)
What the legends of Manu & Prithu as detailed in the ancient works reveal to us is the belief that a King had divine origins he was not divine himself. In Manu's case the kingship is granted to Manu because the people demand it & the rate of taxation is fixed after the agreement of the people. And the legend of Prithu informs the King that his job description is to please his subjects. This though appointed to his place by Divine favor he still needs the approval of the people. This approval, according to the thinkers, is gained by ensuring people's happiness which in the words of Kautilya's Artshashastra is gained by following Dharma & ensuring material prosperity to subjects (Sukhasya mulam Dharma; Dharmasya mulam Artha = Dharma is the source of happiness, Money is the source of Dharma)
The status of the King
As we have seen, though the king has divine origins, he is not divine. Manusmriti in this regard clarifies that the King is only metaphorically divine & the real divinity lies with Dharma (law). So a king in sacred as long he is just & follows the law. If he becomes wicked & ceases to follow the law, he is no longer sancrosanct & the people no longer need to obey him.
This symbolism is further stressed out in the Hindu ritual coronation ceremony as laid out in Samskar Vidhi where before the coronation the Royal priests & the elders tell the king that he has to rule over everyone & when the coronation is complete they have to tell him that Dharma will rule over him.
Even Kautilya's Arthashastra which is most ruthless in it's advice (earning Kautilya comparisons to Machiavelli) advises the King to be kind to his subjects because a wicked king is overthrown. Even in case of rebellions, the King should introspect & correct any faults that may have caused it.
In fact the status of king w.r.to Dharma could be assessed by the source of this Dharma which are listed in order of importance
Dharmashastra - the sacred texts
Charita - the examples set by great personlities of histories & myths
Vyavhara - the traditions & cuatoms handed down over generations
Rajashasana - the orders & edicts of the king & his predecessors
So the even in case of law, the word of the King has the least authority.
The Birthright & Rebellion
All of the ancient Indian thinkers agree that the King should've a noble heritage (royal bloodline is preferable). But then again, that is just one of the many requirements in a King. In fact Arthashastra & Shukraneeti both go on to argue that if those of royal bloodline are incapable or "wicked" the King should disinherit all of them & adopt somebody of good character to inherit the throne. (There are cases of a few women succeeding the throne, such as Rudramma Devi of the Kakatiya dynasty, despite the presence of male contenders). Thus even the birth-right isn't sacrosanct.
In cases, where an usurper lacked the required nobility, religious ceremonies such as the Hiranyagarbha were used to provide the necessary nobility to the King. Thus even a non-noble usurper, if successful, could gain nobility & secure his hold over the throne.
And this lead us to rebellion & coups in the state. A lack of a divine mandate or sanctity of birthright means that it is very easy to overthrow a king. The rebel just has to claim that the King is "wicked" & "incompetent" to justify his pretensions. He doesn't risks any divine wrath or religious scrutiny by doing so. In fact unlike other societies, rebels aren't scorned or shunned but in many cases celebrated. An example of this could be found in Sudraka's 5th century play Mrcchakatika where the central characters play an important role in overthrow of the evil king Palaka of Ujjaiyini
The Divine favor
Although the King was to rule with the will of people, divine favor was still sought to cement the status & hold over power. But this divine favour was to be earned & wasn't something that passed generation to generation.
So while the Rashtrakuta ruler Amoghavarsha claimed that his domain was free of famine due to the favour of Goddess Mahalaxmi this favor had came at a high price, as Amoghavrsha is said to have sacrificed one of his fingers to the deity.
Similarly Mihirbhoja of the Parmara dynasty "vanquished his enemies with blessings of Vishnu" but these blessings were provided because he was Adivarah or the foremost in devotion to Vishnu.
This also led to a situation where the Kings could deviate from the established practice & were free to switch between sects & religions multiple times during their lifetime. (The aforementioned Amoghavarsha started as a Hindu devotee of Mahalaxmi & switched to Jainism & still patronised Hinduism, Jainism & Buddhism equally.
tl:dr;
The King has divine origins but is not divine himself
The King is an autocrat ruling over everyone in his domain, but still bound by law & could be overthrown if he refuses to follow it
The King essentially rules by the will of his subjects. If they aren't happy his days are numbered
Birthright is a very necessary requirement to claim the crown but a lack of it wouldn't necessarily hinder somebody
The King needs divine favor but it is to be earned & he couldn't just claim it through descent or virtue of his status