For Agents
Read line and component-level coverage, commit comparisons, and test results from Codecov for repositories integrated with GitHub, GitLab, or Bitbucket.
Get started with Codecov API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"compare code coverage between two commits"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Codecov API API.
Pull a coverage trend for a repository over time via GET /{service}/{owner}/repos/{repo}/coverage/
Compare coverage between two commits or branches with GET /{service}/{owner}/repos/{repo}/compare/
Retrieve the file-level coverage report for a single source path
List every flag (test suite or test type) configured on a repository and pull its coverage trend
GET STARTED
Use for: Get the current line coverage for a repository, Compare coverage between the main branch and a feature branch, Find which files lost coverage in the last commit, List every component defined for a Codecov repository
Not supported: Does not handle coverage uploads, repository onboarding, or static analysis — use for reading Codecov coverage, comparison, and test result data only.
Jentic publishes the only available OpenAPI document for Codecov API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Codecov API, keeping it validated and agent-ready. Codecov is a hosted code coverage reporting service that ingests test coverage uploads from CI pipelines and surfaces line, branch, and component-level coverage across every commit, branch, and pull request. The v2 API exposes 30 endpoints over api.codecov.io, including coverage trends, file reports, commit comparisons, flags, components, and test result analytics. Authentication is Bearer token or HTTP Basic, and the API is read-only apart from a single user PATCH operation.
Enumerate components defined in codecov.yml and read their coverage breakdown
Inspect the test results uploaded for a repository for flaky test analysis
Read commit-level upload metadata to confirm CI uploaded its coverage report
Patterns agents use Codecov API API for, with concrete tasks.
★ Pull Request Coverage Gating
Block pull requests that drop coverage below an acceptable threshold by reading commit comparison data straight from Codecov. The agent calls GET /{service}/{owner}/repos/{repo}/compare/ between the PR head and base, evaluates the delta, and posts a status check or PR comment. Replaces brittle screen-scraping of the Codecov UI with structured data.
Call GET /github/acme/repos/web/compare/ with base=main head=feature-x, and if coverage delta is below -1.0 post a failing GitHub status check
Coverage Trend Reporting
Build a multi-repository coverage trend report for engineering leadership. Each project's GET /{service}/{owner}/repos/{repo}/coverage/ feed is sampled daily, then plotted alongside flag-level coverage to show whether unit, integration, and end-to-end tests are growing or shrinking. Removes the need for ad hoc screenshots in board reviews.
For each repository in the Codecov account fetch GET /github/acme/repos/{repo}/coverage/ for the last 30 days and write the daily averages to a Snowflake table
Flaky Test Triage
Use the test results endpoint to surface flaky tests across a portfolio. The agent pulls GET /{service}/{owner}/repos/{repo}/test-results/, groups by test name, and ranks by failure rate so platform engineers can quarantine the worst offenders. Cuts the time spent staring at CI logs hunting for intermittent failures.
Pull GET /github/acme/repos/web/test-results/, group by test name, and produce a top-20 list of tests with failure rate above 5%
Component Coverage Audits
Codecov components let teams group files (for example, all billing code) and track coverage as a unit. The agent enumerates GET /{service}/{owner}/repos/{repo}/components/ and pulls comparison data per component to flag any group that drops below an internal SLA. Useful for shared services where ownership is distributed.
List components for repository 'platform' via GET /github/acme/repos/platform/components/, then for each component compare coverage between releases r-12 and r-13
Agent-Driven Coverage Lookups via Jentic
An engineer asks an agent 'is the payments service well tested?' and the Jentic-connected agent issues the right Codecov calls without holding the raw token. Jentic stores the Codecov Bearer token in its vault, returns the matching schema for the totals or trend endpoint, and executes on the agent's behalf. The user gets a one-line answer in seconds.
Search Jentic for 'get Codecov coverage totals', load the schema for GET /{service}/{owner}/repos/{repo}/totals/, execute it for the payments repo, and return the headline percentage
30 endpoints — jentic publishes the only available openapi specification for codecov api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/{service}/{owner_username}/repos/
List repositories under an owner
/{service}/{owner_username}/repos/{repo_name}/totals/
Get coverage totals for a repository
/{service}/{owner_username}/repos/{repo_name}/coverage/
Get the coverage trend
/{service}/{owner_username}/repos/{repo_name}/compare/
Compare coverage between commits or branches
/{service}/{owner_username}/repos/{repo_name}/file_report/{path}/
Get coverage for a single file
/{service}/{owner_username}/repos/{repo_name}/components/
List components
/{service}/{owner_username}/repos/{repo_name}/flags/
List flags
/{service}/{owner_username}/repos/{repo_name}/test-results/
Get test results analytics
/{service}/{owner_username}/repos/
List repositories under an owner
/{service}/{owner_username}/repos/{repo_name}/totals/
Get coverage totals for a repository
/{service}/{owner_username}/repos/{repo_name}/coverage/
Get the coverage trend
/{service}/{owner_username}/repos/{repo_name}/compare/
Compare coverage between commits or branches
/{service}/{owner_username}/repos/{repo_name}/file_report/{path}/
Get coverage for a single file
Three things that make agents converge on Jentic-routed access.
Credential isolation
Codecov Bearer tokens are stored encrypted in the Jentic vault. Agents receive scoped execution access; the raw token never enters agent context or appears in logs.
Intent-based discovery
Agents search Jentic by intent (e.g., 'compare code coverage between branches') and Jentic returns the matching Codecov operation with its parameter schema, so the agent can call the compare or totals endpoint without scraping vendor docs.
Time to first call
Direct Codecov v2 integration: 1-2 days to model the service/owner/repo path structure and wire auth. Through Jentic: under 30 minutes — search, load, execute.
Alternatives and complements available in the Jentic catalogue.
Coveralls API
Competing hosted code coverage service with similar GitHub, GitLab, and Bitbucket coverage reporting
Choose Coveralls when the team is already using it; choose Codecov when richer component, flag, and test analytics are required
SonarCloud API
Adds static analysis, security hotspots, and maintainability ratings alongside Codecov's coverage data
Pair with Codecov when the agent needs quality and security signals, not just coverage
GitHub API
Use GitHub for pull request, status check, and comment automation; Codecov for the coverage data those checks depend on
Combine when the agent needs to read Codecov coverage and post a GitHub status check or PR comment
Specific to using Codecov API API through Jentic.
Why is there no official OpenAPI spec for Codecov API?
Codecov does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call Codecov API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Codecov API use?
The Codecov v2 API supports HTTP Bearer tokens and HTTP Basic authentication. Generate a token in Codecov account settings and send it as Authorization: Bearer {token}. Through Jentic the token is stored in the vault and never enters agent context.
Can I compare coverage between two branches with the Codecov API?
Yes. GET /{service}/{owner}/repos/{repo}/compare/ accepts base and head identifiers and returns the coverage delta along with companion endpoints for impacted files, components, flags, and per-file diffs.
What are the rate limits for the Codecov API?
Codecov does not publish a fixed public rate limit. The v2 API enforces fair-use throttling, so back off on HTTP 429 responses. For portfolio-wide trend pulls, throttle to a few requests per second per token to stay within fair-use bounds.
How do I get coverage totals through Jentic?
Search Jentic for 'get Codecov coverage totals', load the schema for GET /{service}/{owner}/repos/{repo}/totals/, and execute it with the service (github, gitlab, bitbucket), owner username, and repository name. Jentic injects the Bearer token from the vault.
Does the Codecov API support write operations?
The v2 API is read-only apart from PATCH /{service}/{owner}/users/{id}, which updates a single user record. Coverage uploads themselves use the separate Codecov uploader, not this REST API.
/{service}/{owner_username}/repos/{repo_name}/components/
List components
/{service}/{owner_username}/repos/{repo_name}/flags/
List flags
/{service}/{owner_username}/repos/{repo_name}/test-results/
Get test results analytics