CODEOWNERS is the file format originally introduced by GitHub and later adopted by GitLab, Bitbucket Cloud, Gitea, and Azure Repos that lets a repository declare which individuals or teams are responsible for a path or pattern within the codebase. Platforms use it to auto-request reviews on pull/merge requests, enforce required approvals via branch protection or push rules, and route pings on issues. The file is plain text with one rule per line - a glob pattern followed by one or more owner handles (`@username` or `@org/team`) or email addresses. Comments start with `#` and the last matching pattern wins.
CODEOWNERS is profiled on the APIs.io network. Tagged areas include Access Control, Automation, Code Review, Governance, and Repository File.
CODEOWNERS’s developer surface includes documentation, tooling, and 5 more developer resources.
Pull CODEOWNERS's APIs, OpenAPI, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
aid: codeowners
url: https://artifacts.apis.io/codeowners/apis.yml
name: CODEOWNERS
x-type: convention
tags:
- Access Control
- Automation
- Code Review
- Governance
- Repository File
- Standards
type: Index
deliveryModel:
model: unknown
open_source: false
commercial: false
callable_host: false
label: Delivery model not determined — needs a product licence on record
confidence: low
source:
- none
generated: '2026-08-28'
method: derived
accessModel:
pricing: unknown
onboarding: unknown
trial: false
try_now: false
public: false
label: Unknown
confidence: low
source: []
generated: '2026-11-20'
method: derived
image: https://kinlane-images.s3.amazonaws.com/shared/apis-json/icons/codeowners.png
access: 3rd-Party
kind: standard
created: '2025-01-01'
modified: '2026-04-26'
position: Consuming
description: CODEOWNERS is the file format originally introduced by GitHub and later adopted by GitLab, Bitbucket Cloud, Gitea,
and Azure Repos that lets a repository declare which individuals or teams are responsible for a path or pattern within the
codebase. Platforms use it to auto-request reviews on pull/merge requests, enforce required approvals via branch protection
or push rules, and route pings on issues. The file is plain text with one rule per line - a glob pattern followed by one
or more owner handles (`@username` or `@org/team`) or email addresses. Comments start with `#` and the last matching pattern
wins.
x-status: De facto convention (GitHub-originated)
x-canonical-host: GitHub Docs
x-supported-platforms:
- name: GitHub
docs: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
locations:
- .github/CODEOWNERS
- CODEOWNERS
- docs/CODEOWNERS
- name: GitLab
docs: https://docs.gitlab.com/user/project/codeowners/reference/
locations:
- .gitlab/CODEOWNERS
- CODEOWNERS
- docs/CODEOWNERS
extras: Section headers, optional approvals, required approval counts
- name: Bitbucket Cloud
docs: https://support.atlassian.com/bitbucket-cloud/docs/code-owners/
locations:
- CODEOWNERS
- name: Gitea
docs: https://docs.gitea.com/usage/code-owners
locations:
- .gitea/CODEOWNERS
- CODEOWNERS
- docs/CODEOWNERS
- name: Azure Repos
docs: https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies
x-syntax-rules:
- One pattern per line
- Pattern is a fnmatch-style glob (e.g. *.js, /docs/, src/api/**/*.ts)
- 'Owners follow the pattern, separated by whitespace: @user, @org/team, or email'
- Comments start with
- Blank lines are ignored
- Last matching pattern wins
- Invalid lines are silently skipped
- File size limit is 3 MB on GitHub
x-pattern-precedence: Last matching pattern in the file wins
x-owner-types:
- GitHub username (@username)
- GitHub team (@org/team-name)
- Email address (some platforms)
x-best-practices:
- Place CODEOWNERS in .github/ to keep it adjacent to other GitHub metadata
- Use teams instead of individuals for resilience
- Order rules from broad to specific so specific overrides win
- Combine with branch protection 'Require review from Code Owners'
- Validate with a CI step (e.g., codeowners-validator)
- Document each section with a comment header
x-validators:
- name: mszostok/codeowners-validator
url: https://github.com/mszostok/codeowners-validator
- name: hmarr/actions/codeowners-validator
url: https://github.com/hmarr/codeowners
- name: codeowners-discover
url: https://github.com/beaugunderson/codeowners
x-related-files:
- .github/CODEOWNERS
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- SECURITY.md
- branch protection rules (server-side)
apis: []
common:
- type: Specification
url: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
- type: Reference
url: https://docs.gitlab.com/user/project/codeowners/reference/
- type: Documentation
url: https://support.atlassian.com/bitbucket-cloud/docs/code-owners/
- type: Documentation
url: https://docs.gitea.com/usage/code-owners
- type: Documentation
url: https://learn.microsoft.com/en-us/azure/devops/repos/git/branch-policies
- type: Sample
url: https://github.com/dotnet/samples/blob/main/.github/CODEOWNERS
- type: Tools
url: https://github.com/mszostok/codeowners-validator
maintainers:
- FN: Kin Lane
email: kin@apievangelist.com
specificationVersion: '0.23'
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.