In Hanafi law the first sitting of a three- or four-rakah obligatory prayer is wajib, as is reciting the tashahhud there. Forgetful omission requires the prostrations of forgetfulness under their detailed conditions.
The final sitting has a higher legal rank: sitting for the duration of tashahhud is an obligatory pillar.