Using API to Create A Repo On Behalf of Someone

We need to create a repository using an existing repo template on behalf of a user. Is the /user/repos POST a right API ? We don’t see a field related with an existing template repo in its request body.

Update:

I just find this API /admin/users/{username}/repos POST for creating a repository on behalf of a user. I, however, still don’t see how that uses an existing repo.

I believe this was answered in discord, but for others searching for this topic you would use the standard repo template endpoint (check swagger for exact path), then you’d use sudo header to be able to act as someone else.

Thanks. You are right. This question has been answered on Discord.