Sample - GitHub REST API
POST/orgs/{org}/actions/runner-groups

Create a self-hosted runner group for an organization

Creates a new self-hosted runner group for an organization.

OAuth tokens and personal access tokens (classic) need the admin:org scope to use this endpoint.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 8 body fields
orgstringrequired
The organization name. The name is not case sensitive.
namestringrequired
Name of the runner group.
visibilitystringoptional
Visibility of a runner group. You can select all repositories, select individual repositories, or limit access to private repositories.
Allowed:selectedallprivateDefault:all
selected_repository_idsarray<integer>optional
List of repository IDs that can access the runner group.
runnersarray<integer>optional
List of runner IDs to add to the runner group.
allows_public_repositoriesbooleanoptional
Whether the runner group can be used by `public` repositories.
Default:false
restricted_to_workflowsbooleanoptional
If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.
Default:false
selected_workflowsarray<string>optional
List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.
network_configuration_idstringoptional
The identifier of a hosted compute network configuration.

1 status code
201Response
idnumberrequired
namestringrequired
visibilitystringrequired
defaultbooleanrequired
selected_repositories_urlstringoptional
Link to the selected repositories resource for this runner group. Not present unless visibility was set to `selected`
runners_urlstringrequired
hosted_runners_urlstringoptional
network_configuration_idstringoptional
The identifier of a hosted compute network configuration.
inheritedbooleanrequired
inherited_allows_public_repositoriesbooleanoptional
allows_public_repositoriesbooleanrequired
workflow_restrictions_read_onlybooleanoptional
If `true`, the `restricted_to_workflows` and `selected_workflows` fields cannot be modified.
Default:false
restricted_to_workflowsbooleanoptional
If `true`, the runner group will be restricted to running only the workflows specified in the `selected_workflows` array.
Default:false
selected_workflowsarray<string>optional
List of workflows the runner group should be allowed to run. This setting will be ignored unless `restricted_to_workflows` is set to `true`.