The officially supported method is via PowerShell and the Set-CsPhoneNumberAssignment. Which in turn calls a RESTful endpoint on the backend, similar to the way Graph API works. But for the time being, there is no official support for performing this operation via Graph.
If you don't care about the "supported" part, you can get the needed info to build your own solution in one of two ways: capture the network trace from the browser when performing the phone assignment via the Teams admin portal, or capture the network trace when executing the corresponding PowerShell cmdlet. Here are some notes I did on the latter back in the day: https://www.michev.info/blog/post/3870/teams-remote-powershell-updates-and-new-api-endpoints