エージェント自動化用の REST API エンドポイント
REST API を使用してエージェントの自動化を管理します。
List automations for user
Note
This endpoint is in public preview and is subject to change.
Lists automations created by the authenticated user across repositories they can read. This includes both personal and shared automations created by the caller, but excludes shared automations created by another user.
Use the repository-scoped list operation for those automations. The type filter
only narrows this creator-scoped collection.
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List automations for user"
This endpoint works with the following fine-grained token types:
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
GitHub App installation access tokens are not supported for this endpoint.
"List automations for user" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
page integer The page number of the results to fetch. デフォルト: |
per_page integer The number of results per page (max 100). デフォルト: |
type string Filter automations by type. 次のいずれかにできます: |
"List automations for user" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Automations retrieved successfully |
400 | Bad request |
401 | Authentication required |
"List automations for user" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/automationsAutomations retrieved successfully
Status: 200[
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"repository": {
"id": 123456,
"owner": "octo-org",
"name": "octo-repo"
},
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}
]List automations for a repository
Note
This endpoint is in public preview and is subject to change.
Returns a paginated list of automations for a repository, including shared
automations and personal automations created by the caller.
total_count is the number of caller-visible automations matching the supplied
filters across all pages. Use the type field to distinguish personal and shared
automations.
GitHub App installation access tokens can list shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List automations for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
"List automations for a repository" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
| 名前, タイプ, 説明 |
|---|
page integer The page number of the results to fetch. デフォルト: |
per_page integer The number of results per page (max 100). デフォルト: |
type string Filter automations by type. 次のいずれかにできます: |
"List automations for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Automations retrieved successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
"List automations for a repository" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automationsAutomations retrieved successfully
Status: 200{
"automations": [
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
},
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "Nightly dependency sweep",
"enabled": true,
"type": "shared",
"require_actor_write_permission": false,
"triggers": {
"interval": {
"cadence": [
"daily"
],
"hour_utc": 3
}
},
"created_at": "2026-05-02T09:00:00Z",
"updated_at": "2026-05-04T11:15:00Z",
"created_by": {
"id": 456
}
}
],
"total_count": 3
}Create an automation for a repository
Note
This endpoint is in public preview and is subject to change.
Creates a new automation in a repository. Personal automations are private to their creator. Shared automations are visible to anyone with read access to the repository and manageable by anyone with write access to the repository.
GitHub App installation access tokens can create shared automations by setting
type to shared. The installation must belong to the repository owner and
the token must have "Agent tasks"
repository permissions (write). Personal automations require a user token.
For installation tokens, created_by identifies the App's bot account.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Create an automation for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
"Create an automation for a repository" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
| 名前, タイプ, 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name string 必須The name of the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triggers object Trigger configuration for the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties of |
| 名前, タイプ, 説明 | |||||||
|---|---|---|---|---|---|---|---|
interval object | |||||||
Properties of |
| 名前, タイプ, 説明 |
|---|
cadence array of strings 必須One or more schedules on which the Automation runs.
Supported values are: |
hour_utc integer UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to |
day_of_week integer UTC weekday anchor for weekly schedules, where |
minute_utc integer UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to デフォルト: 次のいずれかにできます: |
write_scope string Has no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them. 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_opened object Properties of issue_opened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_labeled object Properties of issue_labeled
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
workflow_run object Properties of workflow_run
| 名前, タイプ, 説明 |
|---|
workflows array of strings 必須Workflow names matched against the name in each workflow YAML file. |
conclusions array of strings 必須Workflow conclusions to match. The current trigger supports failure.
Supported values are: |
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_opened object Properties of pull_request_opened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_synchronize object Properties of pull_request_synchronize
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merged object Properties of pull_request_merged
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_comment object Properties of issue_comment
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_comment object Properties of pull_request_comment
| 名前, タイプ, 説明 |
|---|
comment_types array of strings 必須Pull request conversation and inline review comment types to match.
Supported values are: |
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_opened object Properties of discussion_opened
| 名前, タイプ, 説明 |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_updated object Properties of discussion_updated
| 名前, タイプ, 説明 |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_comment object Properties of discussion_comment
| 名前, タイプ, 説明 |
|---|
comment_types array of strings Top-level discussion comments and replies to match. Omit to match both.
Supported values are: |
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_assigned object Properties of issue_assigned
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_assigned object Properties of pull_request_assigned
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
sub_issue_added object Properties of sub_issue_added
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_ready_for_review object Properties of pull_request_ready_for_review
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_labeled object Properties of pull_request_labeled
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merge_conflict object Properties of pull_request_merge_conflict
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_submitted object Properties of pull_request_review_submitted
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
states array of strings 必須Submitted review states to match.
Supported values are: |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_requested object Properties of pull_request_review_requested
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_closed object Properties of issue_closed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_reopened object Properties of issue_reopened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_closed object Properties of pull_request_closed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_reopened object Properties of pull_request_reopened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_converted_to_draft object Properties of pull_request_converted_to_draft
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_dismissed object Properties of pull_request_review_dismissed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_resolved object Properties of pull_request_review_thread_resolved
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_unresolved object Properties of pull_request_review_thread_unresolved
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_completed object Properties of automation_completed
| 名前, タイプ, 説明 |
|---|
automation_ids array of strings 必須Upstream Automation IDs in the same repository. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_failed object Properties of automation_failed
| 名前, タイプ, 説明 |
|---|
automation_ids array of strings 必須Upstream Automation IDs in the same repository. An Automation cannot list itself, and a user-owned Automation can only be listed by its creator's user-owned Automations. |
reasons array of strings Failure reasons to match. Omit to match only reported failures.
Supported values are: |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
code_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of code_scanning_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
secret_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of secret_scanning_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
dependabot_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of dependabot_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
prompt string 必須The prompt for the automation.
model string The model to use for sessions triggered by this automation. Omit or leave empty to let the platform select the model.
reasoning_effort string The reasoning effort to use for sessions triggered by this automation. Omit or leave empty to use the model's default.
tools array of strings The tools available to the automation.
enabled boolean Whether the automation should be created enabled. Defaults to true when omitted.
デフォルト: true
type string The type of automation, fixed at creation. personal keeps it private to its creator and its runs act as that user. shared makes it belong to the repository, visible to anyone with read access to the repository and maintainable by anyone with write access to the repository, and its runs act as the Copilot app rather than as a person. shared is rejected when repository ownership is not available for the repository. Supported values: personal, shared. Defaults to personal.
デフォルト: personal
次のいずれかにできます: personal, shared
require_actor_write_permission boolean When true, event-triggered runs require the event actor to have repo write permission, even when the org's allow_read_access_triggers policy is enabled. When policy validation is enabled, explicitly setting false returns 422 if effective organization or repository policy disallows read-access triggers. If omitted, defaults to false when policy permits read-access triggers, otherwise true. The actor requirement does not apply to interval-scheduled runs, which always run as the automation owner.
continuous_history boolean When true, runs of this automation build on the session history of its previous runs, and runs of the same automation are serialized. Not tracked in revision history. Defaults to false.
"Create an automation for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
201 | Automation created successfully |
400 | Bad request |
401 | Authentication required |
403 | Insufficient permissions |
404 | Resource not found |
422 | Validation Failed |
"Create an automation for a repository" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations \
-d '{"name":"Issue triage","type":"personal","triggers":{"issue_opened":{"query":"is:open"}},"prompt":"Inspect the new issue and suggest labels, priority, and next steps.","tools":["github/get_file_contents","github/issue_read"],"model":"gpt-6-sol","reasoning_effort":"high"}'Automation created successfully
Status: 201{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"tools": [
"github/get_file_contents",
"github/issue_read"
],
"model": "gpt-6-sol",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-01T12:00:00Z",
"created_by": {
"id": 123
}
}List available automation tools for a repository
Note
This endpoint is in public preview and is subject to change.
Lists available tools for automations in a repository, including both GitHub-provided tools and tools provided by custom MCP servers.
GitHub-provided tools are returned in named groups, with a name and description provided for each tool.
MCP entries describe configured tool selection, not live discovery or runtime
availability. An explicit allowlist is returned in tools, with each id in
<server-name>/<tool-name> format, for example sentry/list_issues. An allowlist of
["*"] is returned as supports_wildcard: true with an empty tools array. Server URLs,
authentication headers, environment variables, and credentials are never returned.
For MCP tools, a list of configured MCP servers is provided, along with
the tools allowlisted for each server. Where supports_wildcard is true,
any tool that exists on the server can be used.
GitHub App installation access tokens can list available automation tools. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read).
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List available automation tools for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
"List available automation tools for a repository" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
"List available automation tools for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Repository automation tool catalog retrieved successfully |
401 | Authentication required |
404 | Repository not found, inaccessible, or automations unavailable |
"List available automation tools for a repository" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/available-toolsRepository automation tool catalog retrieved successfully
Status: 200{
"tool_groups": [
{
"id": "issues",
"title": "Issues",
"tools": [
{
"id": "github/issue_read",
"title": "Read issue",
"description": "Fetch a single issue by its number, including its title, body, state, labels, assignees, and other metadata.",
"scope": "read"
}
]
}
],
"mcp_servers": [
{
"name": "jira",
"tools": [
{
"id": "jira/search"
},
{
"id": "jira/get_issue"
}
],
"supports_wildcard": false
},
{
"name": "sentry",
"tools": [],
"supports_wildcard": true
}
]
}List available automation triggers for a repository
Note
This endpoint is in public preview and is subject to change.
Lists available triggers for automations in a repository.
Each available trigger includes a title and description that can be presented in user interfaces, plus a machine-readable schema of filters supported by the trigger.
GitHub App installation access tokens can list available automation triggers. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read).
To call this endpoint, OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "List available automation triggers for a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
"List available automation triggers for a repository" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
"List available automation triggers for a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Available automation triggers retrieved successfully |
401 | Authentication required |
404 | Repository not found, inaccessible, or automations unavailable |
"List available automation triggers for a repository" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/available-triggersAvailable automation triggers retrieved successfully
Status: 200[
{
"id": "issue_opened",
"title": "Issue opened",
"description": "Runs when an issue is opened.",
"fields": [
{
"id": "query",
"label": "Issue query",
"required": false,
"description": "Only run for issues matching this query, using [issue search syntax](https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/filtering-and-searching-issues-and-pull-requests).",
"schema": {
"type": "string",
"minLength": 1
}
},
{
"id": "write_scope",
"label": "Write scope",
"required": false,
"description": "Override the Automation `write_scope` for runs started by this trigger. If omitted, the automation's `write_scope` is used. Organization or repository policy may restrict the effective scope to `trigger`. Explicitly setting `repository` on create or edit returns 422 when policy validation is enabled and that policy applies.",
"schema": {
"type": "string",
"enum": [
"trigger",
"repository"
]
}
}
]
}
]Get an automation
Note
This endpoint is in public preview and is subject to change.
Fetches a repository automation by ID. The automation must be a personal automation belonging to you or a shared automation.
Shared automations are visible to anyone with read access to the repository.
The created_by field identifies the creator and is distinct from the automation's
type.
GitHub App installation access tokens can access shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Get an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
"Get an automation" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
automation_id string 必須The unique identifier of the automation. |
"Get an automation" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Automation retrieved successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
"Get an automation" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_IDAutomation retrieved successfully
Status: 200{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage",
"enabled": true,
"type": "shared",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}Update an automation
Note
This endpoint is in public preview and is subject to change.
Updates an existing automation in a repository. The automation
must be a personal automation belonging to you or a shared automation.
Omitted fields are left unchanged. The automation's type is immutable.
GitHub App installation access tokens can update shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Update an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
"Update an automation" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
automation_id string 必須The unique identifier of the automation. |
| 名前, タイプ, 説明 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
name string The name of the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
enabled boolean Set to true to enable, false to disable. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
require_actor_write_permission boolean When true, event-triggered runs require the event actor to have repo write permission, even when the org's allow_read_access_triggers policy is enabled. When policy validation is enabled, explicitly setting false returns 422 if effective organization or repository policy disallows read-access triggers. The actor requirement does not apply to interval-scheduled runs, which always run as the automation owner. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
continuous_history boolean When true, runs of this automation build on the session history of its previous runs, and runs of the same automation are serialized. Not tracked in revision history. Omit to leave unchanged. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
model string The model to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and let the platform select the model. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
reasoning_effort string The reasoning effort to use for sessions triggered by this automation. Omit to leave unchanged. Send an empty string to clear the override and use the model's default. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
triggers object Trigger configuration for the automation. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Properties of |
| 名前, タイプ, 説明 | |||||||
|---|---|---|---|---|---|---|---|
interval object | |||||||
Properties of |
| 名前, タイプ, 説明 |
|---|
cadence array of strings 必須One or more schedules on which the Automation runs.
Supported values are: |
hour_utc integer UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to |
day_of_week integer UTC weekday anchor for weekly schedules, where |
minute_utc integer UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to デフォルト: 次のいずれかにできます: |
write_scope string Has no effect: scheduled runs can change any resource in the repository, and an organization or repository policy requiring trigger-scoped writes does not apply to them. 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_opened object Properties of issue_opened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_labeled object Properties of issue_labeled
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
workflow_run object Properties of workflow_run
| 名前, タイプ, 説明 |
|---|
workflows array of strings 必須Workflow names matched against the name in each workflow YAML file. |
conclusions array of strings 必須Workflow conclusions to match. The current trigger supports failure.
Supported values are: |
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_opened object Properties of pull_request_opened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_synchronize object Properties of pull_request_synchronize
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merged object Properties of pull_request_merged
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_comment object Properties of issue_comment
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_comment object Properties of pull_request_comment
| 名前, タイプ, 説明 |
|---|
comment_types array of strings 必須Pull request conversation and inline review comment types to match.
Supported values are: |
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_opened object Properties of discussion_opened
| 名前, タイプ, 説明 |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_updated object Properties of discussion_updated
| 名前, タイプ, 説明 |
|---|
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
discussion_comment object Properties of discussion_comment
| 名前, タイプ, 説明 |
|---|
comment_types array of strings Top-level discussion comments and replies to match. Omit to match both.
Supported values are: |
categories array of strings Discussion category names matched case-insensitively. |
body_substring string A case-insensitive substring matched against the event body. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_assigned object Properties of issue_assigned
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_assigned object Properties of pull_request_assigned
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
assignees array of strings Affected assignee logins matched case-insensitively. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
sub_issue_added object Properties of sub_issue_added
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_ready_for_review object Properties of pull_request_ready_for_review
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_labeled object Properties of pull_request_labeled
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
labels array of strings Label names matched case-insensitively against the label added by the event. Omit or use an empty array to match every added label. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_merge_conflict object Properties of pull_request_merge_conflict
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_submitted object Properties of pull_request_review_submitted
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
states array of strings 必須Submitted review states to match.
Supported values are: |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_requested object Properties of pull_request_review_requested
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_closed object Properties of issue_closed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
issue_reopened object Properties of issue_reopened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_closed object Properties of pull_request_closed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_reopened object Properties of pull_request_reopened
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_converted_to_draft object Properties of pull_request_converted_to_draft
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_dismissed object Properties of pull_request_review_dismissed
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_resolved object Properties of pull_request_review_thread_resolved
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
pull_request_review_thread_unresolved object Properties of pull_request_review_thread_unresolved
| 名前, タイプ, 説明 |
|---|
query string A GitHub issue or pull request search query. |
paths array of strings Gitignore-style changed-file path globs. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_completed object Properties of automation_completed
| 名前, タイプ, 説明 |
|---|
automation_ids array of strings 必須Upstream Automation IDs in the same repository. |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
automation_failed object Properties of automation_failed
| 名前, タイプ, 説明 |
|---|
automation_ids array of strings 必須Upstream Automation IDs in the same repository. An Automation cannot list itself, and a user-owned Automation can only be listed by its creator's user-owned Automations. |
reasons array of strings Failure reasons to match. Omit to match only reported failures.
Supported values are: |
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
code_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of code_scanning_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
secret_scanning_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of secret_scanning_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
dependabot_alert object Runs on the default branch when a security alert of this kind is created in the repository. These are system events without an issue, pull request, or human actor, and cannot be run manually.
Properties of dependabot_alert
| 名前, タイプ, 説明 |
|---|
write_scope string Override the Automation 次のいずれかにできます: |
allow_copilot_triggers boolean When true, events Copilot creates, including from other automations and Copilot sessions, can start this automation through this trigger. Defaults to false. The Copilot coding agent app cannot turn it on: creating a trigger with true, or changing it from false to true, returns 422. |
prompt string The prompt for the automation.
tools array of strings The tools available to the automation. Send an empty array to clear all tools.
"Update an automation" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Automation updated successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
422 | Validation Failed |
"Update an automation" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-X PATCH \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID \
-d '{"name":"Issue triage and prioritization","enabled":true,"model":"gpt-5.4","reasoning_effort":"high","triggers":{"issue_opened":{"query":"is:open label:auto-triage"}}}'Automation updated successfully
Status: 200{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"name": "Issue triage and prioritization",
"enabled": true,
"type": "personal",
"require_actor_write_permission": false,
"triggers": {
"issue_opened": {
"query": "is:open label:auto-triage"
}
},
"prompt": "Inspect the new issue and suggest labels, priority, and next steps.",
"model": "gpt-5.4",
"reasoning_effort": "high",
"created_at": "2026-05-01T12:00:00Z",
"updated_at": "2026-05-03T14:30:00Z",
"created_by": {
"id": 123
}
}Delete an automation
Note
This endpoint is in public preview and is subject to change.
Deletes an automation in a repository. The automation must be a personal automation belonging to you or a shared automation.
GitHub App installation access tokens can delete shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
To call this endpoint, you must have write access to the repository and the "Allow automations" setting must be enabled for the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Delete an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
"Delete an automation" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
automation_id string 必須The unique identifier of the automation. |
"Delete an automation" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
204 | Automation deleted successfully |
400 | Bad request |
401 | Authentication required |
404 | Resource not found |
"Delete an automation" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-X DELETE \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_IDAutomation deleted successfully
Status: 204List tasks for an automation in a repository
Note
This endpoint is in public preview and is subject to change.
Returns a paginated list of tasks created by an automation in the specified repository. The automation must belong to that exact repository.
User-owned automation history is visible only to the automation's creator. Repository-owned automation history is visible to callers with read access to repository automations. Deleted and unlisted tasks are excluded. Tasks produced by private-session agents are excluded unless the caller created the task, is a task collaborator, or the task is shared.
A missing repository, an inaccessible repository, or an automation that does not
belong to the specified repository returns 404 without revealing which condition
occurred.
GitHub App installation access tokens can list tasks for shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (read). Personal automations require a user token.
Fine-grained access tokens for "List tasks for an automation in a repository"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (read)
"List tasks for an automation in a repository" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
automation_id string 必須The unique identifier of the automation. |
| 名前, タイプ, 説明 |
|---|
per_page integer The number of results per page (max 100). デフォルト: |
page integer The page number of the results to fetch. デフォルト: |
sort string The field to sort results by. Can be デフォルト: 次のいずれかにできます: |
direction string The direction to sort results. Can be デフォルト: 次のいずれかにできます: |
state string Comma-separated list of task states to filter by. Can be any combination of: |
is_archived boolean Filter by archived status. When デフォルト: |
"List tasks for an automation in a repository" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
200 | Automation task history retrieved successfully |
401 | Authentication required |
404 | Repository or automation not found, inaccessible, or unavailable |
422 | Validation failed |
"List tasks for an automation in a repository" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID/tasksAutomation task history retrieved successfully
Status: 200{
"tasks": [
{
"id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"name": "Triage issue #42",
"creator": {
"id": 123
},
"creator_type": "user",
"repository": {
"id": 1296269
},
"state": "completed",
"session_count": 1,
"artifacts": [],
"archived_at": null,
"created_at": "2026-05-02T12:00:00Z",
"updated_at": "2026-05-02T12:05:00Z"
}
]
}Run an automation
Note
This endpoint is in public preview and is subject to change.
Runs an automation in a repository. Set event to manual and optionally include
context of up to 10,000 characters, which will be injected into the automation's
prompt.
The repository must have the "Allow automations" setting enabled, and the automation must be a personal automation belonging to you or a shared automation.
GitHub App installation access tokens can run shared automations. The installation must belong to the repository owner and the token must have "Agent tasks" repository permissions (write). Personal automations require a user token.
A successful response accepts the run request and includes a preallocated
task_id, which can be fetched with the "Get a task by repo" Agent tasks API.
It does not confirm execution or task creation. Task creation is asynchronous,
so fetching the task immediately may return 404 Not Found, and downstream
skips or failures can prevent its creation.
To call this endpoint, you must have write access to the repository.
OAuth app tokens and personal access tokens (classic) need:
- the
reposcope for private or internal repositories - the
reposcope orpublic_reposcope for public repositories
Fine-grained access tokens for "Run an automation"
This endpoint works with the following fine-grained token types:
- GitHub App user access tokens
- GitHub App installation access tokens
- Fine-grained personal access tokens
The fine-grained token must have the following permission set:
- "Agent tasks" repository permissions (write)
"Run an automation" のパラメーター
| 名前, タイプ, 説明 |
|---|
accept string Setting to |
| 名前, タイプ, 説明 |
|---|
owner string 必須The account owner of the repository. The name is not case sensitive. |
repo string 必須The name of the repository. The name is not case sensitive. |
automation_id string 必須The unique identifier of the automation. |
| 名前, タイプ, 説明 |
|---|
event string 必須The event to trigger. Only 価値: |
context string Additional context for this automation run, up to 10,000 characters. Supported only when |
"Run an automation" の HTTP 応答状態コード
| 状態コード | 説明 |
|---|---|
202 | Automation run request accepted for asynchronous processing |
400 | Bad request |
401 | Authentication required |
403 | Insufficient permissions |
404 | Resource not found |
409 | Automation usage limit reached for the current period |
422 | Validation failed |
503 | Service unavailable |
"Run an automation" のコード サンプル
GHE.com でGitHubにアクセスする場合は、api.github.com を、api.SUBDOMAIN.ghe.com にある企業の専用サブドメインに置き換えます。
要求の例
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer <YOUR-TOKEN>" \
-H "X-GitHub-Api-Version: 2026-03-10" \
https://api.github.com/agents/repos/OWNER/REPO/automations/AUTOMATION_ID/tasks \
-d '{"event":"manual","context":"New Sentry issue detected: https://contoso.sentry.io/issues/7796648726"}'Automation run request accepted for asynchronous processing
Status: 202{
"task_id": "6f7b2fd5-bc70-4f55-befe-8653bd76045f",
"automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"event": "manual"
}