Setting site to client in API

Ive been making an signup page with the api but im having trouble assigning the newly created site to the client who signed up. By that i mean i set it up so everyone gets a subdomain with a hosting package.

what i want to know is how to define/set the site owner in the api so that in the ISPCONFIG panel it shows its owned by the client.