canonical: https://jentic.com/apis/api.github.com/github

# GitHub v3 REST API

Jentic publishes the only available OpenAPI specification for GitHub v3 REST API, keeping it validated and agent-ready. The GitHub REST API is the developer-tools surface for the world's largest source-control and software collaboration platform - repositories, branches, pull requests, issues, code reviews, GitHub Actions workflows, security advisories, packages, and Apps. With 1,099 endpoints across themes including actions, billing, checks, code-scanning, dependabot, and dependency-graph, it powers most software development automation in use today.

## For AI agents

Manage repositories, pull requests, issues, GitHub Actions workflows, code-scanning alerts, and Dependabot updates across 1,099 endpoints of the GitHub REST API.

## Scope

Does not handle GitHub web UI rendering, GitHub Pages content publishing, or GitHub Marketplace billing administration - use for source-control, pull request, issue, Actions, and security-alert operations only.

## Capabilities

- Open, review, and merge a pull request on a repository
- Create, label, assign, and close an issue
- Trigger and inspect a GitHub Actions workflow run
- List and resolve code-scanning and Dependabot alerts on a repository
- Manage repository content - read files, commit changes, and create branches
- Install and configure a GitHub App on a repository or organisation
- List security advisories and dependency-graph data for a repository

## Use cases

### Automated PR and Issue Workflows

Drive end-to-end pull request and issue automation: open PRs from agent-generated patches, request reviews, wait for required checks, and merge when green. The same surface lets bots triage incoming issues by labelling, assigning, and closing duplicates. The 1,099-endpoint API covers every step without scraping the GitHub web UI.

Example prompt: POST /repos/{owner}/{repo}/pulls to open a PR, then POST /repos/{owner}/{repo}/pulls/{pull_number}/merge once required checks pass

### CI/CD and Workflow Orchestration

Trigger GitHub Actions workflows externally and stream their results into deployment dashboards. The actions endpoints support dispatching workflow_dispatch events, polling workflow runs, listing jobs, and downloading artifacts - enough to integrate Actions with non-GitHub CI/CD systems or to build a meta-orchestrator across many repositories.

Example prompt: POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches with the target ref and inputs to start a workflow run

### Security and Supply-Chain Monitoring

Aggregate code-scanning alerts, Dependabot security updates, and advisory data across many repositories into a single security dashboard. The dedicated code-scanning, dependabot, and dependency-graph endpoints expose alerts and SBOM-style data so security teams can track and prioritise without logging into each repository.

Example prompt: GET /repos/{owner}/{repo}/dependabot/alerts and GET /repos/{owner}/{repo}/code-scanning/alerts, aggregate by severity, and surface the open criticals

### AI Coding Agents via Jentic

AI coding agents that propose patches, review PRs, or triage issues call GitHub through Jentic. Jentic stores the bearer token (PAT, fine-grained PAT, or GitHub App installation token), exposes the most-used operations as discoverable tools, and lets the agent search by intent rather than navigating the 1,099-endpoint surface.

Example prompt: Search Jentic for 'open a github pull request', load the POST /repos/{owner}/{repo}/pulls schema, and execute with title, head, base, and body to create the PR

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /repos/{owner}/{repo} | Get repository metadata |
| POST | /repos/{owner}/{repo}/pulls | Open a pull request |
| POST | /repos/{owner}/{repo}/issues | Create an issue |
| POST | /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches | Trigger a workflow_dispatch event |
| GET | /repos/{owner}/{repo}/dependabot/alerts | List Dependabot alerts |
| GET | /repos/{owner}/{repo}/code-scanning/alerts | List code-scanning alerts |
| POST | /app/installations/{installation_id}/access_tokens | Create an installation access token for a GitHub App |

## Key resources

- **Repos** — Repository contents, branches, commits, releases, and metadata
- **Pulls** — Pull request creation, review, comments, and merge
- **Issues** — Issue creation, labelling, assignment, and comments
- **Actions** — Workflow dispatches, runs, jobs, artifacts, and runners
- **Checks** — Check runs and check suites for CI integration
- **Code Scanning** — Code-scanning alerts and SARIF analyses
- **Dependabot** — Dependabot security and version-update alerts
- **Apps** — GitHub App installations, permissions, and tokens

## Why Jentic

- **Setup:** Wiring the GitHub v3 REST API by hand means setting up its bearer token auth, minting installation access tokens, and coding your own calls to the repos, pulls, issues, and Actions endpoints. Through Jentic you install once, import the GitHub v3 REST API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** GitHub puts the owner and repo in the URL path (/repos/{owner}/{repo}/...), so a rule can pin your agent to one repository: it can open pull requests and issues there and nothing else. You choose the operations it may call, so dispatching workflows or minting installation access tokens are not included unless you add them.
- **Credential handling:** Your GitHub token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'open a pull request' or 'list Dependabot alerts for a repo', and Jentic returns the matching GitHub operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **GitLab** — Source control plus integrated CI/CD with a single self-hostable platform
- **Courier** — Notification orchestration that routes GitHub events into email, SMS, and chat channels
- **Slack** — Team chat for routing GitHub PR, issue, and Actions notifications to engineers

## FAQ

### Why is there no official OpenAPI spec for GitHub v3 REST API?

GitHub publishes an OpenAPI description that requires substantial post-processing to be agent-usable. Jentic generates and maintains this spec so that AI agents and developers can call GitHub v3 REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the GitHub REST API use?

The GitHub REST API uses bearer tokens - personal access tokens (classic or fine-grained), OAuth tokens, or GitHub App installation access tokens - sent in the Authorization header. Through Jentic, the chosen token is stored in the encrypted vault and injected at request time.

### Can I open a pull request and merge it through this API?

Yes. POST /repos/{owner}/{repo}/pulls opens the PR and POST /repos/{owner}/{repo}/pulls/{pull_number}/merge merges it once required checks pass. Reviews, comments, and re-requests are all available under /repos/{owner}/{repo}/pulls/{pull_number}/.

### How do I trigger a GitHub Actions workflow externally?

Call POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches with the ref to run against and any inputs the workflow declares. Then poll GET /repos/{owner}/{repo}/actions/runs to follow the run to completion.

### How do I open a GitHub PR through Jentic?

Run pip install jentic, then search 'open a github pull request'. Jentic returns the POST /repos/{owner}/{repo}/pulls operation with its schema. Execute with title, head, base, and body; Jentic handles the bearer token in the Authorization header.

### What are the rate limits for the GitHub REST API?

Authenticated requests get 5,000 requests per hour per user (or per installation token), with 15,000 per hour for GitHub Apps installed on Enterprise organisations. Search endpoints have stricter per-minute limits. Inspect the X-RateLimit-Remaining header on every response to track usage.

### Can I limit what my agent is allowed to do with the GitHub REST API?

Yes. Because you run Jentic One yourself, your own rules decide which GitHub operations and which token your agent may use. Since GitHub puts the owner and repo in the URL path (/repos/{owner}/{repo}/...), a rule can pin the agent to a single repository and let it open pull requests and issues there and nothing else. You pick the exact operations it can call, so dispatching Actions workflows or minting installation access tokens stay off limits unless you add them.
