Assign nameservers when creating new account

Hello,
Is it possible to create custom nameservers when creating an account
through xml api?

EDIT:
I found this function: setresellernameservers.
It looks like what I need, but it doesn't work. All I get is "Specified user is not a reseller." but I'm 100% sure that user is a reseller because I create it just before calling that function.