Create users through API using explicit user ids

You can’t assign the ID.

There is an external ID route:

    get "#{root_path}/by-external/:external_id" => "users#show", constraints: { external_id: /[^\/]+/ }

If you enable site setting sso_overrides_username (I think that’s a thing), you don’t need to change the username with the API.