Codeberg Pull Requests API

List, create, get, update, and merge pull requests.

Operations 6

GET /repos/{owner}/{repo}/pulls List a repo's pull requests #
POST /repos/{owner}/{repo}/pulls Create a pull request #
GET /repos/{owner}/{repo}/pulls/{index} Get a pull request #
PATCH /repos/{owner}/{repo}/pulls/{index} Update a pull request #
GET /repos/{owner}/{repo}/pulls/{index}/merge Check if a pull request has been merged #
POST /repos/{owner}/{repo}/pulls/{index}/merge Merge a pull request #

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-pull-requests-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 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. See our Privacy Policy and Terms.

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

OpenAPI Specification

codeberg-pull-requests-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codeberg API (Forgejo) Git Content Pull Requests 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: Pull Requests
  description: List, create, get, update, and merge pull requests.
paths:
  /repos/{owner}/{repo}/pulls:
    get:
      operationId: repoListPullRequests
      tags:
      - Pull Requests
      summary: List a repo's pull requests
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '200':
          description: A list of pull requests.
    post:
      operationId: repoCreatePullRequest
      tags:
      - Pull Requests
      summary: Create a pull request
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      responses:
        '201':
          description: The created pull request.
  /repos/{owner}/{repo}/pulls/{index}:
    get:
      operationId: repoGetPullRequest
      tags:
      - Pull Requests
      summary: Get a pull request
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/index'
      responses:
        '200':
          description: The requested pull request.
    patch:
      operationId: repoEditPullRequest
      tags:
      - Pull Requests
      summary: Update a pull request
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/index'
      responses:
        '201':
          description: The updated pull request.
  /repos/{owner}/{repo}/pulls/{index}/merge:
    get:
      operationId: repoPullRequestIsMerged
      tags:
      - Pull Requests
      summary: Check if a pull request has been merged
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/index'
      responses:
        '204':
          description: The pull request has been merged.
        '404':
          description: The pull request has not been merged.
    post:
      operationId: repoMergePullRequest
      tags:
      - Pull Requests
      summary: Merge a pull request
      parameters:
      - $ref: '#/components/parameters/owner'
      - $ref: '#/components/parameters/repo'
      - $ref: '#/components/parameters/index'
      responses:
        '200':
          description: The pull request was merged.
components:
  parameters:
    index:
      name: index
      in: path
      required: true
      description: Index (number) of the issue or pull request within the repository.
      schema:
        type: integer
    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`.'