Misskey federation API

The federation API from Misskey — 9 operation(s) for federation.

OpenAPI Specification

misskey-federation-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  version: 2025.4.1-io.12b-fb6fbea074
  title: Misskey account federation API
servers:
- url: https://misskey.io/api
tags:
- name: federation
paths:
  /ap/get:
    post:
      operationId: post___ap___get
      summary: ap/get
      description: 'No description provided.


        **Credential required**: *Yes* / **Permission**: *read:federation*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/ap/get.ts
      tags:
      - federation
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                uri:
                  type: string
              required:
              - uri
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                RATE_LIMIT_EXCEEDED:
                  value:
                    error:
                      message: Rate limit exceeded. Please try again later.
                      code: RATE_LIMIT_EXCEEDED
                      id: d5826d14-3982-4d2e-8011-b9e9f02499ef
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /ap/show:
    post:
      operationId: post___ap___show
      summary: ap/show
      description: 'No description provided.


        **Credential required**: *Yes* / **Permission**: *read:account*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/ap/show.ts
      tags:
      - federation
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                uri:
                  type: string
              required:
              - uri
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                oneOf:
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - User
                    object:
                      type: object
                      $ref: '#/components/schemas/UserDetailedNotMe'
                  required:
                  - type
                  - object
                - type: object
                  properties:
                    type:
                      type: string
                      enum:
                      - Note
                    object:
                      type: object
                      $ref: '#/components/schemas/Note'
                  required:
                  - type
                  - object
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                FEDERATION_NOT_ALLOWED:
                  value:
                    error:
                      message: Federation for this host is not allowed.
                      code: FEDERATION_NOT_ALLOWED
                      id: 974b799e-1a29-4889-b706-18d4dd93e266
                URI_INVALID:
                  value:
                    error:
                      message: URI is invalid.
                      code: URI_INVALID
                      id: 1a5eab56-e47b-48c2-8d5e-217b897d70db
                REQUEST_FAILED:
                  value:
                    error:
                      message: Request failed.
                      code: REQUEST_FAILED
                      id: 81b539cf-4f57-4b29-bc98-032c33c0792e
                RESPONSE_INVALID:
                  value:
                    error:
                      message: Response from remote server is invalid.
                      code: RESPONSE_INVALID
                      id: 70193c39-54f3-4813-82f0-70a680f7495b
                NO_SUCH_OBJECT:
                  value:
                    error:
                      message: No such object.
                      code: NO_SUCH_OBJECT
                      id: dc94d745-1262-4e63-a17d-fecaa57efc82
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                RATE_LIMIT_EXCEEDED:
                  value:
                    error:
                      message: Rate limit exceeded. Please try again later.
                      code: RATE_LIMIT_EXCEEDED
                      id: d5826d14-3982-4d2e-8011-b9e9f02499ef
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /federation/followers:
    post:
      operationId: post___federation___followers
      summary: federation/followers
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/followers.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type: string
                sinceId:
                  type: string
                  format: misskey:id
                untilId:
                  type: string
                  format: misskey:id
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
              required:
              - host
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  $ref: '#/components/schemas/Following'
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /federation/following:
    post:
      operationId: post___federation___following
      summary: federation/following
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/following.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type: string
                sinceId:
                  type: string
                  format: misskey:id
                untilId:
                  type: string
                  format: misskey:id
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
              required:
              - host
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  $ref: '#/components/schemas/Following'
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /federation/instances:
    get:
      operationId: get___federation___instances
      summary: federation/instances
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/instances.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type:
                  - string
                  - 'null'
                  description: Omit or use `null` to not filter by host.
                blocked:
                  type:
                  - boolean
                  - 'null'
                notResponding:
                  type:
                  - boolean
                  - 'null'
                suspended:
                  type:
                  - boolean
                  - 'null'
                silenced:
                  type:
                  - boolean
                  - 'null'
                federating:
                  type:
                  - boolean
                  - 'null'
                subscribing:
                  type:
                  - boolean
                  - 'null'
                publishing:
                  type:
                  - boolean
                  - 'null'
                limit:
                  type: integer
                  minimum: 1
                  maximum: 30
                  default: 30
                offset:
                  type: integer
                  default: 0
                sort:
                  type:
                  - string
                  - 'null'
                  enum:
                  - +pubSub
                  - -pubSub
                  - +notes
                  - -notes
                  - +users
                  - -users
                  - +following
                  - -following
                  - +followers
                  - -followers
                  - +firstRetrievedAt
                  - -firstRetrievedAt
                  - +latestRequestReceivedAt
                  - -latestRequestReceivedAt
                  - null
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  $ref: '#/components/schemas/FederationInstance'
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
    post:
      operationId: post___federation___instances
      summary: federation/instances
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/instances.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type:
                  - string
                  - 'null'
                  description: Omit or use `null` to not filter by host.
                blocked:
                  type:
                  - boolean
                  - 'null'
                notResponding:
                  type:
                  - boolean
                  - 'null'
                suspended:
                  type:
                  - boolean
                  - 'null'
                silenced:
                  type:
                  - boolean
                  - 'null'
                federating:
                  type:
                  - boolean
                  - 'null'
                subscribing:
                  type:
                  - boolean
                  - 'null'
                publishing:
                  type:
                  - boolean
                  - 'null'
                limit:
                  type: integer
                  minimum: 1
                  maximum: 30
                  default: 30
                offset:
                  type: integer
                  default: 0
                sort:
                  type:
                  - string
                  - 'null'
                  enum:
                  - +pubSub
                  - -pubSub
                  - +notes
                  - -notes
                  - +users
                  - -users
                  - +following
                  - -following
                  - +followers
                  - -followers
                  - +firstRetrievedAt
                  - -firstRetrievedAt
                  - +latestRequestReceivedAt
                  - -latestRequestReceivedAt
                  - null
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  $ref: '#/components/schemas/FederationInstance'
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /federation/show-instance:
    post:
      operationId: post___federation___show-instance
      summary: federation/show-instance
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/show-instance.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                host:
                  type: string
              required:
              - host
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type:
                - object
                - 'null'
                anyOf:
                - $ref: '#/components/schemas/FederationInstance'
                - type: 'null'
        '204':
          description: OK (without any results)
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                AUTHENTICATION_FAILED:
                  value:
                    error:
                      message: Authentication failed. Please ensure your token is correct.
                      code: AUTHENTICATION_FAILED
                      id: b0a7f5f8-dc2f-4171-b91f-de88ad238e14
        '418':
          description: I'm Ai
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                I_AM_AI:
                  value:
                    error:
                      message: You sent a request to Ai-chan, Misskey's showgirl, instead of the server.
                      code: I_AM_AI
                      id: 60c46cd1-f23a-46b1-bebe-5d2b73951a84
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INTERNAL_ERROR:
                  value:
                    error:
                      message: Internal error occurred. Please contact us if the error persists.
                      code: INTERNAL_ERROR
                      id: 5d37dbcb-891e-41ca-a3d6-e690c97775ac
  /federation/stats:
    get:
      operationId: get___federation___stats
      summary: federation/stats
      description: 'No description provided.


        **Credential required**: *No*'
      externalDocs:
        description: Source code
        url: https://github.com/MisskeyIO/misskey/blob/io/packages/backend/src/server/api/endpoints/federation/stats.ts
      tags:
      - federation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                limit:
                  type: integer
                  minimum: 1
                  maximum: 100
                  default: 10
      responses:
        '200':
          description: OK (with results)
          content:
            application/json:
              schema:
                type: object
                properties:
                  topSubInstances:
                    type: array
                    items:
                      type: object
                      $ref: '#/components/schemas/FederationInstance'
                  otherFollowersCount:
                    type: number
                  topPubInstances:
                    type: array
                    items:
                      type: object
                      $ref: '#/components/schemas/FederationInstance'
                  otherFollowingCount:
                    type: number
                required:
                - topSubInstances
                - otherFollowersCount
                - topPubInstances
                - otherFollowingCount
        '400':
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                INVALID_PARAM:
                  value:
                    error:
                      message: Invalid param.
                      code: INVALID_PARAM
                      id: 3d81ceae-475f-4600-b2a8-2bc116157532
        '401':
          description: Authentication error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                CREDENTIAL_REQUIRED:
                  value:
                    error:
                      message: Credential required.
                      code: CREDENTIAL_REQUIRED
                      id: 1384574d-a912-4b81-8601-c7b1c4085df1
        '403':
          description: Forbidden error
          content:
            application/j

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/misskey/refs/heads/main/openapi/misskey-federation-api-openapi.yml