Possible to change twitch username with api?

Hello,
first post here.

Is it possible to access the new username change feature via the API to check if a username is available? I’d like to make a little portal where people can setup a email notification if their desired username is available.

Or do you know any other ways of doing that?

Is it possible to even change the username via the API?

Thanks,
Kieran.

https://passport.twitch.tv/usernames/<username>
Check for http code 204. It’s not part of the official API.

Ah okay, cool. Thanks.
Will usernames that got freed up cause the same effect? I’m not familiar how exactly the username deletion works.