Custom unsubscribe url to own branded page

I implemented own branded page for users to manage email preferences, including the options to optout from emails completely.
I seen the {unsubscribe_text} in email notifications. But it assumes I will have to use opaque mautic url literal. Is it possible to use some more customizable option like using custom url with contact id, email template id, or some token my code can use to get email message/template id and contact id?

If you are using Mautic pref center, than you can just set thatup in your email as unsubscribe page. There is another token {unsubscribe_url} that only gives you the URL.

And yes, you can use custom tokens as well to create your own unsubscribe mechanism:

This is your Bible for tokens: