# GET /agents/automations/{automation_id}/tasks (GitHub API)
Base URL: https://api.github.com
Auth: Authorization; GitHub token; required.
Last verified: 2026-10-20

> List tasks for an automation

## Critical Gotchas
* GitHub recommends an `Accept: application/vnd.github+json` header and an explicit `X-GitHub-Api-Version` header.
* Fine-grained tokens only authorize repositories and permissions selected when the token is created.

## cURL
curl -X GET 'https://api.github.com/agents/automations/automation-id/tasks?per_page=30&page=1&sort=updated_at&direction=desc&state=example-state&is_archived=false' \
  -H "Authorization: Bearer $GITHUB_TOKEN" \
  -H 'Accept: application/vnd.github+json' \
  -H 'X-GitHub-Api-Version: 2026-03-10'

## Parameters
| Name | In | Type | Required | Description |
| :--- | :--- | :--- | :--- | :--- |
| automation_id | path | string | Yes | The unique identifier of the automation. |
| per_page | query | integer | No | The number of results per page (max 100). |
| page | query | integer | No | The page number of the results to fetch. |
| sort | query | string | No | The field to sort results by. Can be `updated_at` or `created_at`. |
| direction | query | string | No | The direction to sort results. Can be `asc` or `desc`. |
| state | query | string | No | Comma-separated list of task states to filter by. Can be any combination of:... |
| is_archived | query | boolean | No | Filter by archived status. When `true`, returns only archived tasks. When `fa... |

## Response example
{"tasks":[{}]}

---
Need an API key? Get one at https://github.com/settings/tokens