GitHub API Integration Vol.2

These are the list of integration use cases supported by Knit for GitHub API as part of the TICKETING category


Get a Repository Webhook

  • ID: get_repository_webhook
  • Operation: read
  • Entities: repository, token, webhook
  • Summary: The 'Get a Repository Webhook' API endpoint retrieves a webhook configured in a specified repository. It requires the repository owner's name, the repository name, and the unique hook ID as path parameters. The request headers should include an authorization token and can optionally specify the API version and accept header. The response includes details about the webhook such as its type, ID, name, active status, events it triggers on, configuration details, and URLs for testing and pinging the webhook. The response also includes timestamps for when the webhook was created and last updated, as well as the last response details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List Requests to Access Organization Resources with Fine-Grained Personal Access Tokens

  • ID: get_requests_to_access_organization_resources
  • Operation: read
  • Entities: permission, token, organization
  • Summary: This API endpoint allows GitHub Apps to list requests from organization members to access organization resources using fine-grained personal access tokens. The endpoint requires the 'Personal access token requests' organization permissions set to 'read'. The request includes headers for authentication and API versioning, a required path parameter for the organization name, and optional query parameters for pagination, sorting, and filtering results. The response returns an array of access requests, each containing details such as the request ID, reason, owner information, repository selection, permissions, and token details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Route Stats by Actor

  • ID: get_route_stats_by_actor
  • Operation: read
  • Entities: api request, actor, route stat
  • Summary: The 'Get Route Stats by Actor' API endpoint retrieves API request count statistics for a specified actor, broken down by route within a specified time frame. It requires the organization name, actor type, and actor ID as path parameters. The minimum timestamp is a required query parameter, while other parameters like max timestamp, page, per_page, direction, sort, and api_route_substring are optional. The response includes details such as the HTTP method, API route, total request count, rate-limited request count, and timestamps of the last request and last rate-limited request.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get rules for a branch

  • ID: get_rules_for_a_branch
  • Operation: read
  • Entities: branch, repository, rule
  • Summary: The 'Get rules for a branch' API endpoint retrieves all active rules that apply to a specified branch in a GitHub repository. The branch does not need to exist; rules that would apply to a branch with that name will be returned. The API supports fine-grained access tokens, including GitHub App user access tokens, GitHub App installation access tokens, and fine-grained personal access tokens with 'Metadata' repository permissions (read). The endpoint can also be used without authentication for public resources. The request requires path parameters: 'owner' (the account owner of the repository), 'repo' (the name of the repository), and 'branch' (the name of the branch). Optional query parameters include 'per_page' (number of results per page) and 'page' (page number of results). The response returns an array of repository rules, each with details such as type, ruleset source, and parameters.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get SCIM Provisioning Information for a User

  • ID: get_scim_provisioning_information_for_a_user
  • Operation:
  • Entities:
  • Summary: This API endpoint retrieves SCIM provisioning information for a specific user within an organization. It requires the organization name and the SCIM user ID as path parameters. The request must include an authorization header with a bearer token that has 'Members' organization permissions (read). The response includes detailed user information such as schemas, user ID, external ID, username, display name, email addresses, active status, and metadata including resource type, creation date, last modification date, and location.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Code

  • ID: get_search_code
  • Operation: read
  • Entities: search term, file, repository
  • Summary: The Search Code API allows users to search for query terms inside files on GitHub. It returns up to 100 results per page and supports various search qualifiers to narrow down the search scope. The API requires authentication for private resources but can be used without authentication for public resources. It supports fine-grained access tokens and has a rate limit of 10 requests per minute. The API accepts query parameters such as 'q' for search terms, 'sort' for sorting results, 'order' for result order, 'per_page' for results per page, and 'page' for pagination. The response includes the total count of results, whether the results are incomplete, and an array of items with details about each file found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Commits

  • ID: get_search_commits
  • Operation: read
  • Entities: repository, commit, user
  • Summary: The 'Search Commits' API allows users to find commits on the default branch of a repository using various search criteria. It supports up to 100 results per page and can return text match metadata for the message field if the text-match media type is provided. The API can be accessed using GitHub App user access tokens, installation access tokens, or fine-grained personal access tokens, and does not require authentication for public resources. The main input parameters include a required query parameter 'q' for search keywords and optional parameters like 'sort', 'order', 'per_page', and 'page'. The response includes the total count of results, whether the results are incomplete, and an array of commit items with detailed information about each commit, author, committer, and repository.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Issues and Pull Requests

  • ID: get_search_issues_and_pull_requests
  • Operation: read
  • Entities: pull request, repository, issue
  • Summary: The 'Search Issues and Pull Requests' API allows users to find issues and pull requests on GitHub by state and keyword. It supports various query parameters such as 'q' for search keywords and qualifiers, 'sort' for sorting results, 'order' for ordering results, 'per_page' for the number of results per page, and 'page' for pagination. The API returns a list of issues or pull requests with detailed information including URLs, titles, user details, labels, state, comments, and more. The API can be accessed without authentication for public resources, but fine-grained access tokens can be used for authenticated requests. The response includes a total count of results, whether the results are incomplete, and an array of items representing the issues or pull requests found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Labels in a Repository

  • ID: get_search_labels_in_a_repository
  • Operation: read
  • Entities: search, repository, label
  • Summary: The 'Search Labels in a Repository' API allows users to find labels within a specified repository that match given search keywords. It returns up to 100 results per page and provides options to sort and order the results. The API requires the repository ID and search keywords as mandatory query parameters. Optional parameters include sorting by creation or update date, ordering results, and pagination controls. The response includes the total count of labels found, whether the results are complete, and an array of label items with details such as ID, name, color, and description. The API supports fine-grained access tokens for authentication but can also be used without authentication for public resources.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Repositories

  • ID: get_search_repositories
  • Operation: read
  • Entities: repository, search_criteria, access_token
  • Summary: The 'Search Repositories' API allows users to find repositories on GitHub based on various criteria. It supports up to 100 results per page and can return text match metadata for the name and description fields. The API can be accessed using fine-grained access tokens or without authentication for public resources. The main input parameters include 'q' for the search query, 'sort' for sorting results, 'order' for the order of results, 'per_page' for the number of results per page, and 'page' for pagination. The response includes the total count of results, whether the results are incomplete, and an array of repository items with details such as id, name, owner, description, and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Topics

  • ID: get_search_topics
  • Operation: read
  • Entities: topic, result, query
  • Summary: The Search Topics API allows users to find topics on GitHub via various criteria, with results sorted by best match. It supports up to 100 results per page and can return text match metadata for fields like short_description, description, name, or display_name when the text-match media type is specified. The API can be accessed using GitHub App user access tokens, installation access tokens, or fine-grained personal access tokens, and does not require authentication for public resources. The main input parameters include a required query parameter 'q' for search keywords and optional parameters 'per_page' and 'page' for pagination. The response includes a total count of results, a boolean indicating if results are incomplete, and an array of topic items with detailed information such as name, display name, descriptions, creation and update timestamps, and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Search Users

  • ID: get_search_users
  • Operation: read
  • Entities: follower, user, repository
  • Summary: The Search Users API allows you to find users on GitHub based on various criteria. It returns up to 100 results per page and can include text match metadata for login, public email, and name fields. The API does not require authentication for public resources and supports fine-grained access tokens. The main query parameter 'q' is required and allows you to specify search keywords and qualifiers. Optional parameters include 'sort', 'order', 'per_page', and 'page'. The response includes a total count of results, a flag indicating if results are incomplete, and an array of user items with detailed information such as login, id, avatar URL, and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get an SSH signing key for the authenticated user

  • ID: get_ssh_signing_key_for_authenticated_user
  • Operation: read
  • Entities: SSH signing key, token, user
  • Summary: This API endpoint retrieves extended details for an SSH signing key for the authenticated user. It requires OAuth app tokens or personal access tokens with the read:ssh_signing_key scope. The endpoint accepts a path parameter 'ssh_signing_key_id' which is the unique identifier of the SSH signing key. The response includes details such as the key, id, title, and creation date of the SSH signing key.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List SSH Signing Keys for Authenticated User

  • ID: get_ssh_signing_keys_for_authenticated_user
  • Operation: read
  • Entities: SSH signing key, GitHub account, user
  • Summary: This API endpoint lists the SSH signing keys for the authenticated user's GitHub account. It requires OAuth app tokens or personal access tokens with the 'read:ssh_signing_key' scope. The endpoint supports fine-grained access tokens with 'SSH signing keys' user permissions set to read. The request can include headers for content type and API version, and query parameters for pagination. The response is an array of SSH signing keys, each with details such as key, id, title, and creation date.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List SSH Signing Keys for a User

  • ID: get_ssh_signing_keys_for_user
  • Operation: read
  • Entities: SSH signing key, user, GitHub app
  • Summary: The 'List SSH Signing Keys for a User' API endpoint allows users to retrieve the SSH signing keys associated with a specified GitHub user account. This operation is accessible by anyone and can be used without authentication if only public resources are requested. The endpoint accepts a username as a required path parameter and optional query parameters for pagination, such as 'per_page' and 'page'. The response is an array of SSH signing keys, each containing details like the key, id, title, and creation date.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Subject Stats

  • ID: get_subject_stats
  • Operation: read
  • Entities: subject, API request, organization
  • Summary: The 'Get Subject Stats' API endpoint retrieves request statistics for all subjects, such as users or GitHub Apps, within a specified organization and time frame. It requires a fine-grained access token with 'API Insights' organization permissions set to read. The request includes headers for content type and authorization, a path parameter for the organization name, and query parameters for specifying the time frame, pagination, sorting, and filtering options. The response returns an array of objects containing details about each subject's request statistics, including total requests, rate-limited requests, and timestamps of the last requests.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Summary Stats

  • ID: get_summary_stats
  • Operation: read
  • Entities: user, app, organization
  • Summary: The 'Get Summary Stats' API provides overall statistics of API requests made within an organization by all users and apps within a specified time frame. It requires a fine-grained access token with 'API Insights' organization permissions (read). The API accepts headers for content type and authorization, a required path parameter for the organization name, and query parameters for the minimum and optional maximum timestamps. The response includes the total number of requests and the number of rate-limited requests within the queried time period.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Summary Stats by Actor

  • ID: get_summary_stats_by_actor
  • Operation: read
  • Entities: api request, actor, organization
  • Summary: The 'Get Summary Stats by Actor' API endpoint retrieves overall statistics of API requests made within an organization by a specific actor. The actor can be a GitHub App installation, OAuth app, or other tokens on behalf of a user. The endpoint requires a fine-grained access token with 'API Insights' organization permissions (read). The request includes headers for content type and authorization, path parameters for organization name, actor type, and actor ID, and query parameters for the minimum and optional maximum timestamps. The response provides the total number of requests and the number of rate-limited requests within the specified time period.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Summary Stats by User

  • ID: get_summary_stats_by_user
  • Operation: read
  • Entities: summary stat, user, organization
  • Summary: The 'Get Summary Stats by User' API endpoint retrieves overall statistics of API requests within a specified organization for a particular user. It requires the organization name and user ID as path parameters, and a minimum timestamp as a query parameter. An optional maximum timestamp can also be provided. The API requires an authorization header with a bearer token that has 'API Insights' organization permissions (read). The response includes the total number of requests and the number of rate-limited requests within the queried time period.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get a Team Discussion

  • ID: get_team_discussion
  • Operation: read
  • Entities: discussion, team, organization
  • Summary: The 'Get a Team Discussion' API endpoint allows users to retrieve a specific discussion from a team's page on GitHub. The endpoint requires the organization name, team slug, and discussion number as path parameters. The request headers should include an authorization token and can optionally specify the API version and accept header. The response includes detailed information about the discussion, such as the author, body content, creation date, and reactions. This API is useful for accessing and displaying team discussions programmatically.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Team Member (Legacy)

  • ID: get_team_member_legacy
  • Operation: read
  • Entities: team, member, user
  • Summary: The 'Get Team Member (Legacy)' API endpoint retrieves information about a specific team member in a GitHub team. This endpoint is being deprecated, and it is recommended to use the 'Get team membership for a user' endpoint instead. The API requires the team to be visible to the authenticated user and works with fine-grained access tokens, including GitHub App user access tokens, GitHub App installation access tokens, and fine-grained personal access tokens with 'Members' organization permissions (read). The request requires the 'team_id' and 'username' as path parameters and an authorization header with a bearer token. The response status code is 204 if the user is a member and 404 if the user is not a member.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Team Membership for a User

  • ID: get_team_membership_for_a_user
  • Operation: read
  • Entities: team, user, organization
  • Summary: The 'Get Team Membership for a User' API retrieves the membership details of a specified user within a team. The team must be visible to the authenticated user. The API requires the organization name, team slug, and username as path parameters. The response includes the membership state and the user's role in the team. The role can be 'member' or 'maintainer', with 'maintainer' being the role for organization owners. The API returns a 200 status code if successful, and a 404 status code if the user has no team membership.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get team membership for a user (Legacy)

  • ID: get_team_membership_for_a_user_legacy
  • Operation: read
  • Entities: team, user, membership
  • Summary: This API endpoint retrieves the membership details of a user in a specific team. The team must be visible to the authenticated user. The request requires the team_id and username as path parameters. The response includes the state of the membership and the member's role, where the role for organization owners is set to maintainer. The endpoint is being deprecated, and users are advised to migrate to the new endpoint. The response schema includes the URL of the membership, the role of the user (either 'member' or 'maintainer'), and the state of the membership ('active' or 'pending').
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List Teams Assigned to an Organization Role

  • ID: get_teams_assigned_to_organization_role
  • Operation: read
  • Entities: role, team, organization
  • Summary: The 'List Teams Assigned to an Organization Role' API endpoint allows administrators to list teams that are assigned to a specific organization role. To use this endpoint, the user must have admin privileges for the organization and the necessary OAuth or personal access tokens with the 'admin:org' scope. The endpoint requires the organization name and role ID as path parameters. Optional query parameters include 'per_page' and 'page' for pagination. The response includes a list of teams with details such as team ID, name, description, privacy settings, and URLs. The API returns a 200 status code for a successful request, 404 if the organization or role does not exist, and 422 if the organization roles feature is not enabled or validation fails.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Time Stats by Actor

  • ID: get_time_stats_by_actor
  • Operation: read
  • Entities: time stat, actor, organization
  • Summary: The 'Get Time Stats by Actor' API endpoint retrieves the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period. It requires the organization name, actor type, and actor ID as path parameters. The query parameters include the minimum timestamp, maximum timestamp, and timestamp increment to breakdown the query results. The API requires an authorization header with a bearer token and optionally accepts a header for the API version and content type. The response is an array of objects, each containing a timestamp, total request count, and rate-limited request count.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Time Stats by User

  • ID: get_time_stats_by_user
  • Operation: read
  • Entities: time stat, user, organization
  • Summary: The 'Get Time Stats by User' API endpoint retrieves the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period. It requires the organization name and user ID as path parameters, and the minimum timestamp, maximum timestamp, and timestamp increment as query parameters. The API returns an array of objects, each containing a timestamp, total request count, and rate-limited request count. The endpoint requires a bearer token for authentication and supports fine-grained access tokens with 'API Insights' organization permissions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Time Stats for Organization

  • ID: get_time_stats_for_organization
  • Operation: read
  • Entities: request, time stat, organization
  • Summary: The 'Get Time Stats for Organization' API endpoint retrieves the number of API requests and rate-limited requests made within a specified organization over a given time period. It requires a fine-grained access token with 'API Insights' organization permissions set to read. The request includes headers for acceptance and authorization, a path parameter for the organization name, and query parameters for the minimum timestamp, optional maximum timestamp, and required timestamp increment. The response provides an array of objects, each containing a timestamp, total request count, and rate-limited request count.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List User Account Issues Assigned to Authenticated User

  • ID: get_user_account_issues
  • Operation: read
  • Entities: repository, user, issue
  • Summary: The 'List User Account Issues Assigned to Authenticated User' API endpoint allows the authenticated user to retrieve a list of issues assigned to them across owned and member repositories. This endpoint considers every pull request as an issue, but not every issue is a pull request. The response can include both issues and pull requests, identifiable by the 'pull_request' key. The API supports various custom media types for the response format, including raw markdown, text-only, HTML, and full representations. The endpoint requires a bearer token for authentication and accepts several query parameters to filter and sort the issues, such as 'filter', 'state', 'labels', 'sort', 'direction', 'since', 'per_page', and 'page'. The response includes detailed information about each issue, such as its ID, URL, state, title, body, user, labels, assignees, milestone, comments, pull request details, and associated repository information.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get User Stats

  • ID: get_user_stats
  • Operation: read
  • Entities: user, organization, access token
  • Summary: The 'Get User Stats' API retrieves API usage statistics within an organization for a specific user, broken down by the type of access. It requires a fine-grained access token with 'API Insights' organization permissions set to read. The API accepts headers for content type and authorization, path parameters for organization and user ID, and query parameters for filtering results by timestamps, pagination, sorting, and actor name substring. The response includes an array of objects detailing the actor type, name, ID, integration ID, OAuth application ID, total request count, rate-limited request count, and timestamps of the last request and rate-limited request.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get a user using their ID

  • ID: get_user_using_id
  • Operation: read
  • Entities: user, email, organization
  • Summary: The 'Get a user using their ID' API provides publicly available information about a GitHub user using their durable user ID. This API requires the 'account_id' as a path parameter and optionally accepts headers for content type and authentication. The response includes user details such as login, id, avatar URL, and other profile information. If the user has set a public email, it will be included in the response; otherwise, it will be null. The API returns a 200 status code for a successful request and a 404 if the user is not found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

List Users Assigned to an Organization Role

  • ID: get_users_assigned_to_organization_role
  • Operation: read
  • Entities: role, user, organization
  • Summary: The 'List Users Assigned to an Organization Role' API endpoint allows administrators to retrieve a list of users assigned to a specific role within an organization on GitHub. To access this endpoint, the user must have the 'admin:org' scope for OAuth app tokens or personal access tokens. The endpoint requires the organization name and role ID as path parameters. Optional query parameters include 'per_page' and 'page' for pagination. The response includes a list of users with details such as login, ID, avatar URL, and more. The API returns a 200 status code for a successful request, 404 if the organization or role does not exist, and 422 if the organization roles feature is not enabled or validation fails.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Check if vulnerability alerts are enabled for a repository

  • ID: get_vulnerability_alerts_status
  • Operation: read
  • Entities: vulnerability alert, repository, user
  • Summary: This API checks if vulnerability alerts are enabled for a specified repository. The authenticated user must have admin read access to the repository. It requires a fine-grained access token with 'Administration' repository permissions set to read. The endpoint uses path parameters 'owner' and 'repo' to specify the repository. The response status code 204 indicates that vulnerability alerts are enabled, while 404 indicates they are not.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get a webhook configuration for a repository

  • ID: get_webhook_configuration_for_a_repository
  • Operation: read
  • Entities: repository, configuration, webhook
  • Summary: This API endpoint retrieves the webhook configuration for a specified repository. It requires the repository owner's name, the repository name, and the unique hook ID as path parameters. The request headers should include an authorization token and can optionally specify the API version and accept header. The response includes the webhook configuration details such as the delivery URL, content type, secret, and SSL verification setting.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get Webhook Configuration for an Organization

  • ID: get_webhook_configuration_for_an_organization
  • Operation: read
  • Entities: webhook, configuration, organization
  • Summary: This API endpoint retrieves the webhook configuration for a specified organization. The user must be an organization owner and have the appropriate OAuth or fine-grained access tokens with 'admin:org_hook' scope. The request requires the organization name and the unique hook ID as path parameters. The response includes details such as the URL for payload delivery, content type, secret for HMAC generation, and SSL verification settings.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Get a webhook delivery for an organization webhook

  • ID: get_webhook_delivery_for_organization_webhook
  • Operation: read
  • Entities: webhook, delivery, organization
  • Summary: This API endpoint retrieves a specific delivery for a webhook configured in an organization. It requires the user to be an organization owner and the use of OAuth app tokens or personal access tokens with the 'admin:org_hook' scope. The endpoint requires the organization name, hook ID, and delivery ID as path parameters. The response includes details about the delivery such as its ID, status, event, and associated request and response headers and payloads.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Accept a Repository Invitation

  • ID: patch_accept_repository_invitation
  • Operation: write
  • Entities: repository, user, invitation
  • Summary: The 'Accept a Repository Invitation' API allows a user to accept an invitation to collaborate on a GitHub repository. The request requires a PATCH method to the endpoint '/user/repository_invitations/{invitation_id}', where 'invitation_id' is a required path parameter representing the unique identifier of the invitation. The request headers should include an 'Authorization' bearer token for authentication, and it is recommended to set the 'accept' header to 'application/vnd.github+json'. The API responds with a 204 No Content status code if the invitation is successfully accepted. Other possible response codes include 304 Not Modified, 403 Forbidden, 404 Resource Not Found, and Conflict.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or Update Custom Properties for an Organization

  • ID: patch_create_or_update_custom_properties_for_an_organization
  • Operation: write
  • Entities: permission, custom property, organization
  • Summary: This API endpoint allows for the creation or updating of custom properties for a specified organization. The authenticated user must have the appropriate permissions, such as being an administrator or having the 'custom_properties_org_definitions_manager' permission. The endpoint accepts a PATCH request with headers for content type and authorization, a path parameter for the organization name, and a body containing an array of property objects. Each property object must include a 'property_name' and 'value_type', and can optionally include other attributes like 'url', 'source_type', 'required', 'default_value', 'description', 'allowed_values', and 'values_editable_by'. The response returns an array of the updated or created properties, each with details such as 'property_name', 'url', 'source_type', and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or Update Custom Property Values for a Repository

  • ID: patch_create_or_update_custom_property_values_for_a_repository
  • Operation: write
  • Entities: custom property, repository, user
  • Summary: This API endpoint allows repository admins and users with the 'edit custom property values' permission to create or update custom property values for a repository. The endpoint requires a PATCH request to the specified URL with the repository owner and name as path parameters. The request must include a list of properties in the body, each with a 'property_name' and a 'value'. The 'value' can be null, a string, or an array. The request headers should include an 'Authorization' bearer token and optionally an 'accept' header set to 'application/vnd.github+json'. A successful request returns a 204 No Content status, while errors may result in 403 Forbidden, 404 Not Found, or 422 Validation Failed status codes.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or update custom property values for organization repositories

  • ID: patch_create_or_update_custom_property_values_for_organization_repositories
  • Operation: write
  • Entities: custom property, repository, organization
  • Summary: This API endpoint allows for the creation or updating of custom property values for repositories within an organization. The authenticated user must have appropriate permissions, such as being an administrator or having the 'custom_properties_org_values_editor' permission. The request can update up to 30 repositories at once, and using a null value for a property will remove it. The request requires the organization name as a path parameter, and the body must include the repository names and the properties to be updated. The response will return a 204 status code if successful, with no content.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update Hosted Compute Network Configuration for Organization

  • ID: patch_hosted_compute_network_configuration_for_organization
  • Operation: write
  • Entities: hosted compute network configuration, organization, network setting
  • Summary: This API updates a hosted compute network configuration for an organization. It requires OAuth app tokens or personal access tokens with the write:network_configurations scope. The endpoint accepts headers for authorization and API versioning, path parameters for organization and network configuration identification, and body parameters for specifying the name, compute service, and network settings IDs of the configuration. The response includes the updated network configuration details such as ID, name, compute service, network settings IDs, and creation timestamp.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Reprioritize Sub-Issue

  • ID: patch_reprioritize_sub_issue
  • Operation: write
  • Entities: sub-issue, repository, user
  • Summary: The 'Reprioritize Sub-Issue' API allows users to change the priority of a sub-issue within a parent issue list in a GitHub repository. This API requires a PATCH request to the endpoint 'https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority'. The request must include headers for 'accept', 'Authorization', and optionally 'X-GitHub-Api-Version'. Path parameters 'owner', 'repo', and 'issue_number' are required to specify the repository and issue. The body must include 'sub_issue_id' to identify the sub-issue to reprioritize, and either 'after_id' or 'before_id' to specify the new position. The response includes detailed information about the issue, such as its ID, state, title, user, labels, assignees, milestone, and more. The API requires fine-grained access tokens with 'Issues' repository permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Set Primary Email Visibility for Authenticated User

  • ID: patch_set_primary_email_visibility_for_authenticated_user
  • Operation: write
  • Entities: token, email, user
  • Summary: This API sets the visibility for the primary email addresses of the authenticated user. It requires a PATCH request to the endpoint 'https://api.github.com/user/email/visibility' with a body parameter 'visibility' that can be either 'public' or 'private'. The request must include an Authorization header with a bearer token that has 'Email addresses' user permissions (write). The response returns an array of email objects, each containing the email address, whether it is primary, verified, and its visibility status.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Discussion

  • ID: patch_update_a_discussion
  • Operation: write
  • Entities: discussion, team, organization
  • Summary: The 'Update a Discussion' API allows users to edit the title and body text of a discussion post within a GitHub team. The API requires the organization name, team slug, and discussion number as path parameters. The request can include optional headers such as 'accept' and 'X-GitHub-Api-Version', and requires an 'Authorization' header with a bearer token. The request body can include the 'title' and 'body' of the discussion post, which are optional. The response includes detailed information about the discussion, such as the author, body content, comments, and reactions. The API requires OAuth app tokens or personal access tokens with the 'write:discussion' scope.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a GitHub Repository

  • ID: patch_update_a_github_repository
  • Operation: write
  • Entities: permission, repository, token
  • Summary: The 'Update a GitHub Repository' API allows users to modify the details of an existing repository on GitHub. Users can update various attributes of the repository such as its name, description, homepage URL, visibility, and more. The API requires authentication via a bearer token and supports fine-grained access tokens with 'Administration' repository permissions. The request includes headers for content type and authorization, path parameters for the repository owner and name, and a body with optional parameters to specify the updates. The response returns the updated repository details, including its ID, name, owner, and URL.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Label

  • ID: patch_update_a_label
  • Operation: write
  • Entities: token, repository, label
  • Summary: The 'Update a Label' API allows users to update an existing label in a GitHub repository. It requires the repository owner's name, the repository name, and the current label name as path parameters. The request can include a new label name, a color code, and a description in the body. The API requires authentication via a bearer token and supports fine-grained access tokens with specific permissions. The response includes details of the updated label, such as its ID, name, description, color, and whether it is a default label.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Team

  • ID: patch_update_a_team
  • Operation: write
  • Entities: team, organization
  • Summary: The 'Update a Team' API allows an authenticated user, who must be either an organization owner or a team maintainer, to edit a team's details. The API endpoint is PATCH /orgs/{org}/teams/{team_slug}. The request requires path parameters for the organization name and team slug, and optionally accepts body parameters to update the team's name, description, privacy, notification settings, permission, and parent team ID. The response includes the updated team details, such as the team's ID, name, description, privacy settings, and associated organization information. The API returns various HTTP status codes, including 200 for successful updates, 201 for creation, 403 for forbidden access, 404 for resource not found, and 422 for validation failures.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Team (Legacy)

  • ID: patch_update_a_team_legacy
  • Operation: write
  • Entities: team, repository, organization
  • Summary: The 'Update a Team (Legacy)' API allows authenticated users who are organization owners or team maintainers to edit a team's details. The API requires the team_id as a path parameter and accepts headers for content type. The request body can include parameters such as name (required), description, privacy, notification_setting, permission, and parent_team_id. The response includes details about the updated team, such as its id, name, privacy settings, and organization details. Note that this endpoint is being deprecated, and users are advised to migrate to the new Update a team endpoint.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an Organization

  • ID: patch_update_an_organization
  • Operation: write
  • Entities: repository, organization, member
  • Summary: The 'Update an Organization' API allows authenticated users who are organization owners to update the organization's profile and member privileges. The endpoint requires OAuth app tokens or personal access tokens with 'admin:org' or 'repo' scope. The API accepts various parameters including billing email, company name, public email, Twitter username, location, and more. It also allows setting permissions for repository creation and project usage within the organization. The response includes detailed information about the organization, such as its name, description, location, and various settings related to repository and project permissions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an attribute for a SCIM user

  • ID: patch_update_attribute_for_scim_user
  • Operation:
  • Entities:
  • Summary: The 'Update an attribute for a SCIM user' API allows you to change a provisioned user's individual attributes using a specific Operations JSON format. The API requires the organization name and the SCIM user ID as path parameters. The request body must include a set of operations to be performed, such as add, remove, or replace. The API supports fine-grained access tokens with 'Members' organization permissions (write). The response includes the updated user attributes, such as displayName, emails, and active status. Note that setting active:false removes the user from the organization and deletes the associated external identity.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update the Authenticated User

  • ID: patch_update_authenticated_user
  • Operation: write
  • Entities: token, profile, user
  • Summary: The 'Update the Authenticated User' API allows users to update their profile information on GitHub. This includes fields such as name, email, blog URL, Twitter username, company, location, hiring availability, and biography. The API requires a PATCH request to the endpoint 'https://api.github.com/user' with appropriate headers including an authorization token. The response includes detailed user information such as login, id, avatar URL, and other profile details. Note that if the email is set to private, it will not be displayed publicly even if updated through this API.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Discussion Comment

  • ID: patch_update_discussion_comment
  • Operation: write
  • Entities: discussion, team, organization
  • Summary: The 'Update a Discussion Comment' API allows users to edit the body text of a discussion comment within a team on GitHub. To use this endpoint, OAuth app tokens and personal access tokens (classic) need the write:discussion scope. The API requires the organization name, team slug, discussion number, and comment number as path parameters. The request body must include the new body text for the comment. The response includes details about the updated comment, such as the author, body text, creation and update timestamps, and reaction counts.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Discussion Comment (Legacy)

  • ID: patch_update_discussion_comment_legacy
  • Operation: write
  • Entities: discussion, comment, team
  • Summary: The 'Update a Discussion Comment (Legacy)' API allows users to edit the body text of a discussion comment within a team on GitHub. This endpoint requires OAuth app tokens or personal access tokens with the 'write:discussion' scope. The request must include the team ID, discussion number, and comment number as path parameters, and the new body text as a required body parameter. The response includes details about the updated comment, such as the author, body text, creation and update timestamps, and reaction counts. Note that this endpoint is being deprecated, and users are advised to migrate to the new endpoint.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Discussion (Legacy)

  • ID: patch_update_discussion_legacy
  • Operation: write
  • Entities: discussion, team, user
  • Summary: The 'Update a Discussion (Legacy)' API allows users to edit the title and body text of a discussion post within a team. This endpoint is part of the Teams API and requires OAuth app tokens or personal access tokens with the 'write:discussion' scope. The API uses the PATCH method and requires the 'team_id' and 'discussion_number' as path parameters. The request headers should include 'accept' set to 'application/vnd.github+json' and an 'Authorization' bearer token. The body parameters 'title' and 'body' are optional and only the provided parameters will be updated. The response includes details about the discussion post, such as the author, body content, comments count, and reactions. Note that this endpoint is being deprecated and users are advised to migrate to the new 'Update a discussion' endpoint.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a GitHub Repository Milestone

  • ID: patch_update_github_repository_milestone
  • Operation: write
  • Entities: milestone, repository, user
  • Summary: The 'Update a GitHub Repository Milestone' API allows users to update details of a specific milestone in a GitHub repository. The API requires a PATCH request to the endpoint '/repos/{owner}/{repo}/milestones/{milestone_number}' with the necessary path parameters: 'owner', 'repo', and 'milestone_number'. The request headers should include an 'Authorization' token and optionally 'accept' and 'X-GitHub-Api-Version'. The request body can include 'title', 'state', 'description', and 'due_on' to update the milestone details. The response returns a JSON object containing the updated milestone details, including URLs, state, title, description, creator information, and issue counts.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an Issue on GitHub Repository

  • ID: patch_update_issue
  • Operation: write
  • Entities: user, issue, repository
  • Summary: The 'Update an Issue' API endpoint allows issue owners and users with push access or Triage role to edit an issue on a GitHub repository. The endpoint supports various media types for the response, including raw markdown, text-only, HTML, and full representations. It requires fine-grained access tokens with specific permissions. The API accepts headers for content type and authorization, path parameters for identifying the repository and issue, and body parameters for updating issue details such as title, body, assignee, state, state reason, milestone, labels, and assignees. The response includes detailed information about the updated issue, including its state, title, body, user, labels, assignees, milestone, and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an Issue Comment

  • ID: patch_update_issue_comment
  • Operation: write
  • Entities: issue, repository, comment
  • Summary: The 'Update an Issue Comment' API allows users to update comments on issues and pull requests in a GitHub repository. The API requires the repository owner's name, the repository name, and the unique comment ID as path parameters. The request body must include the new content of the comment. The API supports various media types for the response, including raw markdown, text-only, HTML, and full representations. The response includes details about the updated comment, such as its ID, URL, content, and the user who made the comment. The API requires authentication via a bearer token and supports fine-grained access tokens with specific permissions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an organization membership for the authenticated user

  • ID: patch_update_organization_membership
  • Operation: write
  • Entities: user, organization membership, organization
  • Summary: This API endpoint updates an organization membership for the authenticated user, converting them to an active member of the organization if they have a pending invitation. The request requires a PATCH method to the URL 'https://api.github.com/user/memberships/orgs/{org}', where '{org}' is the organization name. The request headers should include 'accept' set to 'application/vnd.github+json', an 'Authorization' bearer token, and optionally 'X-GitHub-Api-Version'. The body must contain the 'state' parameter set to 'active'. The response includes details about the membership, such as the state, role, organization details, and user information. The API requires fine-grained access tokens with 'Members' organization permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an Organization Webhook

  • ID: patch_update_organization_webhook
  • Operation: write
  • Entities: token, organization, webhook
  • Summary: The 'Update an Organization Webhook' API allows organization owners to update a webhook configured in an organization. When updating a webhook, the secret will be overwritten, and if a secret was previously set, it must be provided again or a new one set, otherwise it will be removed. The API requires the 'admin:org_hook' scope for OAuth app tokens and personal access tokens. The endpoint accepts path parameters for the organization name and hook ID, and a body parameter for the webhook configuration, including URL, content type, secret, SSL verification, events, and active status. The response includes details of the updated webhook, such as its ID, URL, events, and configuration.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Repository Invitation

  • ID: patch_update_repository_invitation
  • Operation: write
  • Entities: repository, user, invitation
  • Summary: The 'Update a Repository Invitation' API allows you to modify the permissions of an existing invitation to collaborate on a GitHub repository. This API requires a PATCH request to the endpoint '/repos/{owner}/{repo}/invitations/{invitation_id}' with the necessary path parameters: 'owner', 'repo', and 'invitation_id'. The request headers should include an 'Authorization' bearer token and optionally 'accept' and 'X-GitHub-Api-Version'. The body can specify the 'permissions' to be granted to the invitee, with valid values being 'read', 'write', 'maintain', 'triage', and 'admin'. The response includes details about the invitation, such as the repository, invitee, inviter, permissions, and URLs.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Repository Webhook

  • ID: patch_update_repository_webhook
  • Operation: write
  • Entities: repository, token, webhook
  • Summary: The 'Update a Repository Webhook' API allows users to update a webhook configured in a GitHub repository. Users can modify the webhook's configuration, including the URL, content type, secret, SSL verification, and events that trigger the webhook. The API requires path parameters such as the repository owner, repository name, and hook ID. The request body can include configuration details like the URL, content type, secret, SSL verification, events, additional events, and active status. The response includes details about the webhook, such as its ID, name, active status, events, configuration, and URLs for testing and pinging the webhook. The API supports fine-grained access tokens with 'Webhooks' repository permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a webhook configuration for an organization

  • ID: patch_update_webhook_configuration_for_an_organization
  • Operation: write
  • Entities: webhook, configuration, organization
  • Summary: This API updates the webhook configuration for an organization. It requires the user to be an organization owner and to have the appropriate OAuth or fine-grained access tokens with 'admin:org_hook' scope. The API accepts headers for content type and authorization, path parameters for organization name and hook ID, and body parameters for the webhook URL, content type, secret, and SSL verification settings. The response includes the updated webhook configuration details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Webhook Configuration for a Repository

  • ID: patch_update_webhook_configuration_for_repository
  • Operation: write
  • Entities: repository, configuration, webhook
  • Summary: The 'Update a Webhook Configuration for a Repository' API endpoint allows users to update the webhook configuration for a specific repository on GitHub. This includes setting the URL to which payloads will be delivered, the content type for serialization, an optional secret for HMAC hex digest generation, and SSL verification settings. The API requires authentication via OAuth app tokens or personal access tokens with the write:repo_hook or repo scope. The endpoint accepts PATCH requests with path parameters for the repository owner, repository name, and hook ID, and optional body parameters for the webhook configuration. The response includes the updated configuration details.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add Assignees to a GitHub Issue

  • ID: post_add_assignees_to_github_issue
  • Operation: write
  • Entities: assignee, repository, issue
  • Summary: The 'Add Assignees to a GitHub Issue' API allows users to add up to 10 assignees to a specific issue in a GitHub repository. The API requires a POST request to the endpoint 'https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/assignees' with the necessary path parameters: 'owner', 'repo', and 'issue_number'. The request headers should include an 'Authorization' bearer token and optionally 'accept' and 'X-GitHub-Api-Version'. The request body should contain an array of 'assignees', which are the usernames of the people to be assigned to the issue. The response returns a detailed JSON object representing the issue, including its ID, state, title, body, user, labels, assignees, and other metadata. The API requires appropriate permissions, such as 'Issues' or 'Pull requests' repository permissions with write access.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add an email address for the authenticated user

  • ID: post_add_email_address_for_authenticated_user
  • Operation: write
  • Entities: email, user, access token
  • Summary: This API endpoint allows the authenticated user to add one or more email addresses to their GitHub account. The request requires a bearer token with the 'user' scope for OAuth app tokens and personal access tokens, or specific permissions for fine-grained tokens. The request headers should include 'accept' set to 'application/vnd.github+json' and optionally the 'X-GitHub-Api-Version'. The body must contain an 'emails' array with at least one email address. The response returns an array of email objects, each containing the email address, whether it is primary, verified, and its visibility status.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add Labels to an Issue

  • ID: post_add_labels_to_an_issue
  • Operation: write
  • Entities: repository, label, issue
  • Summary: The 'Add Labels to an Issue' API allows users to add labels to a specific issue in a GitHub repository. The API requires the repository owner's name, the repository name, and the issue number as path parameters. The request body can include an array of label names to be added. If an empty array is provided, all labels will be removed from the issue. The API supports fine-grained access tokens and requires appropriate permissions. The response returns an array of label objects, each containing details such as id, name, description, color, and default status.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add Social Accounts for Authenticated User

  • ID: post_add_social_accounts_for_authenticated_user
  • Operation: write
  • Entities: social account, profile, user
  • Summary: This API endpoint allows the authenticated user to add one or more social media accounts to their profile. The request requires OAuth app tokens or personal access tokens with the user scope. The request headers should include an 'accept' header set to 'application/vnd.github+json', an 'Authorization' header with a Bearer token, and optionally an 'X-GitHub-Api-Version' header. The body of the request must contain an array of 'account_urls', which are the full URLs of the social media profiles to be added. The response will return an array of objects, each representing a social media account with 'provider' and 'url' fields. Possible HTTP response status codes include 201 (Created), 304 (Not modified), 401 (Requires authentication), 403 (Forbidden), 404 (Resource not found), and 422 (Validation failed or endpoint spammed).
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add Sub-Issue to GitHub Issue

  • ID: post_add_sub_issue_to_github_issue
  • Operation: write
  • Entities: sub-issue, repository, issue
  • Summary: The 'Add Sub-Issue to GitHub Issue' API allows users to add a sub-issue to an existing GitHub issue. This API requires a POST request to the endpoint 'https://api.github.com/repos/{owner}/{repo}/issues/{issue_number}/sub_issues' with the necessary path parameters: 'owner', 'repo', and 'issue_number'. The request headers should include 'accept', 'Authorization', and 'X-GitHub-Api-Version'. The body of the request must contain 'sub_issue_id' and optionally 'replace_parent'. The response includes detailed information about the issue, such as its ID, URL, state, title, body, user details, labels, assignees, milestone, and more. The API supports various media types for the response, including raw, text, HTML, and full representations of the markdown body. Proper authentication with a fine-grained access token having 'Issues' repository permissions (write) is required.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Fork for a Repository

  • ID: post_create_a_fork_for_a_repository
  • Operation: write
  • Entities: repository, user, fork
  • Summary: The 'Create a Fork for a Repository' API allows an authenticated user to create a fork of a specified repository. The API endpoint is POST /repos/{owner}/{repo}/forks. The request requires path parameters 'owner' and 'repo' to specify the repository to be forked. Optional body parameters include 'organization' to specify the organization name if forking into an organization, 'name' for a new name for the fork, and 'default_branch_only' to fork with only the default branch. The request headers should include 'accept' set to 'application/vnd.github+json' and an 'Authorization' bearer token. The response includes detailed information about the forked repository, such as its ID, name, owner, URLs, permissions, and other metadata. The operation is asynchronous, and the forked repository may take some time to be accessible.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Label

  • ID: post_create_a_label
  • Operation: write
  • Entities: token, repository, label
  • Summary: The 'Create a Label' API endpoint allows users to create a label for a specified repository on GitHub. The request requires the repository owner's name and the repository name as path parameters. The request body must include the label's name and color, with an optional description. The color must be a valid hexadecimal color code. The API requires authentication via a bearer token, and it supports fine-grained access tokens with specific permissions. Upon successful creation, the API returns the label's details, including its ID, name, description, color, and URL.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a milestone

  • ID: post_create_a_milestone
  • Operation: write
  • Entities: milestone, repository, user
  • Summary: The 'Create a milestone' API endpoint allows users to create a new milestone in a specified GitHub repository. The request requires a POST method to the endpoint 'https://api.github.com/repos/{owner}/{repo}/milestones'. The request headers should include an 'Authorization' bearer token for authentication and can optionally include an 'accept' header set to 'application/vnd.github+json'. The path parameters 'owner' and 'repo' are required to specify the repository. The request body must include a 'title' for the milestone and can optionally include 'state', 'description', and 'due_on' fields. The response returns a JSON object containing details of the created milestone, including its URL, state, title, description, creator information, and issue counts. The response status codes include 201 for successful creation, 404 for resource not found, and 422 for validation failure.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Team

  • ID: post_create_a_team
  • Operation: write
  • Entities: permission, team, organization
  • Summary: The 'Create a Team' API allows an authenticated user, who is a member or owner of an organization, to create a new team within that organization. The user automatically becomes a team maintainer. The API requires a POST request to the endpoint '/orgs/{org}/teams' with the organization name as a path parameter. The request body must include the team's name and can optionally include a description, maintainers, repository names, privacy level, notification setting, permission level, and parent team ID. The response includes details about the created team, such as its ID, name, description, privacy level, and associated organization.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an attestation

  • ID: post_create_an_attestation
  • Operation: write
  • Entities: attestation, artifact, repository
  • Summary: The 'Create an attestation' API endpoint allows users to store an artifact attestation and associate it with a repository. The authenticated user must have write permission to the repository and, if using a fine-grained access token, the 'attestations:write' permission is required. The API requires the 'owner' and 'repo' path parameters to specify the repository, and a 'bundle' object in the request body containing the attestation's Sigstore Bundle. The response returns the ID of the created attestation. The API supports fine-grained token types such as GitHub App user access tokens, GitHub App installation access tokens, and fine-grained personal access tokens.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an issue

  • ID: post_create_an_issue
  • Operation: write
  • Entities: repository, user, issue
  • Summary: The 'Create an issue' API allows any user with pull access to a repository to create an issue. If issues are disabled in the repository, the API returns a 410 Gone status. This endpoint triggers notifications and may result in secondary rate limiting if used too quickly. The API supports various custom media types for different representations of the markdown body. The endpoint requires fine-grained access tokens with 'Issues' repository permissions set to write. The request includes headers for accept and authorization, path parameters for owner and repo, and body parameters for title, body, assignee, milestone, labels, and assignees. The response includes details about the created issue, such as its ID, URL, state, title, body, user, labels, assignees, milestone, and more.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an autolink reference for a repository

  • ID: post_create_autolink_reference_for_repository
  • Operation: write
  • Entities: autolink reference, token, repository
  • Summary: This API allows users with admin access to a repository to create an autolink reference. The autolink reference is defined by a key prefix and a URL template, which can be used to automatically generate links in issues, pull requests, or commits. The request requires a bearer token with 'Administration' repository permissions. The response includes the ID of the created autolink reference, along with the key prefix, URL template, and whether it matches alphanumeric characters.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a discussion comment

  • ID: post_create_discussion_comment
  • Operation: write
  • Entities: discussion, comment, team
  • Summary: The 'Create a discussion comment' API allows users to create a new comment on a team discussion within an organization on GitHub. This endpoint requires the 'write:discussion' scope for OAuth app tokens and personal access tokens. The request must include the organization name, team slug, and discussion number as path parameters, and the comment body as a required field in the request body. The response includes details about the comment, such as the author, body, creation time, and reactions. The API triggers notifications and may be subject to rate limiting if used excessively.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Discussion Comment (Legacy)

  • ID: post_create_discussion_comment_legacy
  • Operation: write
  • Entities: discussion, comment, team
  • Summary: The 'Create a Discussion Comment (Legacy)' API endpoint allows users to create a new comment on a team discussion. This endpoint is part of the GitHub Teams API and is being deprecated. It requires OAuth app tokens or personal access tokens with the 'write:discussion' scope. The request must include the team ID and discussion number as path parameters, and the comment body as a body parameter. The response includes details about the comment, such as the author, body, creation time, and reactions. Note that this endpoint triggers notifications and may be subject to rate limiting.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a GPG Key for the Authenticated User

  • ID: post_create_gpg_key_for_authenticated_user
  • Operation: write
  • Entities: gpg key, user
  • Summary: This API endpoint allows the authenticated user to create a GPG key and add it to their GitHub account. The request requires an OAuth app token or personal access token with the 'write:gpg_key' scope. The input includes headers for authentication and API versioning, and a body with a descriptive name and the GPG key in ASCII-armored format. The response includes details about the created GPG key, such as its ID, name, key ID, public key, associated emails, subkeys, and various capabilities like signing and encryption.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Hosted Compute Network Configuration for an Organization

  • ID: post_create_hosted_compute_network_configuration
  • Operation: write
  • Entities: network configuration, organization, network setting
  • Summary: This API creates a hosted compute network configuration for a specified organization. It requires OAuth app tokens or personal access tokens with the write:network_configurations scope. The request must include the organization name as a path parameter, and a JSON body with the network configuration name, compute service, and network settings IDs. The response includes the unique ID, name, compute service, network settings IDs, and creation timestamp of the network configuration.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an Issue Comment

  • ID: post_create_issue_comment
  • Operation: write
  • Entities: comment, user, issue
  • Summary: The 'Create an Issue Comment' API allows users to create comments on issues and pull requests in a GitHub repository. This endpoint requires authentication via a bearer token and accepts a JSON body containing the comment's content. The API supports various media types for the response, including raw markdown, text, and HTML representations. The request must include the repository owner, repository name, and issue number as path parameters. The response includes details about the created comment, such as its ID, URL, content, and author information. The API may trigger notifications and is subject to rate limiting.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an organization invitation

  • ID: post_create_organization_invitation
  • Operation: write
  • Entities: organization, user, invitation
  • Summary: The 'Create an organization invitation' API allows organization owners to invite people to their organization using either a GitHub user ID or an email address. The authenticated user must have 'Members' organization permissions with write access. The API endpoint triggers notifications and may be subject to rate limiting. The request requires the organization name as a path parameter and can include optional body parameters such as invitee_id, email, role, and team_ids. The response includes details about the invitation, such as the invitee's login, email, role, and the inviter's information.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an Organization Repository

  • ID: post_create_organization_repository
  • Operation: write
  • Entities: repository, user, organization
  • Summary: The 'Create an Organization Repository' API allows an authenticated user, who is a member of the specified organization, to create a new repository within that organization. The user must have appropriate permissions, and the request must include a valid OAuth or personal access token. The API accepts various parameters to customize the repository, such as its name, description, visibility, and features like issues, projects, and wikis. The response will indicate the success or failure of the repository creation.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an organization repository ruleset

  • ID: post_create_organization_repository_ruleset
  • Operation: write
  • Entities: ruleset, repository, organization
  • Summary: This API endpoint allows you to create a repository ruleset for an organization on GitHub. It requires a POST request to the specified URL with the organization name as a path parameter. The request must include headers for authentication and API versioning. The body of the request should contain details about the ruleset, including its name, target, enforcement level, bypass actors, conditions, and rules. The response will include details of the created ruleset, such as its ID, name, target, source, enforcement level, bypass actors, conditions, rules, node ID, and timestamps for creation and last update.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create an organization webhook

  • ID: post_create_organization_webhook
  • Operation: write
  • Entities: event, webhook, organization
  • Summary: The 'Create an organization webhook' API allows organization owners to create a webhook that posts payloads in JSON format. The endpoint requires the 'admin:org_hook' scope for OAuth app tokens and personal access tokens. The request includes headers for authentication and API versioning, a path parameter for the organization name, and a body with details about the webhook configuration, such as the URL, content type, events, and active status. The response includes details about the created webhook, such as its ID, URL, events, and configuration settings.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a public SSH key for the authenticated user

  • ID: post_create_public_ssh_key
  • Operation: write
  • Entities: user, token, key
  • Summary: This API endpoint allows the authenticated user to add a public SSH key to their GitHub account. It requires OAuth app tokens or personal access tokens with the write:gpg_key scope. The request must include the public SSH key and optionally a title for the key. The response includes details about the newly created key, such as its ID, URL, creation date, and verification status. The endpoint supports fine-grained access tokens with 'Git SSH keys' user permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Repository Dispatch Event

  • ID: post_create_repository_dispatch_event
  • Operation: write
  • Entities: repository, workflow, webhook
  • Summary: The 'Create a Repository Dispatch Event' API endpoint allows you to trigger a webhook event called repository_dispatch. This is useful for triggering GitHub Actions workflows or GitHub App webhooks based on activity that occurs outside of GitHub. The endpoint requires an OAuth app token or personal access token with the 'repo' scope, or a fine-grained token with 'Contents' repository permissions (write). The request includes headers for content type and authorization, path parameters for the repository owner and name, and a body with an event type and optional client payload. The response status codes include 204 for success, 404 for resource not found, and 422 for validation failure.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a repository for the authenticated user

  • ID: post_create_repository_for_authenticated_user
  • Operation: write
  • Entities: team, repository, user
  • Summary: This API endpoint allows the authenticated user to create a new repository on GitHub. The user must provide a name for the repository, and can optionally provide additional details such as a description, homepage URL, and settings for issues, projects, and wikis. The repository can be created as public or private, and various merge options can be configured. The API requires authentication via a bearer token, and the response includes detailed information about the newly created repository, including its ID, name, owner, and various URLs related to the repository.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a repository ruleset

  • ID: post_create_repository_ruleset
  • Operation: write
  • Entities: ruleset, repository, actor
  • Summary: The 'Create a repository ruleset' API allows users to create a ruleset for a specific repository on GitHub. This API requires a POST request to the endpoint '/repos/{owner}/{repo}/rulesets' with the necessary headers, path parameters, and body parameters. The headers include an optional 'accept' header for specifying the response format, and a required 'Authorization' header for authentication. The path parameters require the 'owner' and 'repo' to specify the repository. The body parameters include the 'name' of the ruleset, 'target' for the ruleset, 'enforcement' level, optional 'bypass_actors', 'conditions', and 'rules'. The response includes details of the created ruleset such as 'id', 'name', 'target', 'source', 'enforcement', 'bypass_actors', 'conditions', 'rules', 'node_id', and links to access the ruleset. The API returns a 201 status code on successful creation, and other status codes for errors.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a repository using a template

  • ID: post_create_repository_using_template
  • Operation: write
  • Entities: template, repository, user
  • Summary: This API endpoint allows users to create a new repository using a specified template repository. The user must provide the template_owner and template_repo as path parameters to identify the template repository. The request headers should include an authorization token and optionally specify the API version and accept header. The request body must include the name of the new repository and can optionally include the owner, description, whether to include all branches, and whether the repository should be private. The response includes details about the newly created repository, such as its ID, name, owner, description, and visibility.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Repository Webhook

  • ID: post_create_repository_webhook
  • Operation: write
  • Entities: event, repository, webhook
  • Summary: The 'Create a Repository Webhook' API allows users to create a webhook for a specified repository on GitHub. The API requires the repository owner's name and the repository name as path parameters. The request body must include a configuration object specifying the URL for payload delivery, and optionally, the content type, secret, SSL verification setting, events to trigger the webhook, and whether the webhook is active. The API returns a detailed response including the webhook's ID, configuration, and URLs for testing and pinging the webhook. The API requires authentication via a bearer token with 'Webhooks' repository permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create SSH Signing Key for Authenticated User

  • ID: post_create_ssh_signing_key_for_authenticated_user
  • Operation: write
  • Entities: ssh signing key, user, github account
  • Summary: This API creates an SSH signing key for the authenticated user's GitHub account. It requires OAuth app tokens or personal access tokens with the write:ssh_signing_key scope. The request must include the public SSH key to be added, and optionally a title for the key. The response includes the key, its ID, URL, title, and creation date. The API returns various HTTP status codes indicating success or specific errors.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Tag Protection State for a Repository

  • ID: post_create_tag_protection_state
  • Operation: write
  • Entities: tag, repository, protection state
  • Summary: This API creates a tag protection state for a specified repository. It is available only to repository administrators and requires a fine-grained access token with 'Administration' repository permissions set to write. The request must include the repository owner and name as path parameters, and a pattern in the body to specify the tag protection rule. The response includes details about the tag protection state, such as its ID, creation and update timestamps, enabled status, and the pattern used. Note that this operation is closing down and will be removed after August 30, 2024.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Team Discussion

  • ID: post_create_team_discussion
  • Operation: write
  • Entities: discussion, team, organization
  • Summary: The 'Create a Team Discussion' API allows users to create a new discussion post on a team's page within an organization on GitHub. This endpoint requires the 'write:discussion' scope for OAuth app tokens and personal access tokens. The request must include the organization name and team slug as path parameters, and the discussion title and body as required fields in the request body. An optional 'private' field can be set to true to restrict visibility to team members and organization owners. The API returns a detailed response including the author, body, creation time, and other metadata of the discussion post.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create a Team Discussion (Legacy)

  • ID: post_create_team_discussion_legacy
  • Operation: write
  • Entities: discussion, team, user
  • Summary: The 'Create a Team Discussion (Legacy)' API endpoint allows users to create a new discussion post on a team's page. This endpoint is part of the GitHub Teams API and is being deprecated. It requires OAuth app tokens or personal access tokens with the 'write:discussion' scope. The endpoint accepts a POST request to 'https://api.github.com/teams/{team_id}/discussions' with path parameter 'team_id' (required), headers including 'accept' (recommended), and a request body containing 'title' (required), 'body' (required), and 'private' (optional, default false). The response includes details about the created discussion, such as the author, body, creation time, and reactions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Enable or Disable a Security Feature for an Organization

  • ID: post_enable_or_disable_a_security_feature_for_an_organization
  • Operation: write
  • Entities: security feature, repository, organization
  • Summary: This API enables or disables a specified security feature for all eligible repositories in an organization. The authenticated user must be an organization owner or a member of a team with the security manager role. OAuth app tokens and personal access tokens need specific scopes to use this endpoint. The API requires path parameters including the organization name, the security feature to enable or disable, and the action to take (enable_all or disable_all). An optional body parameter, query_suite, can specify the CodeQL query suite to be used. The API returns a 204 status code on success, indicating the action has started, or a 422 status code if the action could not be taken.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Ping an Organization Webhook

  • ID: post_ping_organization_webhook
  • Operation: write
  • Entities: hook, webhook, organization
  • Summary: The 'Ping an Organization Webhook' API triggers a ping event to be sent to a specified webhook within an organization. To use this endpoint, the user must be an organization owner and possess the necessary permissions. The API requires a POST request to the specified URL with the organization name and hook ID as path parameters. The request headers must include an authorization token with the 'admin:org_hook' scope. The API returns a 204 No Content status code upon successful execution, indicating that the ping event was triggered. If the specified resource is not found, a 404 status code is returned.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Ping a Repository Webhook

  • ID: post_ping_repository_webhook
  • Operation: write
  • Entities: hook, repository, token
  • Summary: The 'Ping a Repository Webhook' API triggers a ping event to be sent to a specified webhook in a GitHub repository. It requires a POST request to the endpoint with the repository owner's name, repository name, and the unique hook ID as path parameters. The request must include an Authorization header with a valid bearer token. The API responds with a 204 No Content status code if successful, indicating that the ping event was sent. If the specified resource is not found, a 404 status code is returned. This API requires fine-grained access tokens with 'Webhooks' repository permissions set to read.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Provision and Invite a SCIM User

  • ID: post_provision_and_invite_a_scim_user
  • Operation:
  • Entities:
  • Summary: The 'Provision and Invite a SCIM User' API endpoint allows for provisioning organization membership for a user and sending an activation email to the specified email address. If the user was previously a member of the organization, the invitation will reinstate any former privileges. The API requires a POST request to the specified endpoint with the organization name as a path parameter. The request body must include the user's username, name details, and email addresses. The response includes the user's SCIM schema, unique identifier, username, display name, email addresses, active status, and metadata such as resource type, creation date, last modification date, and location.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Redeliver a delivery for an organization webhook

  • ID: post_redeliver_delivery_for_organization_webhook
  • Operation: write
  • Entities: webhook, delivery, organization
  • Summary: The 'Redeliver a delivery for an organization webhook' API allows organization owners to redeliver a webhook delivery for a specified organization. The endpoint requires the use of OAuth app tokens or personal access tokens with the 'admin:org_hook' scope. The request must include the organization name, hook ID, and delivery ID as path parameters. The response will return a status code of 202 if the redelivery attempt is accepted. The API supports fine-grained access tokens with 'Webhooks' organization permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Redeliver a delivery for a repository webhook

  • ID: post_redeliver_delivery_for_repository_webhook
  • Operation: write
  • Entities: delivery, webhook, repository
  • Summary: The 'Redeliver a delivery for a repository webhook' API allows users to redeliver a webhook delivery for a specified webhook configured in a repository. It requires a POST request to the specified endpoint with path parameters including the repository owner, repository name, hook ID, and delivery ID. The request headers must include an authorization token and can optionally specify the API version and accept header. The response will return a status code of 202 if accepted, 400 for a bad request, or 422 if validation fails or the endpoint has been spammed. The response body is empty for a successful redelivery attempt.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Review a request to access organization resources with a fine-grained personal access token

  • ID: post_review_request_access_organization_resources
  • Operation: write
  • Entities: GitHub App, personal access token, organization
  • Summary: This API endpoint allows GitHub Apps to approve or deny a pending request to access organization resources via a fine-grained personal access token. The endpoint requires the organization name and the unique identifier of the request as path parameters. The request body must include an action ('approve' or 'deny') and optionally a reason for the decision. The API responds with a 204 status code if successful, indicating no content. Other possible response codes include 403 (Forbidden), 404 (Resource not found), 422 (Validation failed), and 500 (Internal Error).
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Review Requests to Access Organization Resources with Fine-Grained Personal Access Tokens

  • ID: post_review_requests_access_organization_resources
  • Operation: write
  • Entities: GitHub App, personal access token request, organization resource
  • Summary: This API endpoint allows GitHub Apps to approve or deny multiple pending requests to access organization resources via a fine-grained personal access token. The endpoint requires the organization name as a path parameter and accepts a list of request IDs, an action (approve or deny), and an optional reason in the request body. The API responds with various HTTP status codes indicating the result of the operation, such as 202 for accepted, 403 for forbidden, 404 for resource not found, 422 for validation failed, and 500 for internal error.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Test the Push Repository Webhook

  • ID: post_test_push_repository_webhook
  • Operation: write
  • Entities: hook, repository, webhook
  • Summary: The 'Test the Push Repository Webhook' API triggers the specified webhook with the latest push to the current repository if the webhook is subscribed to push events. It requires the repository owner's name, the repository name, and the unique hook ID as path parameters. The request must include an authorization header with a bearer token. The API responds with a 204 status code if successful, indicating no content, or a 404 status code if the resource is not found. This endpoint supports GitHub App user access tokens, GitHub App installation access tokens, and fine-grained personal access tokens with 'Webhooks' repository permissions set to read.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Transfer a GitHub Repository

  • ID: post_transfer_repository
  • Operation: write
  • Entities: team, repository, owner
  • Summary: The 'Transfer a GitHub Repository' API allows users to transfer a repository from one owner to another. This is particularly useful when transferring a personal repository to another user or organization. The API requires the 'Administration' repository permissions (write) and works with GitHub App user access tokens. The request includes headers for authentication and API versioning, path parameters for specifying the repository owner and name, and a body with the new owner's username or organization name. Optionally, a new repository name and team IDs can be provided. The response includes details of the repository, such as its ID, name, owner, and permissions. The transfer process is asynchronous, and the new owner must accept the transfer request.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update Access for Fine-Grained Personal Access Token

  • ID: post_update_access_for_fine_grained_personal_access_token
  • Operation: write
  • Entities: personal access token, organization, GitHub App
  • Summary: This API endpoint allows GitHub Apps to update the access a fine-grained personal access token has to organization resources by revoking its existing access. It requires the 'Personal access tokens' organization permissions set to 'write'. The request must include the organization name and the unique identifier of the personal access token in the path parameters, and the action 'revoke' in the body. The response will return a 204 status code with no content if successful, or other status codes indicating errors such as 403 for forbidden access, 404 for resource not found, 422 for validation failure, and 500 for internal errors.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update Access to Organization Resources via Fine-Grained Personal Access Tokens

  • ID: post_update_access_to_organization_resources
  • Operation: write
  • Entities: personal access token, organization, GitHub App
  • Summary: This API endpoint allows GitHub Apps to update the access organization members have to organization resources via fine-grained personal access tokens. It is limited to revoking a token's existing access. The endpoint requires the organization name as a path parameter and a request body containing the action 'revoke' and an array of personal access token IDs. The request must include an authorization header with a bearer token. The response will have a status code of 202 if successful, indicating that the request has been accepted.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or Update Team Membership for a User

  • ID: put_add_or_update_team_membership_for_a_user
  • Operation: write
  • Entities: team, user, organization
  • Summary: This API adds or updates a user's membership in a team within an organization on GitHub. An authenticated organization owner or team maintainer can use this endpoint to add organization members to a team. If the user is not part of the organization, an invitation is sent via email. The membership will be in a 'pending' state until accepted. If the user is already a member, their role can be updated. The API requires the organization name, team slug, and username as path parameters, and optionally a role in the request body. The response includes the URL of the membership, the role, and the state of the membership.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or Update Team Membership for a User (Legacy)

  • ID: put_add_or_update_team_membership_for_a_user_legacy
  • Operation: write
  • Entities: team, user, organization
  • Summary: This API endpoint allows adding or updating a user's membership in a GitHub team. If the user is already a member of the team's organization, they will be added to the team. If the user is unaffiliated, an invitation will be sent. The authenticated user must be an organization owner or a team maintainer to perform these actions. The endpoint requires the team ID and the username as path parameters, and optionally a role in the request body. The response includes the URL of the membership, the role, and the state of the membership. Note that this endpoint is being deprecated and will be removed from the Teams API.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or update team project permissions

  • ID: put_add_or_update_team_project_permissions
  • Operation: write
  • Entities: team, project, organization
  • Summary: This API adds an organization project to a team or updates the team's permission on a project. The authenticated user must have admin permissions for the project. The project and team must be part of the same organization. The API requires the organization name, team slug, and project ID as path parameters. Optionally, a permission level (read, write, admin) can be specified in the body. The response will be a 204 No Content status if successful, or a 403 Forbidden status if the project is not owned by the organization.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or Update Team Project Permissions (Legacy)

  • ID: put_add_or_update_team_project_permissions_legacy
  • Operation: write
  • Entities: team, project, organization
  • Summary: This API endpoint allows adding or updating a team's permissions on a project within the same organization. The authenticated user must have admin permissions for the project. The endpoint requires the team_id and project_id as path parameters. The permission can be set to 'read', 'write', or 'admin'. The response status code 204 indicates success with no content, while 403 indicates forbidden access, 404 indicates resource not found, and 422 indicates validation failure or endpoint spamming.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or update team repository permissions

  • ID: put_add_or_update_team_repository_permissions
  • Operation: write
  • Entities: team, repository, organization
  • Summary: This API allows you to add a repository to a team or update the team's permission on a repository. The authenticated user must have admin access to the repository and be able to see the team. The repository must be owned by the organization or a direct fork of a repository owned by the organization. If the repository is not owned by the organization, a 422 Unprocessable Entity status will be returned. The API accepts path parameters for organization, team slug, owner, and repository name, and an optional body parameter for the permission level to grant. The response is a 204 No Content status if successful.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add or Update Team Repository Permissions (Legacy)

  • ID: put_add_or_update_team_repository_permissions_legacy
  • Operation: write
  • Entities: permission, repository, team
  • Summary: This API endpoint allows you to add a repository to a team or update the team's permission on a repository. The authenticated user must have admin access to the repository and be able to see the team. The repository must be owned by the organization or a direct fork of a repository owned by the organization. The endpoint requires path parameters for team_id, owner, and repo, and optionally a body parameter for permission. The response status codes include 204 for success, 403 for forbidden access, and 422 for validation failure. Note that this endpoint is being deprecated and will be removed from the Teams API.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add a Repository Collaborator

  • ID: put_add_repository_collaborator
  • Operation: write
  • Entities: permission, repository, collaborator
  • Summary: The 'Add a Repository Collaborator' API endpoint allows you to add a user as a collaborator to a GitHub repository. This endpoint can also be used to update the permission level of an existing collaborator. The API requires the repository owner's username, the repository name, and the collaborator's GitHub username as path parameters. Optionally, a permission level can be specified in the request body. The API supports various permission levels such as pull, triage, push, maintain, admin, or a custom role name. The response includes details about the repository invitation, including the repository, invitee, inviter, and permissions. The API is subject to rate limits and requires appropriate authentication tokens with 'Administration' repository permissions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add a Security Manager Team

  • ID: put_add_security_manager_team
  • Operation: write
  • Entities: team, security manager, organization
  • Summary: The 'Add a Security Manager Team' API allows you to add a team as a security manager for an organization on GitHub. This operation requires a fine-grained access token with 'Administration' organization permissions set to write. The API endpoint is accessed via a PUT request to 'https://api.github.com/orgs/{org}/security-managers/teams/{team_slug}', where 'org' is the organization name and 'team_slug' is the slug of the team name. The request headers should include an 'Authorization' bearer token, and it is recommended to set the 'accept' header to 'application/vnd.github+json'. The API returns a 204 No Content status code upon successful execution. Note that this operation is scheduled to be removed starting January 1, 2026, and users are advised to use the 'Organization Roles' endpoints instead.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Add Team Member (Legacy)

  • ID: put_add_team_member_legacy
  • Operation: write
  • Entities: team, member, organization
  • Summary: The 'Add Team Member (Legacy)' API endpoint allows an authenticated user, who must be an organization owner or a team maintainer, to add a member to a team within the organization. The user being added must already be a member of the organization's team. This endpoint is being deprecated, and it is recommended to use the 'Add or update team membership for a user' endpoint instead. The API requires setting the 'Content-Length' header to zero. It supports fine-grained access tokens with 'Members' organization permissions set to write. The endpoint returns a 204 status code for a successful operation, 403 if forbidden, 404 if team synchronization is set up, and 422 if the user is not a member of at least one other team in the organization.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Assign an Organization Role to a Team

  • ID: put_assign_organization_role_to_team
  • Operation: write
  • Entities: role, team, organization
  • Summary: This API assigns an organization role to a team within a specified organization. The authenticated user must be an administrator for the organization to use this endpoint. The request requires a Bearer token with the 'admin:org' scope. The endpoint accepts path parameters including the organization name ('org'), the team slug ('team_slug'), and the role ID ('role_id'). The API returns a 204 No Content status on success, a 404 status if the organization, team, or role does not exist, and a 422 status if the organization roles feature is not enabled or validation fails.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Assign an Organization Role to a User

  • ID: put_assign_organization_role_to_user
  • Operation: write
  • Entities: role, user, organization
  • Summary: This API assigns an organization role to a member of an organization. The authenticated user must be an administrator for the organization to use this endpoint. OAuth app tokens and personal access tokens (classic) need the admin:org scope. The endpoint supports GitHub App user access tokens, GitHub App installation access tokens, and fine-grained personal access tokens with 'Members' organization permissions (write). The request requires the organization name, the GitHub user account handle, and the unique identifier of the role as path parameters. The response status code 204 indicates success, while 404 indicates that the organization, user, or role does not exist, and 422 indicates that the organization roles feature is not enabled, validation failed, or the user is not an organization member.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Block a User

  • ID: put_block_a_user
  • Operation: write
  • Entities: user
  • Summary: The 'Block a User' API allows an authenticated user to block another user on GitHub. The API requires a PUT request to the endpoint '/user/blocks/{username}', where '{username}' is the GitHub handle of the user to be blocked. The request must include an 'Authorization' header with a bearer token that has 'Block another user' permissions. The 'accept' header should be set to 'application/vnd.github+json'. If successful, the API returns a 204 No Content status. Possible error responses include 304 Not Modified, 401 Requires Authentication, 403 Forbidden, 404 Resource Not Found, and 422 Validation Failed.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Block a User from an Organization

  • ID: put_block_user_from_organization
  • Operation: write
  • Entities: permission, user, organization
  • Summary: This API endpoint allows an organization to block a specified user on GitHub. It requires a PUT request to the URL 'https://api.github.com/orgs/{org}/blocks/{username}', where 'org' is the organization name and 'username' is the GitHub user handle to be blocked. The request must include an Authorization header with a bearer token that has 'Blocking users' organization permissions (write). The 'accept' header should be set to 'application/vnd.github+json'. If successful, the API returns a 204 No Content status. If the organization cannot block the user, a 422 status is returned indicating validation failure or potential spamming of the endpoint.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Convert an Organization Member to Outside Collaborator

  • ID: put_convert_organization_member_to_outside_collaborator
  • Operation: write
  • Entities: repository, outside collaborator, organization
  • Summary: This API endpoint converts an organization member to an outside collaborator. When a member is converted, they will only have access to the repositories that their current team membership allows, and they will no longer be a member of the organization. The conversion may be restricted by enterprise administrators. The endpoint requires fine-grained access tokens with 'Members' organization permissions set to write. The request can be performed asynchronously by setting the 'async' body parameter to true, which will return a 202 status code when the job is successfully queued. The path parameters include 'org' for the organization name and 'username' for the GitHub user account handle. The response status codes include 202 for asynchronous conversion, 204 for successful conversion, 403 for forbidden actions, and 404 for resource not found.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or Update a Custom Property for an Organization

  • ID: put_create_or_update_custom_property_for_organization
  • Operation: write
  • Entities: custom property, organization
  • Summary: This API endpoint allows for the creation or updating of a custom property for a specified organization. The authenticated user must have the appropriate permissions, such as being an administrator or having the 'custom_properties_org_definitions_manager' permission. The request requires path parameters for the organization name and custom property name, and a body that specifies the value type, whether the property is required, a default value, a description, and allowed values. The response includes details about the custom property, such as its name, URL, source type, value type, and other attributes.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Create or Update File Contents

  • ID: put_create_or_update_file_contents
  • Operation: write
  • Entities: file, commit, repository
  • Summary: The 'Create or Update File Contents' API allows users to create a new file or update an existing file in a GitHub repository. It requires a PUT request to the specified endpoint with path parameters for the repository owner, repository name, and file path. The request must include a commit message and the file content encoded in Base64. Optional parameters include the SHA of the file being replaced, branch name, and details of the committer and author. The response includes details of the file and commit, such as the file's path, SHA, and URLs, as well as commit information like the SHA, author, committer, and verification status.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Enable Automated Security Fixes

  • ID: put_enable_automated_security_fixes
  • Operation: write
  • Entities: security fix, repository, user
  • Summary: The 'Enable Automated Security Fixes' API enables automated security fixes for a specified repository. The authenticated user must have admin access to the repository. The API requires a fine-grained access token with 'Administration' repository permissions set to write. The request is made using the PUT method to the endpoint 'https://api.github.com/repos/{owner}/{repo}/automated-security-fixes'. The required path parameters are 'owner' and 'repo', which specify the account owner and the repository name, respectively. The request headers should include 'accept' set to 'application/vnd.github+json', 'Authorization' with a Bearer token, and optionally 'X-GitHub-Api-Version'. A successful request returns a 204 No Content status code, indicating that the automated security fixes have been enabled.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Enable Private Vulnerability Reporting for a Repository

  • ID: put_enable_private_vulnerability_reporting_for_a_repository
  • Operation: write
  • Entities: repository, user, vulnerability
  • Summary: This API enables private vulnerability reporting for a specified repository. The authenticated user must have admin access to the repository. The endpoint requires a fine-grained access token with 'Administration' repository permissions set to write. The request includes path parameters for the repository owner and name, and headers for authentication and API versioning. A successful request returns a 204 status code with no content.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Enable Vulnerability Alerts

  • ID: put_enable_vulnerability_alerts
  • Operation: write
  • Entities: vulnerability alert, dependency graph, repository
  • Summary: The 'Enable Vulnerability Alerts' API enables dependency alerts and the dependency graph for a specified repository. The authenticated user must have admin access to the repository. This API requires a fine-grained access token with 'Administration' repository permissions set to write. The request must include the 'Authorization' header with a bearer token, and it is recommended to set the 'accept' header to 'application/vnd.github+json'. The path parameters 'owner' and 'repo' are required to specify the repository. A successful request returns a 204 No Content status, indicating that the vulnerability alerts have been enabled.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Follow a GitHub User

  • ID: put_follow_a_github_user
  • Operation: write
  • Entities: permission, token, user
  • Summary: The 'Follow a GitHub User' API allows a user to follow another GitHub user by specifying the username in the path parameter. The request must include an Authorization header with a valid bearer token that has the 'user:follow' scope or appropriate fine-grained permissions. The 'accept' header should be set to 'application/vnd.github+json'. The 'Content-Length' header must be set to zero. A successful request returns a 204 No Content status, indicating the user has been followed. Other possible response codes include 304 (Not modified), 401 (Requires authentication), 403 (Forbidden), 404 (Resource not found), and 422 (Validation failed or endpoint spammed).
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Lock an Issue

  • ID: put_lock_an_issue
  • Operation: write
  • Entities: pull request, repository, issue
  • Summary: The 'Lock an Issue' API allows users with push access to lock the conversation of an issue or pull request in a GitHub repository. The API requires the repository owner's name, the repository name, and the issue number as path parameters. Optionally, a lock reason can be provided in the request body, which can be one of the following: off-topic, too heated, resolved, or spam. The request must include an authorization header with a valid bearer token. The API returns a 204 No Content status code on success, indicating that the issue has been locked. Other possible response codes include 403 Forbidden, 404 Resource not found, 410 Gone, and 422 Validation failed. The API supports fine-grained access tokens with specific permission sets.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Replace All Repository Topics

  • ID: put_replace_all_repository_topics
  • Operation: write
  • Entities: topic, repository, token
  • Summary: The 'Replace All Repository Topics' API allows users to replace all topics of a specified GitHub repository. The request requires a PUT method to the endpoint '/repos/{owner}/{repo}/topics' with path parameters 'owner' and 'repo' to specify the repository. The request body must include an array of 'names' representing the topics to be set for the repository. Headers should include an 'Authorization' token and optionally 'accept' and 'X-GitHub-Api-Version'. The response returns the updated list of topics. The API requires 'Administration' repository permissions with write access.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Set Labels for an Issue

  • ID: put_set_labels_for_an_issue
  • Operation: write
  • Entities: token, label, issue
  • Summary: The 'Set Labels for an Issue' API endpoint allows users to set new labels for a specific issue in a GitHub repository. This operation removes any previous labels and sets the new ones provided in the request. The API requires authentication via a bearer token and supports fine-grained access tokens. The request must include path parameters for the repository owner, repository name, and issue number. The body of the request should contain an array of label names to be set. The response returns an array of label objects, each containing details such as the label's ID, name, description, color, and default status.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Set Organization Membership for a User

  • ID: put_set_organization_membership_for_a_user
  • Operation: write
  • Entities: organization, user, membership
  • Summary: The 'Set Organization Membership for a User' API allows authenticated organization owners to add a member to the organization or update the member's role. When adding a member, the user receives an email invitation, and their membership status remains pending until accepted. The API supports updating a user's role to 'admin' or 'member', with notifications sent accordingly. The endpoint requires specific permissions and is subject to rate limits. The request includes headers for authentication and API versioning, path parameters for organization and username, and an optional body parameter for the role. The response provides details about the membership, organization, and user.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Set Public Organization Membership for Authenticated User

  • ID: put_set_public_organization_membership_for_authenticated_user
  • Operation: write
  • Entities: organization, user, membership
  • Summary: This API allows the authenticated user to set their membership in an organization as public. The user cannot publicize the membership for another user. The request requires the organization name and the GitHub username as path parameters. The 'accept' header should be set to 'application/vnd.github+json', and the 'Content-Length' header must be set to zero. The API requires a bearer token with 'Members' organization permissions (write) for authentication. A successful request returns a 204 No Content status, while a 403 Forbidden status indicates insufficient permissions.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update an Organization Repository Ruleset

  • ID: put_update_organization_repository_ruleset
  • Operation: write
  • Entities: ruleset, repository, organization
  • Summary: The 'Update an Organization Repository Ruleset' API allows users to update a ruleset for a specified organization on GitHub. The API requires a PUT request to the endpoint '/orgs/{org}/rulesets/{ruleset_id}' with the organization name and ruleset ID as path parameters. The request headers should include an authorization token and optionally accept the 'application/vnd.github+json' format. The request body can include parameters such as the name, target, enforcement level, bypass actors, conditions, and rules of the ruleset. The response includes details of the updated ruleset, such as its ID, name, target, enforcement level, bypass actors, conditions, rules, and timestamps for creation and last update. The API requires fine-grained access tokens with 'Administration' organization permissions set to write.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a Provisioned Organization Membership

  • ID: put_update_provisioned_organization_membership
  • Operation:
  • Entities:
  • Summary: The 'Update a Provisioned Organization Membership' API endpoint allows you to replace an existing provisioned user's information within an organization. You must provide all the necessary information for the user as if provisioning them for the first time. Any existing user information not provided will be removed. To update a specific attribute, use the 'Update an attribute for a SCIM user' endpoint instead. Required fields include userName, name, and emails. Setting active to false will remove the user from the organization and delete their external identity. The endpoint requires fine-grained access tokens with 'Members' organization permissions (write). The API accepts headers for content type and authorization, path parameters for organization and SCIM user ID, and a body with user details. The response includes user details and metadata.
  • Input Fields: Input Fields
  • Output Fields: Output Fields

Update a repository ruleset

  • ID: put_update_repository_ruleset
  • Operation: write
  • Entities: ruleset, repository, actor
  • Summary: The 'Update a repository ruleset' API allows users to update a ruleset for a specific repository on GitHub. This API requires a PUT request to the endpoint 'https://api.github.com/repos/{owner}/{repo}/rulesets/{ruleset_id}' with the necessary path parameters: 'owner', 'repo', and 'ruleset_id'. The request headers should include an 'Authorization' token and can optionally include 'accept' and 'X-GitHub-Api-Version'. The body of the request can include parameters such as 'name', 'target', 'enforcement', 'bypass_actors', 'conditions', and 'rules'. The response will include details of the updated ruleset, such as 'id', 'name', 'target', 'source_type', 'source', 'enforcement', 'bypass_actors', 'conditions', 'rules', 'node_id', '_links', 'created_at', and 'updated_at'. The API requires fine-grained access tokens with 'Administration' repository permissions set to 'write'.
  • Input Fields: Input Fields
  • Output Fields: Output Fields