Skip to content

Approve an issue suggestion

POST
/repos/{owner}/{repo}/issues/{issue_number}/suggestions/{suggestion_id}/approve

Approves a pending suggestion on an issue. Applies the proposed change (creating the corresponding timeline event), transitions the suggestion to approved, and dismisses any competing pending suggestions for the same change.

Requires triage access to the repository. Approving a suggestion also requires permission to perform the change it applies (for example, setting the issue type, adding a label or assignee, or closing the issue); this only affects fine-grained access tokens and GitHub Apps whose permissions are narrower than the triage role. This endpoint only supports issues, not pull requests.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

issue_number
required
integer

The number that identifies the issue.

suggestion_id
required
integer

The unique identifier of the suggestion.

Response

Media typeapplication/json
Issue Suggestion

An agent-proposed change to an issue that a maintainer can approve or dismiss.

object
id
required

The unique identifier of the suggestion.

integer
issue_id
required

The unique identifier of the issue the suggestion applies to.

integer
action
required

The kind of change proposed.

string
Allowed values: set_type add_label add_field add_assignee close_issue
state
required

The suggestion’s lifecycle state.

string
Allowed values: pending applied approved dismissed replaced invalidated
target_id
required

The identifier of the target the change applies to (issue type, label, field, assignee, or duplicate issue), when applicable.

integer
nullable
target_value
required
One of:
string
rationale
required

The rationale the actor provided for the suggestion.

string
nullable
confidence
required

The actor’s confidence level in the suggestion.

string
nullable
Allowed values: LOW MEDIUM HIGH
actor_id
required

The unique identifier of the actor that proposed the suggestion.

integer
nullable
issue_event_id
required

The identifier of the timeline event created when the suggestion was approved, when applicable.

integer
nullable
resolved_by
required

The unique identifier of the user who approved or dismissed the suggestion.

integer
nullable
created_at
required

The time the suggestion was created.

string format: date-time
updated_at
required

The time the suggestion was last updated.

string format: date-time
Examples
Exampledefault
{
"id": 12,
"issue_id": 4567,
"action": "add_label",
"state": "approved",
"target_id": 208045946,
"target_value": null,
"rationale": "This looks like a bug report based on the stack trace in the description.",
"confidence": "HIGH",
"actor_id": 41898282,
"issue_event_id": 6430295168,
"resolved_by": 583231,
"created_at": "2026-06-01T14:20:00Z",
"updated_at": "2026-06-01T15:05:00Z"
}

Forbidden

Media typeapplication/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media typeapplication/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Examplegenerated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media typeapplication/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Examplegenerated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}