Forgejo activitypub API

The activitypub API from Forgejo — 11 operation(s) for activitypub.

Operations 11

GET /activitypub/actor Returns the instance's Actor #
POST /activitypub/actor/inbox Send to the inbox #
POST /activitypub/actor/outbox Display the outbox (always empty) #
GET /activitypub/repository-id/{repository-id} Returns the Repository actor for a repo #
POST /activitypub/repository-id/{repository-id}/inbox Send to the inbox #
POST /activitypub/repository-id/{repository-id}/outbox Display the outbox #
GET /activitypub/user-id/{user-id} Returns the Person actor for a user #
GET /activitypub/user-id/{user-id}/activities/{activity-id} Get a specific activity object of the user #
GET /activitypub/user-id/{user-id}/activities/{activity-id}/activity Get a specific activity of the user #
POST /activitypub/user-id/{user-id}/inbox Send to the inbox #
GET /activitypub/user-id/{user-id}/outbox List the user's recorded activity #

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/forgejo-activitypub-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

forgejo-activitypub-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  description: This documentation describes the Forgejo API.
  title: Forgejo Activitypub API
  license:
    name: This file is distributed under the MIT license for the purpose of interoperability
    url: http://opensource.org/licenses/MIT
  version: 16.0.0-dev-465-4b83448b7d+gitea-1.22.0
servers:
- url: /api/v1
security:
- BasicAuth: []
- AuthorizationHeaderToken: []
- SudoParam: []
- SudoHeader: []
- TOTPHeader: []
tags:
- name: activitypub
paths:
  /activitypub/actor:
    get:
      tags:
      - activitypub
      summary: Returns the instance's Actor
      operationId: activitypubInstanceActor
      responses:
        '200':
          $ref: '#/components/responses/ActivityPub'
  /activitypub/actor/inbox:
    post:
      tags:
      - activitypub
      summary: Send to the inbox
      operationId: activitypubInstanceActorInbox
      responses:
        '204':
          $ref: '#/components/responses/empty'
  /activitypub/actor/outbox:
    post:
      tags:
      - activitypub
      summary: Display the outbox (always empty)
      operationId: activitypubInstanceActorOutbox
      responses:
        '200':
          $ref: '#/components/responses/Outbox'
  /activitypub/repository-id/{repository-id}:
    get:
      tags:
      - activitypub
      summary: Returns the Repository actor for a repo
      operationId: activitypubRepository
      parameters:
      - description: repository ID of the repo
        name: repository-id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/ActivityPub'
  /activitypub/repository-id/{repository-id}/inbox:
    post:
      tags:
      - activitypub
      summary: Send to the inbox
      operationId: activitypubRepositoryInbox
      parameters:
      - description: repository ID of the repo
        name: repository-id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '204':
          $ref: '#/components/responses/empty'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ForgeLike'
          text/plain:
            schema:
              $ref: '#/components/schemas/ForgeLike'
  /activitypub/repository-id/{repository-id}/outbox:
    post:
      tags:
      - activitypub
      summary: Display the outbox
      operationId: activitypubRepositoryOutbox
      parameters:
      - description: repository ID of the repo
        name: repository-id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/Outbox'
  /activitypub/user-id/{user-id}:
    get:
      tags:
      - activitypub
      summary: Returns the Person actor for a user
      operationId: activitypubPerson
      parameters:
      - description: user ID of the user
        name: user-id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          $ref: '#/components/responses/ActivityPub'
  /activitypub/user-id/{user-id}/activities/{activity-id}:
    get:
      tags:
      - activitypub
      summary: Get a specific activity object of the user
      operationId: activitypubPersonActivityNote
      parameters:
      - description: user ID of the user
        name: user-id
        in: path
        required: true
        schema:
          type: integer
      - description: activity ID of the sought activity
        name: activity-id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/ActivityPub'
  /activitypub/user-id/{user-id}/activities/{activity-id}/activity:
    get:
      tags:
      - activitypub
      summary: Get a specific activity of the user
      operationId: activitypubPersonActivity
      parameters:
      - description: user ID of the user
        name: user-id
        in: path
        required: true
        schema:
          type: integer
      - description: activity ID of the sought activity
        name: activity-id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/ActivityPub'
  /activitypub/user-id/{user-id}/inbox:
    post:
      tags:
      - activitypub
      summary: Send to the inbox
      operationId: activitypubPersonInbox
      parameters:
      - description: user ID of the user
        name: user-id
        in: path
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '202':
          $ref: '#/components/responses/empty'
  /activitypub/user-id/{user-id}/outbox:
    get:
      tags:
      - activitypub
      summary: List the user's recorded activity
      operationId: activitypubPersonFeed
      parameters:
      - description: user ID of the user
        name: user-id
        in: path
        required: true
        schema:
          type: integer
      responses:
        '200':
          $ref: '#/components/responses/Outbox'
        '403':
          $ref: '#/components/responses/forbidden'
components:
  responses:
    Outbox:
      description: Outbox
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ForgeOutbox'
        text/html:
          schema:
            $ref: '#/components/schemas/ForgeOutbox'
    empty:
      description: APIEmpty is an empty response
    ActivityPub:
      description: ActivityPub
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ActivityPub'
        text/html:
          schema:
            $ref: '#/components/schemas/ActivityPub'
    forbidden:
      description: APIForbiddenError is a forbidden error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/APIForbiddenError'
        text/html:
          schema:
            $ref: '#/components/schemas/APIForbiddenError'
  schemas:
    ForgeLike:
      description: ForgeLike activity data type
      type: object
      x-go-package: forgejo.org/modules/forgefed
    APIForbiddenError:
      type: object
      properties:
        message:
          type: string
          x-go-name: Message
        url:
          type: string
          x-go-name: URL
      x-go-package: forgejo.org/services/context
    ForgeOutbox:
      description: ActivityStream OrderedCollection of activities
      type: object
      x-go-package: forgejo.org/modules/forgefed
    ActivityPub:
      description: ActivityPub type
      type: object
      properties:
        '@context':
          type: string
          x-go-name: Context
      x-go-package: forgejo.org/modules/structs
  securitySchemes:
    AuthorizationHeaderToken:
      description: API tokens must be prepended with "token" followed by a space.
      type: apiKey
      name: Authorization
      in: header
    BasicAuth:
      type: http
      scheme: basic
    SudoHeader:
      description: Sudo API request as the user provided as the key. Admin privileges are required.
      type: apiKey
      name: Sudo
      in: header
    SudoParam:
      description: Sudo API request as the user provided as the key. Admin privileges are required.
      type: apiKey
      name: sudo
      in: query
    TOTPHeader:
      description: Must be used in combination with BasicAuth if two-factor authentication is enabled.
      type: apiKey
      name: X-FORGEJO-OTP
      in: header