Skip to main content
Skip to content

REST API endpoints for agent automations

Use the REST API to manage agent automations.

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 repo scope.

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.

Parameters for "List automations for user"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Query parameters
Name, Type, Description
page integer

The page number of the results to fetch.

Default: 1

per_page integer

The number of results per page (max 100).

Default: 30

type string

Filter automations by type. personal returns automations owned by their creator, shared returns automations owned by the repository. Omit to return both.

Can be one of: personal, shared

HTTP response status codes for "List automations for user"

Status codeDescription
200

Automations retrieved successfully

400

Bad request

401

Authentication required

Code samples for "List automations for user"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/automations
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/automations

Automations 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" } }, "tools": [ "github/issue_read" ], "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 automation tags in a repository

Note

This endpoint is in public preview and is subject to change.

Lists active automation tags the authenticated caller can see in a repository. Visibility filtering happens before total_count and pagination, so neither includes hidden tags. Tags are ordered by stable ID. An empty catalog returns tags: [] and total_count: 0.

Follow the Link header to retrieve subsequent pages. Offset pages are not snapshots across concurrent writes. This operation does not change automation membership or the flat automation list; untagged automations remain valid.

Fine-grained access tokens for "List automation tags in a repository"

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.

Parameters for "List automation tags in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

Query parameters
Name, Type, Description
page integer

The page number of the results to fetch.

Default: 1

per_page integer

The number of results per page (max 100).

Default: 30

HTTP response status codes for "List automation tags in a repository"

Status codeDescription
200

Caller-visible active tags retrieved.

400

The request contains invalid pagination parameters or a body that could not be decoded.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, deleted, outside this scope, inaccessible, or feature-disabled. Public endpoint and rollout gates return no response body. Other cases return the documented JSON error.

408

The read request timed out.

422

A request parameter or field is invalid.

429

The read request was rate limited.

503

Automation tag storage or policy is unavailable.

Code samples for "List automation tags in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request examples

get/agents/repos/{owner}/{repo}/automation-tags
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/automation-tags

Caller-visible active tags retrieved.

Status: 200
{ "tags": [ { "id": "tag-1", "name": "Release", "description": "Release automations", "version": "1", "created_at": "2026-05-01T12:00:00Z", "updated_at": "2026-05-03T14:30:00Z" } ], "total_count": 1 }

Create an automation tag in a repository

Note

This endpoint is in public preview and is subject to change.

Creates an automation tag in a repository without assigning an automation or changing automation permissions.

Supply an idempotency_key for each logical create. A retry by the same caller with the same key returns the stored tag with status 201 and its current display fields. Different display fields in a retry do not update the tag. Completed creates can be replayed subject to the same authentication, authorization, and discovery checks.

Display names are not unique. A new key creates a new tag even when the name matches. Reusing a key after its tag was deleted returns 409.

Fine-grained access tokens for "Create an automation tag in a repository"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

GitHub App installation access tokens are not supported for this endpoint.

Parameters for "Create an automation tag in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

Body parameters
Name, Type, Description
name string Required

Display name for the new tag.

description string

Description of the new tag. Omit for an empty description.

idempotency_key string Required

Caller-generated key, 1-256 bytes of UTF-8, that names one logical create, such as a random UUID. When a create's outcome is unknown, retry with the same key: the retry returns the stored tag with its current display fields, even if the retry supplies a different name or description. It does not update the tag. Keys are scoped to the caller and repository. A new key creates a new tag, even when the name matches an existing one. Reusing a key after its tag was deleted returns 409.

HTTP response status codes for "Create an automation tag in a repository"

Status codeDescription
201

Tag created, or the tag an earlier request with the same idempotency_key created; no automation has been assigned.

400

The request body could not be decoded. Field values that fail validation return 422.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, outside this scope, inaccessible, or feature-disabled. Public endpoint and rollout gates return no response body. Other cases return the documented JSON error.

408

The create may have completed. Retry with the same idempotency_key to retrieve the tag created by the original request.

409

No write was made. The code automation_tag_deleted means the tag this idempotency_key created has since been deleted; use a new idempotency_key. Other conflict codes mean the request conflicts with stored state; read the current state before retrying.

422

A request parameter or field is invalid.

429

The request was rate limited. Retry with the same idempotency_key to avoid creating a duplicate.

500

An unexpected failure occurred.

503

Automation tagging is temporarily unavailable.

Code samples for "Create an automation tag in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

post/agents/repos/{owner}/{repo}/automation-tags
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/automation-tags \ -d '{"name":"Maintenance","description":"Repository maintenance automations.","idempotency_key":"3f0c9b52-4d1e-4b8a-9c57-0d6f2a1e8b90"}'

Tag created, or the tag an earlier request with the same idempotency_key created; no automation has been assigned.

Status: 201
{ "id": "tag-maintenance", "name": "Maintenance", "description": "Repository maintenance automations.", "version": "catalog-version-1", "created_at": "2026-09-17T12:00:00Z", "updated_at": "2026-09-17T12:00:00Z" }

Get an automation tag in a repository

Note

This endpoint is in public preview and is subject to change.

Returns one active automation tag the authenticated caller can see in a repository. Missing, deleted, hidden, out-of-scope, and feature-disabled tags all return 404, so the response does not reveal whether a hidden tag exists.

Fine-grained access tokens for "Get an automation tag in a repository"

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.

Parameters for "Get an automation tag in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

tag_id string Required

Stable opaque tag ID in the repository authoring scope, not a display name.

HTTP response status codes for "Get an automation tag in a repository"

Status codeDescription
200

Active tag retrieved.

400

The request contains invalid pagination parameters or a body that could not be decoded.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, deleted, outside this scope, inaccessible, or feature-disabled. Public endpoint and rollout gates return no response body. Other cases return the documented JSON error.

408

The read request timed out.

422

A request parameter or field is invalid.

429

The read request was rate limited.

503

Automation tag storage or policy is unavailable.

Code samples for "Get an automation tag in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automation-tags/{tag_id}
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/automation-tags/TAG_ID

Active tag retrieved.

Status: 200
{ "id": "tag-1", "name": "Release", "description": "Release automations", "version": "1", "created_at": "2026-05-01T12:00:00Z", "updated_at": "2026-05-03T14:30:00Z" }

Update an automation tag in a repository

Note

This endpoint is in public preview and is subject to change.

Updates display fields without changing the stable ID or authoring scope. Supply the catalog version returned by a tag read as expected_tag_version in the JSON body.

Fine-grained access tokens for "Update an automation tag in a repository"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

GitHub App installation access tokens are not supported for this endpoint.

Parameters for "Update an automation tag in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

tag_id string Required

Stable opaque tag ID in the repository authoring scope, not a display name.

Body parameters
Name, Type, Description
name string

Replacement display name.

description string

Replacement description. An empty string clears the description.

expected_tag_version string Required

The version from the caller's tag read, copied unchanged. Missing versions return 422; empty or stale versions return 409 without a write.

HTTP response status codes for "Update an automation tag in a repository"

Status codeDescription
200

Tag updated.

400

The request body could not be decoded. Field values that fail validation return 422.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, deleted, outside this scope, inaccessible, feature-disabled, or being deleted when called through the public API. Public endpoint and rollout gates return no response body. Other cases return the documented JSON error.

408

The update may have committed; read the tag before deciding whether to retry.

409

No write was made. The code automation_tag_version_conflict means the expected version is empty or stale; read the tag before retrying. The code automation_tag_deletion_pending means the tag is being deleted and can't be updated; public requests mask this state as 404. The tag creator or the caller who started the deletion can retry DELETE to finish it.

422

A request parameter or field is invalid.

429

The request was rate limited; read the tag before deciding whether to retry.

500

An unexpected failure occurred. The update may have committed; read the tag before deciding whether to retry.

503

Automation tagging is temporarily unavailable.

Code samples for "Update an automation tag in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

patch/agents/repos/{owner}/{repo}/automation-tags/{tag_id}
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/automation-tags/TAG_ID \ -d '{"name":"Repository maintenance","expected_tag_version":"catalog-version-1"}'

Tag updated.

Status: 200
{ "id": "tag-maintenance", "name": "Repository maintenance", "description": "Repository maintenance automations.", "version": "catalog-version-2", "created_at": "2026-09-17T12:00:00Z", "updated_at": "2026-09-17T13:00:00Z" }

Delete an automation tag in a repository

Note

This endpoint is in public preview and is subject to change.

Deletes an automation tag after removing its stored memberships and associated data. Automations and their history are preserved. Associated data may remain recoverable for a limited period according to the configured retention policy. Supply the catalog version returned by a tag read as the expected_tag_version query parameter.

A 503 response can mean cleanup is incomplete; it does not confirm deletion. The initiating caller or tag creator can retry with the original request version or the current version returned by a tag read. A completed deletion can also be retried by these callers, subject to authorization. Success is reported only after membership and associated data cleanup.

Fine-grained access tokens for "Delete an automation tag in a repository"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

GitHub App installation access tokens are not supported for this endpoint.

Parameters for "Delete an automation tag in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

tag_id string Required

Stable opaque tag ID in the repository authoring scope, not a display name.

Query parameters
Name, Type, Description
expected_tag_version string Required

The version from the caller's tag read, copied unchanged. Empty or stale versions return 409 without a write.

HTTP response status codes for "Delete an automation tag in a repository"

Status codeDescription
204

Group deletion and cleanup of memberships and associated data completed. Automations and their history are preserved.

400

The request parameters could not be decoded.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, outside this scope, inaccessible, or feature-disabled. Public endpoint and rollout gates return no response body. Other cases return the documented JSON error.

408

Deletion may have started or completed. The initiating caller or tag creator can retry with the original request version.

409

No write was made by this request. The code automation_tag_version_conflict means the expected version is empty or stale. Read the tag before retrying.

422

A request parameter or field is invalid.

429

The request was rate limited. Read the tag before retrying with the original request version.

500

An unexpected failure occurred. Deletion may have started or completed. The initiating caller or tag creator can retry with the original request version.

503

Automation tagging is temporarily unavailable, or deletion cleanup is incomplete. The initiating caller or tag creator can retry with the original request version.

Code samples for "Delete an automation tag in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

delete/agents/repos/{owner}/{repo}/automation-tags/{tag_id}
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/automation-tags/TAG_ID?expected_tag_version=EXPECTED_TAG_VERSION"

Group deletion and cleanup of memberships and associated data completed. Automations and their history are preserved.

Status: 204

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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "List automations for a repository"

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)

Parameters for "List automations for a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

Query parameters
Name, Type, Description
page integer

The page number of the results to fetch.

Default: 1

per_page integer

The number of results per page (max 100).

Default: 30

type string

Filter automations by type. personal returns automations owned by their creator, shared returns automations owned by the repository. Omit to return both.

Can be one of: personal, shared

tag_id string

Filter automations by one active tag ID. Tag membership fields are included. Authorization and tag filtering precede totals and pagination. Omit to include both tagged and untagged automations. Names and special Untagged values are not supported.

is_tag_membership_included boolean

Opt into tag membership fields: tag_ids, unavailable_tag_ids and tag_membership_version. Unavailable tag storage or policy returns an error, not an empty membership. Omit to preserve the legacy response.

Default: false

HTTP response status codes for "List automations for a repository"

Status codeDescription
200

Automations retrieved successfully

400

Bad request

401

Authentication required

403

The caller is not permitted to use this endpoint.

404

Resource not found

408

The request timed out.

422

Query parameters failed validation. Binding errors return the "Validation Failed" response.

429

The request was rate limited.

503

Automation tagging is temporarily unavailable.

Code samples for "List automations for a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations
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

Automations 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" } }, "tools": [ "github/issue_read" ], "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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "Create an automation for a repository"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

Parameters for "Create an automation for a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

Body parameters
Name, Type, Description
name string Required

The name of the automation.

triggers object

Trigger configuration for the automation.

Name, Type, Description
interval object
Name, Type, Description
cadence array of strings Required

One or more schedules on which the Automation runs. Supported values are: hourly, daily, weekly

hour_utc integer

UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to 0 (midnight UTC).

day_of_week integer

UTC weekday anchor for weekly schedules, where 0 is Sunday and 6 is Saturday. Omitted weekly values default to Monday (1).

minute_utc integer

UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to 0. Must be omitted whenever cadence includes hourly.

Default: 0

Can be one of: 0, 15, 30, 45

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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
workflows array of strings Required

Workflow names matched against the name in each workflow YAML file.

conclusions array of strings Required

Workflow conclusions to match. The current trigger supports failure. Supported values are: failure

query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
comment_types array of strings Required

Pull request conversation and inline review comment types to match. Supported values are: timeline_comment, review_comment

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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
comment_types array of strings

Top-level discussion comments and replies to match. Omit to match both. Supported values are: comment, reply

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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

assignees array of strings

Affected assignee logins matched case-insensitively.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

states array of strings Required

Submitted review states to match. Supported values are: approved, changes_requested, commented

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
automation_ids array of strings Required

Upstream Automation IDs in the same repository.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
automation_ids array of strings Required

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: reported, crashed, timed_out

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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 Required

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.

Default: 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.

Default: personal

Can be one of: 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.

HTTP response status codes for "Create an automation for a repository"

Status codeDescription
201

Automation created successfully

400

Bad request

401

Authentication required

403

Insufficient permissions

404

Resource not found

422

Validation Failed

Code samples for "Create an automation for a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

post/agents/repos/{owner}/{repo}/automations
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 repo scope.

Fine-grained access tokens for "List available automation tools for a repository"

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)

Parameters for "List available automation tools for a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

HTTP response status codes for "List available automation tools for a repository"

Status codeDescription
200

Repository automation tool catalog retrieved successfully

401

Authentication required

404

Repository not found, inaccessible, or automations unavailable

Code samples for "List available automation tools for a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/available-tools
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-tools

Repository 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 repo scope.

Fine-grained access tokens for "List available automation triggers for a repository"

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)

Parameters for "List available automation triggers for a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

HTTP response status codes for "List available automation triggers for a repository"

Status codeDescription
200

Available automation triggers retrieved successfully

401

Authentication required

404

Repository not found, inaccessible, or automations unavailable

Code samples for "List available automation triggers for a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/available-triggers
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-triggers

Available 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": "Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default `trigger`). 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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "Get an automation"

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)

Parameters for "Get an automation"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

Query parameters
Name, Type, Description
is_tag_membership_included boolean

Opt into tag membership fields: tag_ids, unavailable_tag_ids and tag_membership_version. Unavailable tag storage or policy returns an error, not an empty membership. Omit to preserve the legacy response.

Default: false

HTTP response status codes for "Get an automation"

Status codeDescription
200

Automation retrieved successfully

400

Bad request

401

Authentication required

403

The caller is not permitted to use this endpoint.

404

Resource not found

408

The request timed out.

422

Query parameters failed validation. Binding errors return the "Validation Failed" response.

429

The request was rate limited.

503

Automation tagging is temporarily unavailable.

Code samples for "Get an automation"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/{automation_id}
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

Automation 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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "Update an automation"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

Parameters for "Update an automation"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

Body parameters
Name, Type, Description
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.

Name, Type, Description
interval object
Name, Type, Description
cadence array of strings Required

One or more schedules on which the Automation runs. Supported values are: hourly, daily, weekly

hour_utc integer

UTC hour anchor (0 through 23) for daily and weekly schedules. Omitted daily and weekly values default to 0 (midnight UTC).

day_of_week integer

UTC weekday anchor for weekly schedules, where 0 is Sunday and 6 is Saturday. Omitted weekly values default to Monday (1).

minute_utc integer

UTC minute anchor for daily and weekly schedules. Omitted daily and weekly values default to 0. Must be omitted whenever cadence includes hourly.

Default: 0

Can be one of: 0, 15, 30, 45

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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
workflows array of strings Required

Workflow names matched against the name in each workflow YAML file.

conclusions array of strings Required

Workflow conclusions to match. The current trigger supports failure. Supported values are: failure

query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
comment_types array of strings Required

Pull request conversation and inline review comment types to match. Supported values are: timeline_comment, review_comment

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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
comment_types array of strings

Top-level discussion comments and replies to match. Omit to match both. Supported values are: comment, reply

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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

assignees array of strings

Affected assignee logins matched case-insensitively.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
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

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

states array of strings Required

Submitted review states to match. Supported values are: approved, changes_requested, commented

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
query string

A GitHub issue or pull request search query.

paths array of strings

Gitignore-style changed-file path globs.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
automation_ids array of strings Required

Upstream Automation IDs in the same repository.

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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
Name, Type, Description
automation_ids array of strings Required

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: reported, crashed, timed_out

write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

Name, Type, Description
write_scope string

Sets the write scope for this trigger's runs. Omit to inherit the automation's effective scope (default trigger). 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.

Can be one of: trigger, repository

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.

HTTP response status codes for "Update an automation"

Status codeDescription
200

Automation updated successfully

400

Bad request

401

Authentication required

404

Resource not found

422

Validation Failed

Code samples for "Update an automation"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

patch/agents/repos/{owner}/{repo}/automations/{automation_id}
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. Data dedicated to the automation is also deleted when present and may remain recoverable for a limited period according to the configured retention policy.

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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "Delete an automation"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

Parameters for "Delete an automation"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

HTTP response status codes for "Delete an automation"

Status codeDescription
204

Automation deleted successfully

400

Bad request

401

Authentication required

404

Resource not found

503

Automation deletion is temporarily unavailable and can be retried.

Code samples for "Delete an automation"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

delete/agents/repos/{owner}/{repo}/automations/{automation_id}
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_ID

Automation deleted successfully

Status: 204

List revisions for an automation

Note

This endpoint is in public preview and is subject to change.

Returns a list of revisions for an automation, ordered from newest to oldest.

Access follows the automation's own ownership rules: a user-owned automation's history is readable only by its creator, and a repository-owned automation's history follows repository read access. History remains readable after the automation is deleted.

Follow the opaque cursor in the rel="next" link from the Link header to continue when more revisions are available.

Fine-grained access tokens for "List revisions for an automation"

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.

Parameters for "List revisions for an automation"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

Query parameters
Name, Type, Description
cursor string

Opaque cursor identifying where to continue reading revision history, taken from the next link of a previous response. Omit to start from the most recent revision.

per_page integer

The number of results per page (max 100).

Default: 30

HTTP response status codes for "List revisions for an automation"

Status codeDescription
200

Revision history retrieved successfully

400

Bad request

401

Authentication required

404

Resource not found

Code samples for "List revisions for an automation"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/{automation_id}/revisions
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/revisions

Revision history retrieved successfully

Status: 200
{ "revisions": [ { "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890:000000000003", "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "revision_number": 3, "change_type": "edited", "creator": { "id": 123 }, "editor": { "id": 456 }, "editor_type": "user", "changed_at": "2026-05-03T14:30:00Z", "snapshot": { "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.", "tools": [ "github/issue_read" ], "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 } } } ] }

Get an automation revision

Note

This endpoint is in public preview and is subject to change.

Returns a specific revision of an automation, including its configuration after that change.

Access follows the automation's own ownership rules: a user-owned automation's history is readable only by its creator, and a repository-owned automation's history follows repository read access. History remains readable after the automation is deleted.

A revision ID belonging to a different automation returns 404.

Fine-grained access tokens for "Get an automation revision"

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.

Parameters for "Get an automation revision"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

revision_id string Required

The unique identifier of the automation revision.

HTTP response status codes for "Get an automation revision"

Status codeDescription
200

Revision retrieved successfully

401

Authentication required

404

Resource not found

Code samples for "Get an automation revision"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/{automation_id}/revisions/{revision_id}
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/revisions/REVISION_ID

Revision retrieved successfully

Status: 200
{ "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890:000000000003", "automation_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", "revision_number": 3, "change_type": "edited", "creator": { "id": 123 }, "editor": { "id": 456 }, "editor_type": "user", "changed_at": "2026-05-03T14:30:00Z", "snapshot": { "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.", "tools": [ "github/issue_read" ], "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 } } }

Attach an automation tag

Note

This endpoint is in public preview and is subject to change.

Adds an automation to an automation tag. Supply the automation's membership version as expected_tag_membership_version in the JSON body. This is not the tag's catalog version.

The tag must be active and visible to the authenticated caller in this repository. Repeating the request for a tag the automation already references, with the current version, makes no change. If that tag has been deleted, the request returns 404 and the stored reference remains.

Attach does not add a tag to an automation that already references a different tag, including a deleted one. That request returns 409 without a write; detach the existing reference first. Attach does not remove existing references.

The automation must have the same ownership scope as every active automation in the tag. Shared automations may have different creators; Personal automations must belong to the same user. A tag cannot mix Shared and Personal automations. An incompatible request returns 409 with code automation_tag_scope_mismatch without revealing the tag's other automations. A new, unbound tag accepts either scope; its first attachment binds the ownership scope. Removing every automation does not reset that binding. A tag that already mixes scopes remains readable and its automations can be detached, but it cannot accept new automations until its members are compatible.

Fine-grained access tokens for "Attach an automation tag"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

GitHub App installation access tokens are not supported for this endpoint.

Parameters for "Attach an automation tag"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

tag_id string Required

Stable opaque tag ID in the repository authoring scope, not a display name.

Body parameters
Name, Type, Description
expected_tag_membership_version string Required

The tag_membership_version from the caller's automation read, or version from its membership read, copied unchanged. Empty or stale versions return 409 without a write.

HTTP response status codes for "Attach an automation tag"

Status codeDescription
200

Active and unavailable stored references after attachment.

400

The request body could not be decoded. A missing or mismatched version returns 422.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The resource is missing, deleted, outside this scope, inaccessible, or feature-disabled.

408

The attachment may have committed; read the current membership before retrying with its current version.

409

No write was made. The code automation_tag_version_conflict means the expected membership version is empty or stale, or the tag is being deleted. The code automation_tag_already_assigned means the automation already references a different tag, including a deleted one; detach that reference first. The code automation_tag_scope_mismatch means the automation's ownership scope doesn't match the tag's active automations. The code automation_tag_scope_unresolved means the tag's storage scope cannot be established; delete and recreate the tag to recover.

422

A request parameter or field is invalid.

429

The request was rate limited; read the current membership before retrying with its current version.

500

An unexpected failure occurred. The attachment may have committed; a retry with the same version returns 409 if it did.

Code samples for "Attach an automation tag"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

put/agents/repos/{owner}/{repo}/automations/{automation_id}/tags/{tag_id}
curl -L \ -X PUT \ -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/tags/TAG_ID \ -d '{"expected_tag_membership_version":"0"}'

Active and unavailable stored references after attachment.

Status: 200
{ "automation_id": "automation-1", "tag_ids": [ "tag-1" ], "unavailable_tag_ids": [], "version": "1" }

Detach an automation tag

Note

This endpoint is in public preview and is subject to change.

Removes an automation from an automation tag. Supply the automation's membership version as the expected_tag_membership_version query parameter. This is not the tag's catalog version.

Detaching a tag the automation does not reference, with the current version, makes no change. A reference to a deleted tag can also be removed. The automation is never deleted, and an automation without a tag remains valid.

Fine-grained access tokens for "Detach an automation tag"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

GitHub App installation access tokens are not supported for this endpoint.

Parameters for "Detach an automation tag"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

tag_id string Required

Stable opaque tag ID in the repository authoring scope, not a display name.

Query parameters
Name, Type, Description
expected_tag_membership_version string Required

The tag_membership_version from the caller's automation read, or version from its membership read, copied unchanged. Empty or stale versions return 409 without a write.

HTTP response status codes for "Detach an automation tag"

Status codeDescription
200

Active and unavailable stored references after detachment.

400

The request parameters could not be decoded.

401

Authentication required.

403

The caller cannot perform this operation in the repository.

404

The automation is missing, deleted, outside this scope, inaccessible, or feature-disabled.

408

The detachment may have committed; read the current membership before retrying with its current version.

409

No write was made. The code automation_tag_version_conflict means the expected membership version is empty or stale.

422

A request parameter or field is invalid.

429

The request was rate limited; read the current membership before retrying with its current version.

500

An unexpected failure occurred. The detachment may have committed; a retry with the same version returns 409 if it did.

Code samples for "Detach an automation tag"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

delete/agents/repos/{owner}/{repo}/automations/{automation_id}/tags/{tag_id}
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_ID/tags/TAG_ID?expected_tag_membership_version=EXPECTED_TAG_MEMBERSHIP_VERSION"

Active and unavailable stored references after detachment.

Status: 200
{ "automation_id": "automation-1", "tag_ids": [], "unavailable_tag_ids": [], "version": "1" }

List 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:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (read)

Parameters for "List tasks for an automation in a repository"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

Query parameters
Name, Type, Description
per_page integer

The number of results per page (max 100).

Default: 30

page integer

The page number of the results to fetch.

Default: 1

sort string

The field to sort results by. Can be updated_at or created_at.

Default: updated_at

Can be one of: updated_at, created_at

direction string

The direction to sort results. Can be asc or desc.

Default: desc

Can be one of: asc, desc

state string

Comma-separated list of task states to filter by. Can be any combination of: queued, in_progress, completed, failed, idle, waiting_for_user, timed_out, cancelled.

is_archived boolean

Filter by archived status. When true, returns only archived tasks. When false or omitted, returns only non-archived tasks. Defaults to false.

Default: false

HTTP response status codes for "List tasks for an automation in a repository"

Status codeDescription
200

Automation task history retrieved successfully

401

Authentication required

404

Repository or automation not found, inaccessible, or unavailable

422

Validation failed

Code samples for "List tasks for an automation in a repository"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

get/agents/repos/{owner}/{repo}/automations/{automation_id}/tasks
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/tasks

Automation 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. User tokens can fetch it with the "Get a task by repo" Agent tasks API. GitHub App installation tokens can list tasks for the automation in the repository and match the returned task_id. The response 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.

To call this endpoint, OAuth app tokens and personal access tokens (classic) need the repo scope.

Fine-grained access tokens for "Run an automation"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Agent tasks" repository permissions (write)

Parameters for "Run an automation"

Headers
Name, Type, Description
accept string

Setting to application/vnd.github+json is recommended.

Path parameters
Name, Type, Description
owner string Required

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

repo string Required

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

automation_id string Required

The unique identifier of the automation.

Body parameters
Name, Type, Description
event string Required

The event to trigger. Only manual is supported.

Value: manual

context string

Additional context for this automation run, up to 10,000 characters. Supported only when event is manual. The context supplements the automation's configured instructions.

HTTP response status codes for "Run an automation"

Status codeDescription
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

Code samples for "Run an automation"

If you access GitHub at GHE.com, replace api.github.com with your enterprise's dedicated subdomain at api.SUBDOMAIN.ghe.com.

Request example

post/agents/repos/{owner}/{repo}/automations/{automation_id}/tasks
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" }