apicheats.dev github/llms.txt Raw .md
PATCH

PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number} — GitHub API

GitHub token (required); https://api.github.com

GitHub API

Update a Dependabot alert

Base URL
https://api.github.com
Auth
Authorization: Bearer <GITHUB_API_KEY>
Last verified
2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 387 tokens · Vary: Accept

Critical gotchas

GitHub recommends an Accept: application/vnd.github+json header and an explicit X-GitHub-Api-Version header.

Fine-grained tokens only authorize repositories and permissions selected when the token is created.

cURL

curl -X PATCH 'https://api.github.com/repos/example-owner/example-repo/dependabot/alerts/10' \  -H "Authorization: Bearer $GITHUB_TOKEN" \  -H 'Accept: application/vnd.github+json' \  -H 'X-GitHub-Api-Version: 2026-03-10' \  -H 'Content-Type: application/json' \  -d '{  "state": "dismissed"}'

Parameters

Name In Type Required Description
owner path string Yes The account owner of the repository. The name is not case sensitive.
repo path string Yes The name of the repository without the `.git` extension. The name is not case sensitive.
alert_number path integer Yes The number that identifies a Dependabot alert in its repository. You can find this at the end of the URL for a Dependabot alert within GitHub, or in `number` fields in the response from the `GET /repos/{owner}/{repo}/dependabot/alerts` operation.
state body string Yes The state of the Dependabot alert. A `dismissed_reason` must be provided when setting the state to `dismissed`.
dismissed_reason body string No **Required when `state` is `dismissed`.** A reason for dismissing the alert.
dismissed_comment body string No An optional comment associated with dismissing the alert.
assignees body string[] No Usernames to assign to this Dependabot Alert. Pass one or more user logins to _replace_ the set of assignees on this alert. Send an empty array (`[]`) to clear all assignees from the alert. To assign an AI agent, include the bot login (for example, `copilot-swe-agent[bot]`).
agent_assignment body object No Parameters for AI agent assignment. Only used when an agent bot login is included in `assignees`. Ignored when no agent is being assigned.

Response 200 OK

{
  "number": 0,
  "state": "auto_dismissed",
  "dependency": {
    "package": {
      "ecosystem": "string",
      "name": "string"
    },
    "manifest_path": "string",
    "version_requirement": "string",
    "scope": "development",
    "relationship": "unknown"
  },
  "security_advisory": {
    "ghsa_id": "string",
    "cve_id": "string",
    "summary": "string",
    "description": "string",
    "vulnerabilities": [
      {
        "package": {
          "ecosystem": "string",
          "name": "string"
        },
        "severity": "low",
        "vulnerable_version_range": "string",
        "first_patched_version": {
          "identifier": "string"
        }
      }
    ],
    "severity": "low",
    "classification": "general",
    "cvss_severities": {
      "cvss_v3": {
        "vector_string": "string",
        "score": 0
      },
      "cvss_v4": {
        "vector_string": "string",
        "score": 0
      }
    },
    "epss": {
      "percentage": 0,
      "percentile": 0
    },
    "cwes": [
      {
        "cwe_id": "string",
        "name": "string"
      }
    ],
    "identifiers": [
      {
        "type": "CVE",
        "value": "string"
      }
    ],
    "references": [
      {
        "url": "https://example.com"
      }
    ],
    "published_at": "2026-09-03T00:00:00Z",
    "updated_at": "2026-09-03T00:00:00Z",
    "withdrawn_at": "2026-09-03T00:00:00Z"
  },
  "security_vulnerability": {
    "package": {
      "ecosystem": "string",
      "name": "string"
    },
    "severity": "low",
    "vulnerable_version_range": "string",
    "first_patched_version": {
      "identifier": "string"
    }
  },
  "url": "https://example.com",
  "html_url": "https://example.com",
  "created_at": "2026-09-03T00:00:00Z",
  "updated_at": "2026-09-03T00:00:00Z",
  "dismissed_at": "2026-09-03T00:00:00Z",
  "dismissed_by": {
    "name": "string",
    "email": "string",
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "site_admin": true,
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "dismissed_reason": "fix_started",
  "dismissed_comment": "string",
  "fixed_at": "2026-09-03T00:00:00Z",
  "auto_dismissed_at": "2026-09-03T00:00:00Z",
  "dismissal_request": {
    "id": 0,
    "status": "pending",
    "requester": {
      "id": 0,
      "login": "string"
    },
    "created_at": "2026-09-03T00:00:00Z",
    "url": "https://example.com"
  },
  "assignees": [
    {
      "name": "string",
      "email": "string",
      "login": "octocat",
      "id": 1,
      "node_id": "MDQ6VXNlcjE=",
      "avatar_url": "https://github.com/images/error/octocat_happy.gif",
      "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
      "url": "https://api.github.com/users/octocat",
      "html_url": "https://github.com/octocat",
      "followers_url": "https://api.github.com/users/octocat/followers",
      "following_url": "https://api.github.com/users/octocat/following{/other_user}",
      "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
      "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
      "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
      "organizations_url": "https://api.github.com/users/octocat/orgs",
      "repos_url": "https://api.github.com/users/octocat/repos",
      "events_url": "https://api.github.com/users/octocat/events{/privacy}",
      "received_events_url": "https://api.github.com/users/octocat/received_events",
      "type": "User",
      "site_admin": true,
      "starred_at": "\"2020-07-09T00:17:55Z\"",
      "user_view_type": "public"
    }
  ]
}
Get a free GitHub API key → sponsored

Affiliate link - we may earn a commission, at no extra cost to you.