Returns a token that you can pass to the config script. The token expires after one hour. You must authenticate using an access token with the repo scope to use this endpoint.
curl--location--request POST 'https://api.github.com/repos///actions/runners/registration-token'
Response Response Example
{"expires_at":"2016-07-11T22:14:10.000Z","permissions":{"deployments":"write","issues":"read"},"repositories":[{"allow_auto_merge":false,"allow_forking":true,"allow_merge_commit":true,"allow_rebase_merge":true,"allow_squash_merge":true,"allow_update_branch":false,"anonymous_access_enabled":true,"archive_url":"http://api.github.com/repos/octocat/Hello-World/{archive_format}{/ref}","archived":false,"assignees_url":"http://api.github.com/repos/octocat/Hello-World/assignees{/user}","blobs_url":"http://api.github.com/repos/octocat/Hello-World/git/blobs{/sha}","branches_url":"http://api.github.com/repos/octocat/Hello-World/branches{/branch}","clone_url":"https://github.com/octocat/Hello-World.git","collaborators_url":"http://api.github.com/repos/octocat/Hello-World/collaborators{/collaborator}","comments_url":"http://api.github.com/repos/octocat/Hello-World/comments{/number}","commits_url":"http://api.github.com/repos/octocat/Hello-World/commits{/sha}","compare_url":"http://api.github.com/repos/octocat/Hello-World/compare/{base}...{head}","contents_url":"http://api.github.com/repos/octocat/Hello-World/contents/{+path}","contributors_url":"http://api.github.com/repos/octocat/Hello-World/contributors","created_at":"2011-01-26T19:01:12.000Z","default_branch":"master","delete_branch_on_merge":false,"deployments_url":"http://api.github.com/repos/octocat/Hello-World/deployments","description":"This your first repo!","disabled":true,"downloads_url":"http://api.github.com/repos/octocat/Hello-World/downloads","events_url":"http://api.github.com/repos/octocat/Hello-World/events","fork":true,"forks":0,"forks_count":9,"forks_url":"http://api.github.com/repos/octocat/Hello-World/forks","full_name":"octocat/Hello-World","git_commits_url":"http://api.github.com/repos/octocat/Hello-World/git/commits{/sha}","git_refs_url":"http://api.github.com/repos/octocat/Hello-World/git/refs{/sha}","git_tags_url":"http://api.github.com/repos/octocat/Hello-World/git/tags{/sha}","git_url":"git:github.com/octocat/Hello-World.git","has_discussions":true,"has_downloads":true,"has_issues":true,"has_pages":true,"has_projects":true,"has_wiki":true,"homepage":"https://github.com","hooks_url":"http://api.github.com/repos/octocat/Hello-World/hooks","html_url":"https://github.com/octocat/Hello-World","id":42,"is_template":true,"issue_comment_url":"http://api.github.com/repos/octocat/Hello-World/issues/comments{/number}","issue_events_url":"http://api.github.com/repos/octocat/Hello-World/issues/events{/number}","issues_url":"http://api.github.com/repos/octocat/Hello-World/issues{/number}","keys_url":"http://api.github.com/repos/octocat/Hello-World/keys{/key_id}","labels_url":"http://api.github.com/repos/octocat/Hello-World/labels{/name}","language":"string","languages_url":"http://api.github.com/repos/octocat/Hello-World/languages","license":{"html_url":"http://example.com","key":"mit","name":"MIT License","node_id":"MDc6TGljZW5zZW1pdA==","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"master_branch":"string","merge_commit_message":"PR_BODY","merge_commit_title":"PR_TITLE","merges_url":"http://api.github.com/repos/octocat/Hello-World/merges","milestones_url":"http://api.github.com/repos/octocat/Hello-World/milestones{/number}","mirror_url":"git:git.example.com/octocat/Hello-World","name":"Team Environment","network_count":0,"node_id":"MDEwOlJlcG9zaXRvcnkxMjk2MjY5","notifications_url":"http://api.github.com/repos/octocat/Hello-World/notifications{?since,all,participating}","open_issues":0,"open_issues_count":0,"organization":{"avatar_url":"https://github.com/images/error/octocat_happy.gif","email":"string","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers_url":"https://api.github.com/users/octocat/followers","following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"41d064eb2195891e12d0413f63227ea7","html_url":"https://github.com/octocat","id":1,"login":"octocat","name":"string","node_id":"MDQ6VXNlcjE=","organizations_url":"https://api.github.com/users/octocat/orgs","received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","site_admin":true,"starred_at":"\"2020-07-09T00:17:55Z\"","starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","type":"User","url":"https://api.github.com/users/octocat"},"owner":{"avatar_url":"https://github.com/images/error/octocat_happy.gif","email":"string","events_url":"https://api.github.com/users/octocat/events{/privacy}","followers_url":"https://api.github.com/users/octocat/followers","following_url":"https://api.github.com/users/octocat/following{/other_user}","gists_url":"https://api.github.com/users/octocat/gists{/gist_id}","gravatar_id":"41d064eb2195891e12d0413f63227ea7","html_url":"https://github.com/octocat","id":1,"login":"octocat","name":"string","node_id":"MDQ6VXNlcjE=","organizations_url":"https://api.github.com/users/octocat/orgs","received_events_url":"https://api.github.com/users/octocat/received_events","repos_url":"https://api.github.com/users/octocat/repos","site_admin":true,"starred_at":"\"2020-07-09T00:17:55Z\"","starred_url":"https://api.github.com/users/octocat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/octocat/subscriptions","type":"User","url":"https://api.github.com/users/octocat"},"permissions":{"admin":true,"maintain":true,"pull":true,"push":true,"triage":true},"private":false,"pulls_url":"http://api.github.com/repos/octocat/Hello-World/pulls{/number}","pushed_at":"2011-01-26T19:06:43.000Z","releases_url":"http://api.github.com/repos/octocat/Hello-World/releases{/id}","size":108,"squash_merge_commit_message":"PR_BODY","squash_merge_commit_title":"PR_TITLE","ssh_url":"git@github.com:octocat/Hello-World.git","stargazers_count":80,"stargazers_url":"http://api.github.com/repos/octocat/Hello-World/stargazers","starred_at":"\"2020-07-09T00:17:42Z\"","statuses_url":"http://api.github.com/repos/octocat/Hello-World/statuses/{sha}","subscribers_count":0,"subscribers_url":"http://api.github.com/repos/octocat/Hello-World/subscribers","subscription_url":"http://api.github.com/repos/octocat/Hello-World/subscription","svn_url":"https://svn.github.com/octocat/Hello-World","tags_url":"http://api.github.com/repos/octocat/Hello-World/tags","teams_url":"http://api.github.com/repos/octocat/Hello-World/teams","temp_clone_token":"string","template_repository":{"allow_auto_merge":true,"allow_merge_commit":true,"allow_rebase_merge":true,"allow_squash_merge":true,"allow_update_branch":true,"archive_url":"string","archived":true,"assignees_url":"string","blobs_url":"string","branches_url":"string","clone_url":"string","collaborators_url":"string","comments_url":"string","commits_url":"string","compare_url":"string","contents_url":"string","contributors_url":"string","created_at":"string","default_branch":"string","delete_branch_on_merge":true,"deployments_url":"string","description":"string","disabled":true,"downloads_url":"string","events_url":"string","fork":true,"forks_count":0,"forks_url":"string","full_name":"string","git_commits_url":"string","git_refs_url":"string","git_tags_url":"string","git_url":"string","has_downloads":true,"has_issues":true,"has_pages":true,"has_projects":true,"has_wiki":true,"homepage":"string","hooks_url":"string","html_url":"string","id":0,"is_template":true,"issue_comment_url":"string","issue_events_url":"string","issues_url":"string","keys_url":"string","labels_url":"string","language":"string","languages_url":"string","merge_commit_message":"PR_BODY","merge_commit_title":"PR_TITLE","merges_url":"string","milestones_url":"string","mirror_url":"string","name":"string","network_count":0,"node_id":"string","notifications_url":"string","open_issues_count":0,"owner":{"avatar_url":"string","events_url":"string","followers_url":"string","following_url":"string","gists_url":"string","gravatar_id":"string","html_url":"string","id":0,"login":"string","node_id":"string","organizations_url":"string","received_events_url":"string","repos_url":"string","site_admin":true,"starred_url":"string","subscriptions_url":"string","type":"string","url":"string"},"permissions":{"admin":true,"maintain":true,"pull":true,"push":true,"triage":true},"private":true,"pulls_url":"string","pushed_at":"string","releases_url":"string","size":0,"squash_merge_commit_message":"PR_BODY","squash_merge_commit_title":"PR_TITLE","ssh_url":"string","stargazers_count":0,"stargazers_url":"string","statuses_url":"string","subscribers_count":0,"subscribers_url":"string","subscription_url":"string","svn_url":"string","tags_url":"string","teams_url":"string","temp_clone_token":"string","topics":["string"],"trees_url":"string","updated_at":"string","url":"string","use_squash_pr_title_as_default":true,"visibility":"string","watchers_count":0},"topics":["string"],"trees_url":"http://api.github.com/repos/octocat/Hello-World/git/trees{/sha}","updated_at":"2011-01-26T19:14:43.000Z","url":"https://api.github.com/repos/octocat/Hello-World","use_squash_pr_title_as_default":false,"visibility":"public","watchers":0,"watchers_count":80,"web_commit_signoff_required":false}],"repository_selection":"all","single_file":"config.yaml","token":"v1.1f699f1069f60xxx"}
Request
Path Params
owner
string
required
The account owner of the repository. The name is not case sensitive.
repo
string
required
The name of the repository. The name is not case sensitive.
Responses
🟢201Response
application/json
Body
Authentication Token
expires_at
string<date-time>
required
The time this token expires
Example:
2016-07-11T22:14:10.000Z
permissions
object
optional
Example:
{"deployments":"write","issues":"read"}
repositories
array[object (Repository) {99}]
optional
The repositories this token has access to
allow_auto_merge
boolean
optional
Whether to allow Auto-merge to be used on pull requests.
Default:
false
Example:
false
allow_forking
boolean
optional
Whether to allow forking this repo
allow_merge_commit
boolean
optional
Whether to allow merge commits for pull requests.
Default:
true
Example:
true
allow_rebase_merge
boolean
optional
Whether to allow rebase merges for pull requests.
Default:
true
Example:
true
allow_squash_merge
boolean
optional
Whether to allow squash merges for pull requests.
Default:
true
Example:
true
allow_update_branch
boolean
optional
Whether or not a pull request head branch that is behind its base branch can always be updated even if it is not required to be up to date before merging.
Default:
false
Example:
false
anonymous_access_enabled
boolean
optional
Whether anonymous git access is enabled for this repository
Whether a squash merge commit can use the pull request title as default. **This property has been deprecated. Please use squash_merge_commit_title instead.
Default:
false
visibility
string
optional
The repository visibility: public, private, or internal.
Default:
public
watchers
integer
required
watchers_count
integer
required
Example:
80
web_commit_signoff_required
boolean
optional
Whether to require contributors to sign off on web-based commits
Default:
false
repository_selection
enum<string>
optional
Describe whether all repositories have been selected or there's a selection involved