Enterprise Administration
Download SpecEnterprise Administration
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
array[object]
object
type
string
id
int
name
string
active
boolean
events
array[string]
string
config
object (config)
url
string
content_type
string
insecure_ssl
string
secret
string
updated_at
string
created_at
string
url
string
ping_url
string
Link
string
name
string
required
Must be passed as "web".
config
object (config)
required
Key/value pairs to provide settings for this webhook.
url
string
required
The URL to which the payloads will be delivered.
content_type
string
The media type used to serialize the payloads. Supported values include json
and form
. The default is form
.
secret
string
If provided, the secret
will be used as the key
to generate the HMAC hex digest value in the X-Hub-Signature
header.
insecure_ssl
string
Determines whether the SSL certificate of the host for url
will be verified when delivering payloads. Supported values include 0
(verification is performed) and 1
(verification is not performed). The default is 0
. We strongly recommend not setting this to 1
as you are subject to man-in-the-middle and other attacks.
events
array[string]
The events that trigger this webhook. A global webhook can be triggered by user
and organization
events. Default: user
and organization
.
string
active
boolean
Determines if notifications are sent when the webhook is triggered. Set to true
to send notifications.
- Default
- true
Request
Response
Response
type
string
id
int
name
string
active
boolean
events
array[string]
string
config
object (config)
url
string
content_type
string
insecure_ssl
string
secret
string
updated_at
string
created_at
string
url
string
ping_url
string
hook_id
int
required
The unique identifier of the hook.
Response
Response
type
string
id
int
name
string
active
boolean
events
array[string]
string
config
object (config)
url
string
content_type
string
insecure_ssl
string
secret
string
updated_at
string
created_at
string
url
string
ping_url
string
hook_id
int
required
The unique identifier of the hook.
Response
Response
Empty response
No schema
Update a global webhook
Parameters that are not provided will be overwritten with the default value or removed if no default exists.
hook_id
int
required
The unique identifier of the hook.
config
object (config)
Key/value pairs to provide settings for this webhook.
url
string
required
The URL to which the payloads will be delivered.
content_type
string
The media type used to serialize the payloads. Supported values include json
and form
. The default is form
.
secret
string
If provided, the secret
will be used as the key
to generate the HMAC hex digest value in the X-Hub-Signature
header.
insecure_ssl
string
Determines whether the SSL certificate of the host for url
will be verified when delivering payloads. Supported values include 0
(verification is performed) and 1
(verification is not performed). The default is 0
. We strongly recommend not setting this to 1
as you are subject to man-in-the-middle and other attacks.
events
array[string]
The events that trigger this webhook. A global webhook can be triggered by user
and organization
events. Default: user
and organization
.
string
active
boolean
Determines if notifications are sent when the webhook is triggered. Set to true
to send notifications.
- Default
- true
Request
Response
Response
type
string
id
int
name
string
active
boolean
events
array[string]
string
config
object (config)
url
string
content_type
string
insecure_ssl
string
updated_at
string
created_at
string
url
string
ping_url
string
Ping a global webhook
This will trigger a ping event to be sent to the webhook.
hook_id
int
required
The unique identifier of the hook.
Response
Response
Empty response
No schema
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
sort
string
- Default
- "created"
- Enum
-
- created
- updated
- accessed
since
string
Only show public keys accessed after the given time.
Response
Response
array[object]
object
id
int
required
key
string
required
user_id
int or null
required
repository_id
int or null
required
url
string
required
title
string
required
read_only
boolean
required
verified
boolean
required
created_at
string
date-time
required
added_by
string or null
last_used
string or null
date-time
required
Link
string
key_ids
string
required
The unique identifier of the key.
Response
Response
Empty response
No schema
Update LDAP mapping for a team
Updates the distinguished name (DN) of the LDAP entry to map to a team. LDAP synchronization must be enabled to map LDAP entries to a team. Use the Create a team endpoint to create a team with LDAP mapping.
team_id
int
required
The unique identifier of the team.
ldap_dn
string
required
The distinguished name (DN) of the LDAP entry to map to a team.
Request
Response
Response
ldap_dn
string
id
int
node_id
string
url
string
html_url
string
name
string
slug
string
description
string or null
privacy
string
permission
string
members_url
string
repositories_url
string
parent
or null
Sync LDAP mapping for a team
Note that this API call does not automatically initiate an LDAP sync. Rather, if a 201
is returned, the sync job is queued successfully, and is performed when the instance is ready.
team_id
int
required
The unique identifier of the team.
Response
Response
status
string
username
string
required
The handle for the GitHub user account.
ldap_dn
string
required
The distinguished name (DN) of the LDAP entry to map to a team.
Request
Response
Response
ldap_dn
string
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
name
string or null
required
- Example
- "monalisa octocat"
company
string or null
required
- Example
- "GitHub"
blog
string or null
required
- Example
- "https://github.com/blog"
location
string or null
required
- Example
- "San Francisco"
string or null
required
- Example
- "octocat@github.com"
hireable
boolean or null
required
bio
string or null
required
- Example
- "There once was..."
twitter_username
string or null
- Example
- "monalisa"
public_repos
int
required
- Example
- 2
public_gists
int
required
- Example
- 1
followers
int
required
- Example
- 20
following
int
required
- Example
- 0
created_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
updated_at
string
date-time
required
- Example
- "2008-01-14T04:33:35Z"
private_gists
int
required
- Example
- 81
total_private_repos
int
required
- Example
- 100
owned_private_repos
int
required
- Example
- 100
disk_usage
int
required
- Example
- 10000
collaborators
int
required
- Example
- 8
two_factor_authentication
boolean
required
- Example
- true
plan
object (plan)
collaborators
int
required
name
string
required
space
int
required
private_repos
int
required
suspended_at
string or null
date-time
business_plus
boolean
Sync LDAP mapping for a user
Note that this API call does not automatically initiate an LDAP sync. Rather, if a 201
is returned, the sync job is queued successfully, and is performed when the instance is ready.
username
string
required
The handle for the GitHub user account.
Response
Response
status
string
login
string
required
The organization's username.
admin
string
required
The login of the user who will manage this organization.
profile_name
string
The organization's display name.
Request
Response
Response
login
string
required
- Example
- "github"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDEyOk9yZ2FuaXphdGlvbjE="
url
string
uri
required
- Example
- "https://api.github.com/orgs/github"
repos_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/repos"
events_url
string
uri
required
- Example
- "https://api.github.com/orgs/github/events"
hooks_url
string
required
- Example
- "https://api.github.com/orgs/github/hooks"
issues_url
string
required
- Example
- "https://api.github.com/orgs/github/issues"
members_url
string
required
- Example
- "https://api.github.com/orgs/github/members{/member}"
public_members_url
string
required
- Example
- "https://api.github.com/orgs/github/public_members{/member}"
avatar_url
string
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
description
string or null
required
- Example
- "A great organization"
org
string
required
The organization name. The name is not case sensitive.
login
string
required
The organization's new name.
Request
Response
Response
message
string
url
string
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
sort
string
- Default
- "created"
- Enum
-
- created
- updated
- name
Response
Response
array[object]
object
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
name
string
required
The new pre-receive environment's name.
image_url
string
required
URL from which to download a tarball of this environment.
Request
Response
Response
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
pre_receive_environment_id
int
required
The unique identifier of the pre-receive environment.
Response
Response
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
Delete a pre-receive environment
If you attempt to delete an environment that cannot be deleted, you will receive a 422 Unprocessable Entity
response.
The possible error messages are:
- Cannot modify or delete the default environment
- Cannot delete environment that has hooks
- Cannot delete environment when download is in progress
pre_receive_environment_id
int
required
The unique identifier of the pre-receive environment.
Response
Response
Empty response
Client Errors
No schema
message
string
errors
array[object]
object
resource
string
code
string
message
string
Update a pre-receive environment
You cannot modify the default environment. If you attempt to modify the default environment, you will receive a 422 Unprocessable Entity
response.
pre_receive_environment_id
int
required
The unique identifier of the pre-receive environment.
name
string
This pre-receive environment's new name.
image_url
string
URL from which to download a tarball of this environment.
Request
Response
Response
Client Errors
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
message
string
errors
array[object]
object
resource
string
code
string
message
string
Start a pre-receive environment download
Triggers a new download of the environment tarball from the environment's image_url
. When the download is finished, the newly downloaded tarball will overwrite the existing environment.
If a download cannot be triggered, you will receive a 422 Unprocessable Entity
response.
The possible error messages are:
- Cannot modify or delete the default environment
- Can not start a new download when a download is in progress
pre_receive_environment_id
int
required
The unique identifier of the pre-receive environment.
Response
Response
Client Errors
url
string
state
string
downloaded_at
string or null
message
string or null
message
string
errors
array[object]
object
resource
string
code
string
message
string
Get the download status for a pre-receive environment
In addition to seeing the download status at the "Get a pre-receive environment" endpoint, there is also this separate endpoint for just the download status.
pre_receive_environment_id
int
required
The unique identifier of the pre-receive environment.
Response
Response
url
string
state
string
downloaded_at
string or null
message
string or null
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
direction
string
The direction to sort the results by.
- Default
- "desc"
- Enum
-
- asc
- desc
sort
string
The property to sort the results by.
- Default
- "created"
- Enum
-
- created
- updated
- name
Response
Response
array[object]
object
id
int
name
string
enforcement
string
script
string
script_repository
object (script_repository)
id
int
full_name
string
url
string
html_url
string
environment
object (environment)
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
allow_downstream_configuration
boolean
name
string
required
The name of the hook.
script
string
required
The script that the hook runs.
script_repository
object (script_repository)
required
The GitHub repository where the script is kept.
environment
object (environment)
required
The pre-receive environment where the script is executed.
enforcement
string
The state of enforcement for this hook. default: disabled
allow_downstream_configuration
boolean
Whether enforcement can be overridden at the org or repo level. default: false
Request
Response
Response
id
int
name
string
enforcement
string
script
string
script_repository
object (script_repository)
id
int
full_name
string
url
string
html_url
string
environment
object (environment)
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
allow_downstream_configuration
boolean
pre_receive_hook_id
int
required
The unique identifier of the pre-receive hook.
Response
Response
id
int
name
string
enforcement
string
script
string
script_repository
object (script_repository)
id
int
full_name
string
url
string
html_url
string
environment
object (environment)
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
allow_downstream_configuration
boolean
pre_receive_hook_id
int
required
The unique identifier of the pre-receive hook.
Response
Response
Empty response
No schema
pre_receive_hook_id
int
required
The unique identifier of the pre-receive hook.
name
string
The name of the hook.
script
string
The script that the hook runs.
script_repository
object (script_repository)
The GitHub repository where the script is kept.
environment
object (environment)
The pre-receive environment where the script is executed.
enforcement
string
The state of enforcement for this hook.
allow_downstream_configuration
boolean
Whether enforcement can be overridden at the org or repo level.
Request
Response
Response
id
int
name
string
enforcement
string
script
string
script_repository
object (script_repository)
id
int
full_name
string
url
string
html_url
string
environment
object (environment)
id
int
name
string
image_url
string
url
string
html_url
string
default_environment
boolean
created_at
string
hooks_count
int
download
object (download)
url
string
state
string
downloaded_at
string or null
message
string or null
allow_downstream_configuration
boolean
List personal access tokens
Lists personal access tokens for all users, including admin users.
per_page
int
The number of results per page (max 100).
- Default
- 30
page
int
Page number of the results to fetch.
- Default
- 1
Response
Response
array[object (Authorization)]
Authorization
object (Authorization)
The authorization for an OAuth app, GitHub App, or a Personal Access Token.
id
int
required
url
string
uri
required
scopes
array[string] or null
required
A list of scopes that this authorization is in.
string
token
string
required
token_last_eight
string or null
required
hashed_token
string or null
required
app
object (app)
required
client_id
string
required
name
string
required
url
string
uri
required
note
string or null
required
note_url
string or null
uri
required
updated_at
string
date-time
required
created_at
string
date-time
required
fingerprint
string or null
required
user
object (user) or null
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
installation
object (installation) or null
permissions
object (permissions)
required
The permissions granted to the user-to-server access token.
- Example
- { "contents": "read", "issues": "read", "deployments": "write", "single_file": "read" }
actions
string
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
- Enum
-
- read
- write
administration
string
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
- Enum
-
- read
- write
checks
string
The level of permission to grant the access token for checks on code.
- Enum
-
- read
- write
contents
string
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
- Enum
-
- read
- write
deployments
string
The level of permission to grant the access token for deployments and deployment statuses.
- Enum
-
- read
- write
environments
string
The level of permission to grant the access token for managing repository environments.
- Enum
-
- read
- write
issues
string
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
- Enum
-
- read
- write
metadata
string
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
- Enum
-
- read
- write
packages
string
The level of permission to grant the access token for packages published to GitHub Packages.
- Enum
-
- read
- write
pages
string
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
- Enum
-
- read
- write
pull_requests
string
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
- Enum
-
- read
- write
repository_hooks
string
The level of permission to grant the access token to manage the post-receive hooks for a repository.
- Enum
-
- read
- write
repository_projects
string
The level of permission to grant the access token to manage repository projects, columns, and cards.
- Enum
-
- read
- write
- admin
secret_scanning_alerts
string
The level of permission to grant the access token to view and manage secret scanning alerts.
- Enum
-
- read
- write
secrets
string
The level of permission to grant the access token to manage repository secrets.
- Enum
-
- read
- write
security_events
string
The level of permission to grant the access token to view and manage security events like code scanning alerts.
- Enum
-
- read
- write
single_file
string
The level of permission to grant the access token to manage just a single file.
- Enum
-
- read
- write
statuses
string
The level of permission to grant the access token for commit statuses.
- Enum
-
- read
- write
vulnerability_alerts
string
The level of permission to grant the access token to manage Dependabot alerts.
- Enum
-
- read
- write
workflows
string
The level of permission to grant the access token to update GitHub Actions workflow files.
- Enum
-
- write
members
string
The level of permission to grant the access token for organization teams and members.
- Enum
-
- read
- write
organization_administration
string
The level of permission to grant the access token to manage access to an organization.
- Enum
-
- read
- write
organization_custom_roles
string
The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
- Enum
-
- read
- write
organization_announcement_banners
string
The level of permission to grant the access token to view and manage announcement banners for an organization.
- Enum
-
- read
- write
organization_hooks
string
The level of permission to grant the access token to manage the post-receive hooks for an organization.
- Enum
-
- read
- write
organization_personal_access_tokens
string
The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.
- Enum
-
- read
- write
organization_personal_access_token_requests
string
The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.
- Enum
-
- read
- write
organization_plan
string
The level of permission to grant the access token for viewing an organization's plan.
- Enum
-
- read
organization_projects
string
The level of permission to grant the access token to manage organization projects and projects beta (where available).
- Enum
-
- read
- write
- admin
organization_packages
string
The level of permission to grant the access token for organization packages published to GitHub Packages.
- Enum
-
- read
- write
organization_secrets
string
The level of permission to grant the access token to manage organization secrets.
- Enum
-
- read
- write
organization_self_hosted_runners
string
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
- Enum
-
- read
- write
organization_user_blocking
string
The level of permission to grant the access token to view and manage users blocked by the organization.
- Enum
-
- read
- write
team_discussions
string
The level of permission to grant the access token to manage team discussions and related comments.
- Enum
-
- read
- write
repository_selection
string
required
Describe whether all repositories have been selected or there's a selection involved
- Enum
-
- all
- selected
single_file_name
string or null
required
- Example
- "config.yaml"
has_multiple_single_files
boolean
- Example
- true
single_file_paths
array[string]
- Example
- [ "config.yml", ".github/issue_TEMPLATE.md" ]
string
repositories_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
account
object (account)
required
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
expires_at
string or null
date-time
required
Link
string
Delete a personal access token
Deletes a personal access token. Returns a 403 - Forbidden
status when a personal access token is in use. For example, if you access this endpoint with the same personal access token that you are trying to delete, you will receive this error.
token_id
int
required
The unique identifier of the token.
Response
Response
Empty response
No schema
Create a user
If an external authentication mechanism is used, the login name should match the login name in the external system. If you are using LDAP authentication, you should also update the LDAP mapping for the user.
The login name will be normalized to only contain alphanumeric characters or single hyphens. For example, if you send "octo_cat"
as the login, a user named "octo-cat"
will be created.
If the login name or email address is already associated with an account, the server will return a 422
response.
login
string
required
The user's username.
string
Required for built-in authentication. The user's email address. This parameter can be omitted when using CAS, LDAP, or SAML. For more information, see "About authentication for your enterprise."
suspended
boolean
Whether to set the user as suspended when the user is created.
- Default
- false
Request
Response
Response
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
Delete a user
Deleting a user will delete all their repositories, gists, applications, and personal settings. Suspending a user is often a better option.
You can delete any user account except your own.
username
string
required
The handle for the GitHub user account.
Response
Response
Empty response
No schema
username
string
required
The handle for the GitHub user account.
login
string
required
The user's new username.
Request
Response
Response
message
string
url
string
username
string
required
The handle for the GitHub user account.
scopes
array[string]
required
A list of scopes.
string
Request
Response
Response when creating a new impersonation OAuth token
Response when getting an existing impersonation OAuth token
id
int
required
url
string
uri
required
scopes
array[string] or null
required
A list of scopes that this authorization is in.
string
token
string
required
token_last_eight
string or null
required
hashed_token
string or null
required
app
object (app)
required
client_id
string
required
name
string
required
url
string
uri
required
note
string or null
required
note_url
string or null
uri
required
updated_at
string
date-time
required
created_at
string
date-time
required
fingerprint
string or null
required
user
object (user) or null
A GitHub user.
name
string or null
string or null
login
string
required
- Example
- "octocat"
id
int
required
- Example
- 1
node_id
string
required
- Example
- "MDQ6VXNlcjE="
avatar_url
string
uri
required
- Example
- "https://github.com/images/error/octocat_happy.gif"
gravatar_id
string or null
required
- Example
- "41d064eb2195891e12d0413f63227ea7"
url
string
uri
required
- Example
- "https://api.github.com/users/octocat"
html_url
string
uri
required
- Example
- "https://github.com/octocat"
followers_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/followers"
following_url
string
required
- Example
- "https://api.github.com/users/octocat/following{/other_user}"
gists_url
string
required
- Example
- "https://api.github.com/users/octocat/gists{/gist_id}"
starred_url
string
required
- Example
- "https://api.github.com/users/octocat/starred{/owner}{/repo}"
subscriptions_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/subscriptions"
organizations_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/orgs"
repos_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
events_url
string
required
- Example
- "https://api.github.com/users/octocat/events{/privacy}"
received_events_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/received_events"
type
string
required
- Example
- "User"
site_admin
boolean
required
starred_at
string
- Example
- "\"2020-07-09T00:17:55Z\""
installation
object (installation) or null
permissions
object (permissions)
required
The permissions granted to the user-to-server access token.
- Example
- { "contents": "read", "issues": "read", "deployments": "write", "single_file": "read" }
actions
string
The level of permission to grant the access token for GitHub Actions workflows, workflow runs, and artifacts.
- Enum
-
- read
- write
administration
string
The level of permission to grant the access token for repository creation, deletion, settings, teams, and collaborators creation.
- Enum
-
- read
- write
checks
string
The level of permission to grant the access token for checks on code.
- Enum
-
- read
- write
contents
string
The level of permission to grant the access token for repository contents, commits, branches, downloads, releases, and merges.
- Enum
-
- read
- write
deployments
string
The level of permission to grant the access token for deployments and deployment statuses.
- Enum
-
- read
- write
environments
string
The level of permission to grant the access token for managing repository environments.
- Enum
-
- read
- write
issues
string
The level of permission to grant the access token for issues and related comments, assignees, labels, and milestones.
- Enum
-
- read
- write
metadata
string
The level of permission to grant the access token to search repositories, list collaborators, and access repository metadata.
- Enum
-
- read
- write
packages
string
The level of permission to grant the access token for packages published to GitHub Packages.
- Enum
-
- read
- write
pages
string
The level of permission to grant the access token to retrieve Pages statuses, configuration, and builds, as well as create new builds.
- Enum
-
- read
- write
pull_requests
string
The level of permission to grant the access token for pull requests and related comments, assignees, labels, milestones, and merges.
- Enum
-
- read
- write
repository_hooks
string
The level of permission to grant the access token to manage the post-receive hooks for a repository.
- Enum
-
- read
- write
repository_projects
string
The level of permission to grant the access token to manage repository projects, columns, and cards.
- Enum
-
- read
- write
- admin
secret_scanning_alerts
string
The level of permission to grant the access token to view and manage secret scanning alerts.
- Enum
-
- read
- write
secrets
string
The level of permission to grant the access token to manage repository secrets.
- Enum
-
- read
- write
security_events
string
The level of permission to grant the access token to view and manage security events like code scanning alerts.
- Enum
-
- read
- write
single_file
string
The level of permission to grant the access token to manage just a single file.
- Enum
-
- read
- write
statuses
string
The level of permission to grant the access token for commit statuses.
- Enum
-
- read
- write
vulnerability_alerts
string
The level of permission to grant the access token to manage Dependabot alerts.
- Enum
-
- read
- write
workflows
string
The level of permission to grant the access token to update GitHub Actions workflow files.
- Enum
-
- write
members
string
The level of permission to grant the access token for organization teams and members.
- Enum
-
- read
- write
organization_administration
string
The level of permission to grant the access token to manage access to an organization.
- Enum
-
- read
- write
organization_custom_roles
string
The level of permission to grant the access token for custom repository roles management. This property is in beta and is subject to change.
- Enum
-
- read
- write
organization_announcement_banners
string
The level of permission to grant the access token to view and manage announcement banners for an organization.
- Enum
-
- read
- write
organization_hooks
string
The level of permission to grant the access token to manage the post-receive hooks for an organization.
- Enum
-
- read
- write
organization_personal_access_tokens
string
The level of permission to grant the access token for viewing and managing fine-grained personal access token requests to an organization.
- Enum
-
- read
- write
organization_personal_access_token_requests
string
The level of permission to grant the access token for viewing and managing fine-grained personal access tokens that have been approved by an organization.
- Enum
-
- read
- write
organization_plan
string
The level of permission to grant the access token for viewing an organization's plan.
- Enum
-
- read
organization_projects
string
The level of permission to grant the access token to manage organization projects and projects beta (where available).
- Enum
-
- read
- write
- admin
organization_packages
string
The level of permission to grant the access token for organization packages published to GitHub Packages.
- Enum
-
- read
- write
organization_secrets
string
The level of permission to grant the access token to manage organization secrets.
- Enum
-
- read
- write
organization_self_hosted_runners
string
The level of permission to grant the access token to view and manage GitHub Actions self-hosted runners available to an organization.
- Enum
-
- read
- write
organization_user_blocking
string
The level of permission to grant the access token to view and manage users blocked by the organization.
- Enum
-
- read
- write
team_discussions
string
The level of permission to grant the access token to manage team discussions and related comments.
- Enum
-
- read
- write
repository_selection
string
required
Describe whether all repositories have been selected or there's a selection involved
- Enum
-
- all
- selected
single_file_name
string or null
required
- Example
- "config.yaml"
has_multiple_single_files
boolean
- Example
- true
single_file_paths
array[string]
- Example
- [ "config.yml", ".github/issue_TEMPLATE.md" ]
string
repositories_url
string
uri
required
- Example
- "https://api.github.com/users/octocat/repos"
account
object (account)
required
A GitHub user.
name
string or null
string or null
login
string
required