Codeberg Repositories API

Create, search, get, edit, and delete repositories and their branches and tags.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/codeberg-repositories-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

codeberg-repositories-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Codeberg API (Forgejo) Git Content Repositories API
  description: 'Core subset of the Forgejo/Gitea-compatible REST API exposed by Codeberg, the community-run non-profit Git hosting platform, at https://codeberg.org/api/v1. Codeberg runs Forgejo (a community fork of Gitea); the reported application version at review time was 15.0.0-209+gitea-1.22.0. This document captures the core repository, issue, pull request, release, Git content, user, and organization paths. It is a representative subset - the full, authoritative machine-readable specification is served live by Codeberg at https://codeberg.org/swagger.v1.json (interactive UI at https://codeberg.org/api/swagger). Authenticate with a personal access token sent as `Authorization: token YOUR_TOKEN`, or via OAuth2.'
  version: 15.0.0
  contact:
    name: Codeberg
    url: https://codeberg.org
  license:
    name: MIT (Forgejo software)
    url: https://forgejo.org/
servers:
- url: https://codeberg.org/api/v1
  description: Codeberg production
security:
- AuthorizationHeaderToken: []
tags:
- name: Repositories
  description: Create, search, get, edit, and delete repositories and their branches and tags.
paths:
  /repos/search:
    get:
      operationId: repoSearch
      tags:
      - Repositories
      summary: Search for repositories
      parameters:
      - name: q
        in: query
        description: Keyword to search for.
        schema:
          type: string
      - name: limit
        in: query
        description: Page size of results.
        schema:
          type: integer
      responses:
        '200':
          description: A list of matching repositories.
  /repos/{owner}/{repo}:
    get:
      operationId: repoGet
      tags:
      - Repositories
      summary: Get a repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: The requested repository.
    patch:
      operationId: repoEdit
      tags:
      - Repositories
      summary: Edit a repository's properties. Only fields that are set will be changed.
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: The updated repository.
    delete:
      operationId: repoDelete
      tags:
      - Repositories
      summary: Delete a repository
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '204':
          description: Repository deleted.
  /user/repos:
    get:
      operationId: userCurrentListRepos
      tags:
      - Repositories
      summary: List the repos that the authenticated user owns
      responses:
        '200':
          description: A list of repositories.
    post:
      operationId: createCurrentUserRepo
      tags:
      - Repositories
      summary: Create a repository
      responses:
        '201':
          description: The created repository.
  /repos/{owner}/{repo}/branches:
    get:
      operationId: repoListBranches
      tags:
      - Repositories
      summary: List a repository's branches
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: A list of branches.
    post:
      operationId: repoCreateBranch
      tags:
      - Repositories
      summary: Create a branch
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '201':
          description: The created branch.
  /repos/{owner}/{repo}/tags:
    get:
      operationId: repoListTags
      tags:
      - Repositories
      summary: List a repository's tags
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: A list of tags.
components:
  parameters:
    repo:
      name: repo
      in: path
      required: true
      description: Name of the repository.
      schema:
        type: string
    owner:
      name: owner
      in: path
      required: true
      description: Owner of the repository (user or organization).
      schema:
        type: string
  securitySchemes:
    AuthorizationHeaderToken:
      type: apiKey
      in: header
      name: Authorization
      description: 'Personal access token. Must be prepended with the word "token" followed by a space, e.g. `Authorization: token YOUR_TOKEN`.'