New organization repo creation from template using API is possible or not?

I am trying to create an app for an organization where I am trying to do every git action from API. I am able to do most of the things but not find the endpoint to create a new organization repo from template using API. I tried this end point /org_name/repos/repo_name/generate but not working. Please confirm me whether it is possible or not. Your help is highly appreciated!

Does this work: https://docs.github.com/en/rest/reference/repos#create-a-repository-using-a-template

Hey, mickey First of all thanks a lot for your reply. I tried using this endpoint already but it is not creating a repo inside my organization. It works fine if I use it with my local user account. If you know any particular endpoint for organization please let me know.

Huh, interesting. I’ll have to play around with it and see what I can find.

So kind of you mickey. If you find any solution please do update here! Your help is highly appreciated!