Sample - GitHub REST API
PATCH/enterprises/{enterprise}/dependabot/repository-access

Updates Dependabot's repository access list for an enterprise

Updates repositories according to the list of repositories that enterprise admins have given Dependabot access to when they've updated dependencies across organizations in the enterprise.

The authenticated user must be an enterprise owner to use this endpoint.

Example request body:

{
  "repository_ids_to_add": [123, 456],
  "repository_ids_to_remove": [789]
}
  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 2 body fields
enterprisestringrequired
The slug version of the enterprise name.
repository_ids_to_addarray<integer>optional
List of repository IDs to add.
repository_ids_to_removearray<integer>optional
List of repository IDs to remove.

3 status codes
204Response
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.