REST API endpoints for Dependabot alerts

Use the REST API to interact with Dependabot alerts for a repository.

Note

The ability to use the REST API to manage Dependabot alerts is currently in public preview and subject to change.

About Dependabot alerts

You can view Dependabot alerts for a repository and update individual alerts with the REST API. For more information, see Dependabot alerts.

Note

Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.

List Dependabot alerts for an enterprise

GET /enterprises/{enterprise}/dependabot/alerts

Lists Dependabot alerts for repositories that are owned by the specified enterprise.
The authenticated user must be a member of the enterprise to use this endpoint.
Alerts are only returned for organizations in the enterprise for which you are an organization owner or a security manager. For more information about security managers, see "Managing security managers in your organization."
OAuth app tokens and personal access tokens (classic) need the repo or security_events scope to use this endpoint.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/enterprises/ENTERPRISE/dependabot/alerts

Response schema (Status: 200):

Array of objects:

List Dependabot alerts for an organization

GET /orgs/{org}/dependabot/alerts

Lists Dependabot alerts for an organization.
The authenticated user must be an owner or security manager for the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/orgs/ORG/dependabot/alerts

Response schema (Status: 200):

Same response schema as List Dependabot alerts for an enterprise.

List Dependabot alerts for a repository

GET /repos/{owner}/{repo}/dependabot/alerts

OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/dependabot/alerts

Response schema (Status: 200):

Array of objects:

Get a Dependabot alert

GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}

OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/dependabot/alerts/ALERT_NUMBER

Response schema (Status: 200):

Update a Dependabot alert

PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}

The authenticated user must have access to security alerts for the repository to use this endpoint. For more information, see "Granting access to security alerts."
OAuth app tokens and personal access tokens (classic) need the security_events scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the public_repo scope instead.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PATCH \
  https://api.github.com/repos/OWNER/REPO/dependabot/alerts/ALERT_NUMBER \
  -d '{
  "state": "dismissed",
  "dismissed_reason": "tolerable_risk",
  "dismissed_comment": "This alert is accurate but we use a sanitizer."
}'

Response schema (Status: 200):

Same response schema as Get a Dependabot alert.