Deploying a site via API using a Zip file leads to wrong team association

The site is deployed; but it’s not properly associated with my team’s account.

  • Build problems? Link or paste the FULL build log & build settings screenshot
    The build was performed through the https://api.netlify.com/api/v1/sites endpoint by POSTing a zip file using a Personal Access Token.
            const zipPath = `temp-build/${variant.stub}.zip`
            const archive = await DeployService.zipFiles(
                {zipPath, glob: `temp-build/${variant.stub}-final/**/*`}
            )

            let requestDetails = {
                duplex: "half",
                body: createReadStream(zipPath),
                method: 'POST',
                headers: {
                    'Content-Type': 'application/zip',
                    'Authorization': `Bearer ${process.env.NETLIFY_PAT_TOKEN}`
                }
            }

            const deploy = await fetch("https://api.netlify.com/api/v1/sites/", requestDetails);

I was unable to identify why the team that received the deployed site is our team with a postfix of -old appended.

For example: Let’s assume my team’s name is ‘alphabet-salad’.
1: I used my account to create a new Personal Access Token.
2: I deployed a site using the v1/sites endpoint
3: I received confirmation that deployment was successful
4: I logged onto netlify and navigated to projects
5: The site was not visible.
6: I updated filters to show “All Teams”
7: The site became visible; but the link to the team it was associated with points to https://app.netlify.com/teams/alphabet-salad-old instead of the normal team that displays of https://app.netlify.com/teams/alphabet-salad

Oh - and notably; I get a “Page not found - You might not have permissions to view this page” error when I try to administer the deployed page.

Did you specify an account ID when creating the site? If not, the site might have been created in the default team of the token’s owner.