0
I tried below code to create organization using my github account getting error
mutation { createOrganization(input: { login: "besttestzzzz", admin: true }) { organization { id login } } }
{ "input": { "admin": [ "testgithubaccount" ],
"clientMutationId": "",
"login": "testgithubaccount"
} }
I got errors view the below image.
1 Answer
Reset to default
0
GitHub’s GraphQL API does not provide direct endpoints to create organizations. Organization creation is typically done through the GitHub web interface or using the REST API.
Here's how you can use rest API:
curl -X POST -H "Authorization: Bearer YOUR_ACCESS_TOKEN" -d '{
"login": "new-org",
"profile_name": "New Organization",
"admin": "your-username"
}' https://api.github.com/user/repos
Not the answer you're looking for? Browse other questions tagged
or ask your own question.
or ask your own question.
|