Hi @Michal,
Yes, that should be possible via the TopNavigationbar of the navigation endpoint. That endpoint is also used for the hub navigation on a site collection which has been promoted as a hub.
Try something like below.
Uri
_api/web/Navigation/TopNavigationbar
Body
{
"__metadata": { "type": "SP.NavigationNode" },
"Title": "Power Automate and REST API!",
"Url":"https://www.expiscornovus.com"
}

Example screenshot of the end result. Keep in mind that the hub navigation sometimes is cached (so, it might take a bit of time to show up. In that case hit the edit button or ctrl+f5 a couple of times).
