Someone would have to gather that data. It's not like a password that can be detached from physical reality. Your date of birth is somewhat inherent to your identity.
Setting aside the feasibility of an amendment and whether an administration would follow it, even just the ability to say yea or nay to anyone accessing information is chilling.
The government is not saying yea or nay, they are just providing proof of age or identity (not necessarily both, whatever the vendor website asks for, and the person allows).
Suppose I want to start a business where I don’t want the liability of having to deal with all the laws about minors. Then I can use the government API to only allow people over whatever age.
That's the intent of course, but it's just as easy to refuse to verify age for certain endpoints or provide incorrect verification. I'm trying to think how an authoritarian government would use this.