Bluesky Ozone Moderation API

Ozone moderation tool operations.

OpenAPI Specification

bluesky-ozone-moderation-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Bluesky Social Actor Profiles Ozone Moderation API
  description: "The Bluesky Social API provides programmatic access to the Bluesky social network built on the AT Protocol. \n\nThis API enables developers to:\n- Manage user profiles and preferences\n- Create, read, and interact with posts and feeds\n- Handle social graph operations (follows, blocks, mutes)\n- Process notifications and conversations\n- Moderate content and manage labels\n- Synchronize repository data\n\nAuthentication is handled via Bearer tokens. Public endpoints can be accessed directly at https://public.api.bsky.app, while authenticated requests should be made to the user's Personal Data Server (PDS).\n\nFor more information, visit the [Bluesky API Documentation](https://docs.bsky.app)."
  version: 1.0.0
  contact:
    name: Bluesky Support
    url: https://bsky.app
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
- url: https://bsky.social/xrpc
  description: Bluesky Social PDS
- url: https://public.api.bsky.app/xrpc
  description: Public Bluesky AppView API (unauthenticated endpoints)
tags:
- name: Ozone Moderation
  description: Ozone moderation tool operations.
paths:
  /xrpc/tools.ozone.moderation.emitEvent:
    post:
      operationId: ozoneModerationEmitEvent
      summary: Bluesky Take a moderation action on an actor.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Take a moderation action on an actor.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - event
              - subject
              - createdBy
              properties:
                event:
                  oneOf:
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventTakedown'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventAcknowledge'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventEscalate'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventComment'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventLabel'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventReport'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventMute'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventUnmute'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventMuteReporter'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventUnmuteReporter'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventReverseTakedown'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventResolveAppeal'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventEmail'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventTag'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsAccountEvent'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsIdentityEvent'
                  - $ref: '#/components/schemas/ToolsOzoneModerationDefsRecordEvent'
                subject:
                  oneOf:
                  - $ref: '#/components/schemas/ComAtprotoAdminDefsRepoRef'
                  - $ref: '#/components/schemas/ComAtprotoRepoStrongRef'
                subjectBlobCids:
                  type: array
                  items:
                    type: string
                    format: cid
                createdBy:
                  type: string
                  format: did
            examples:
              OzoneModerationEmitEventRequestExample:
                $ref: '#/components/examples/OzoneModerationEmitEventRequestExample'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventView'
              examples:
                OzoneModerationEmitEventResponse200Example:
                  $ref: '#/components/examples/OzoneModerationEmitEventResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                    - SubjectHasAction
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.getEvent:
    get:
      operationId: ozoneModerationGetEvent
      summary: Bluesky Get details about a moderation event.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Get details about a moderation event.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: id
        in: query
        required: true
        schema:
          type: integer
        example: 50
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventViewDetail'
              examples:
                OzoneModerationGetEventResponse200Example:
                  $ref: '#/components/examples/OzoneModerationGetEventResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.getRecord:
    get:
      operationId: ozoneModerationGetRecord
      summary: Bluesky Get details about a record.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Get details about a record.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: uri
        in: query
        required: true
        schema:
          type: string
          format: at-uri
        example: at://did:plc:example123/app.bsky.feed.post/abc123
      - name: cid
        in: query
        required: false
        schema:
          type: string
          format: cid
        example: bafyreiabc123example
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsOzoneModerationDefsRecordViewDetail'
              examples:
                OzoneModerationGetRecordResponse200Example:
                  $ref: '#/components/examples/OzoneModerationGetRecordResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                    - RecordNotFound
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.getRecords:
    get:
      operationId: ozoneModerationGetRecords
      summary: Bluesky Get details about some records.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Get details about some records.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: uris
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
            format: at-uri
          maxItems: 100
        example:
        - at://did:plc:example123/app.bsky.feed.post/abc123
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - records
                properties:
                  records:
                    type: array
                    items:
                      oneOf:
                      - $ref: '#/components/schemas/ToolsOzoneModerationDefsRecordViewDetail'
                      - $ref: '#/components/schemas/ToolsOzoneModerationDefsRecordViewNotFound'
              examples:
                OzoneModerationGetRecordsResponse200Example:
                  $ref: '#/components/examples/OzoneModerationGetRecordsResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.getRepo:
    get:
      operationId: ozoneModerationGetRepo
      summary: Bluesky Get details about a repository.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Get details about a repository.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: did
        in: query
        required: true
        schema:
          type: string
          format: did
        example: did:plc:example123abc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ToolsOzoneModerationDefsRepoViewDetail'
              examples:
                OzoneModerationGetRepoResponse200Example:
                  $ref: '#/components/examples/OzoneModerationGetRepoResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                    - RepoNotFound
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.getRepos:
    get:
      operationId: ozoneModerationGetRepos
      summary: Bluesky Get details about some repositories.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        Get details about some repositories.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: dids
        in: query
        required: true
        schema:
          type: array
          items:
            type: string
            format: did
          maxItems: 100
        example:
        - did:plc:example123abc
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - repos
                properties:
                  repos:
                    type: array
                    items:
                      oneOf:
                      - $ref: '#/components/schemas/ToolsOzoneModerationDefsRepoViewDetail'
                      - $ref: '#/components/schemas/ToolsOzoneModerationDefsRepoViewNotFound'
              examples:
                OzoneModerationGetReposResponse200Example:
                  $ref: '#/components/examples/OzoneModerationGetReposResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.queryEvents:
    get:
      operationId: ozoneModerationQueryEvents
      summary: Bluesky List moderation events related to a subject.
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        List moderation events related to a subject.'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: types
        in: query
        description: The types of events (fully qualified string in the format of tools.ozone.moderation.defs#modEvent<name>) to filter by. If not specified, all events are returned.
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-types
      - name: createdBy
        in: query
        required: false
        schema:
          type: string
          format: did
        example: did:plc:example123abc
      - name: sortDirection
        in: query
        description: Sort direction for the events. Defaults to descending order of created at timestamp.
        required: false
        schema:
          type: string
          description: Sort direction for the events. Defaults to descending order of created at timestamp.
          default: desc
        example: example-sortDirection
      - name: createdAfter
        in: query
        description: Retrieve events created after a given timestamp
        required: false
        schema:
          type: string
          description: Retrieve events created after a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: createdBefore
        in: query
        description: Retrieve events created before a given timestamp
        required: false
        schema:
          type: string
          description: Retrieve events created before a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: subject
        in: query
        required: false
        schema:
          type: string
          format: uri
        example: https://example.com/resource
      - name: collections
        in: query
        description: If specified, only events where the subject belongs to the given collections will be returned. When subjectType is set to 'account', this will be ignored.
        required: false
        schema:
          type: array
          items:
            type: string
            format: nsid
          maxItems: 20
        example:
        - app.bsky.feed.post
      - name: subjectType
        in: query
        description: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.
        required: false
        schema:
          type: string
          description: If specified, only events where the subject is of the given type (account or record) will be returned. When this is set to 'account' the 'collections' parameter will be ignored. When includeAllUserRecords or subject is set, this will be ignored.
          enum:
          - account
          - record
        example: account
      - name: includeAllUserRecords
        in: query
        description: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.
        required: false
        schema:
          type: boolean
          description: If true, events on all record types (posts, lists, profile etc.) or records from given 'collections' param, owned by the did are returned.
        example: true
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
        example: 50
      - name: hasComment
        in: query
        description: If true, only events with comments are returned
        required: false
        schema:
          type: boolean
          description: If true, only events with comments are returned
        example: true
      - name: comment
        in: query
        description: If specified, only events with comments containing the keyword are returned
        required: false
        schema:
          type: string
          description: If specified, only events with comments containing the keyword are returned
        example: example-comment
      - name: addedLabels
        in: query
        description: If specified, only events where all of these labels were added are returned
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-addedLabels
      - name: removedLabels
        in: query
        description: If specified, only events where all of these labels were removed are returned
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-removedLabels
      - name: addedTags
        in: query
        description: If specified, only events where all of these tags were added are returned
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-addedTags
      - name: removedTags
        in: query
        description: If specified, only events where all of these tags were removed are returned
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-removedTags
      - name: reportTypes
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-reportTypes
      - name: cursor
        in: query
        required: false
        schema:
          type: string
        example: eyJsYXN0SWQiOiIxMjM0NTYifQ
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                required:
                - events
                properties:
                  cursor:
                    type: string
                  events:
                    type: array
                    items:
                      $ref: '#/components/schemas/ToolsOzoneModerationDefsModEventView'
              examples:
                OzoneModerationQueryEventsResponse200Example:
                  $ref: '#/components/examples/OzoneModerationQueryEventsResponse200Example'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    type: string
                    enum:
                    - InvalidRequest
                    - ExpiredToken
                    - InvalidToken
                  message:
                    type: string
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                required:
                - error
                - message
                properties:
                  error:
                    const: AuthMissing
                  message:
                    type: string
  /xrpc/tools.ozone.moderation.queryStatuses:
    get:
      operationId: ozoneModerationQueryStatuses
      summary: Bluesky View moderation statuses of subjects (record or repo).
      description: '*This endpoint is part of the [Ozone moderation service](https://ozone.tools/) APIs. Requests usually require authentication, are directed to the user''s PDS intance, and proxied to the Ozone instance indicated by the DID in the service proxying header. Admin authenentication may also be possible, with request sent directly to the Ozone instance.*


        *To learn more about calling atproto API endpoints like this one, see the [API Hosts and Auth](/docs/advanced-guides/api-directory) guide.*


        View moderation statuses of subjects (record or repo).'
      tags:
      - Ozone Moderation
      x-microcks-operation:
        delay: 100
        dispatcher: FALLBACK
        dispatcherRules: ''
      security:
      - Bearer: []
      parameters:
      - name: includeAllUserRecords
        in: query
        description: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.
        required: false
        schema:
          type: boolean
          description: All subjects, or subjects from given 'collections' param, belonging to the account specified in the 'subject' param will be returned.
        example: true
      - name: subject
        in: query
        description: The subject to get the status for.
        required: false
        schema:
          type: string
          description: The subject to get the status for.
          format: uri
        example: https://example.com/resource
      - name: comment
        in: query
        description: Search subjects by keyword from comments
        required: false
        schema:
          type: string
          description: Search subjects by keyword from comments
        example: example-comment
      - name: reportedAfter
        in: query
        description: Search subjects reported after a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects reported after a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: reportedBefore
        in: query
        description: Search subjects reported before a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects reported before a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: reviewedAfter
        in: query
        description: Search subjects reviewed after a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects reviewed after a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: hostingDeletedAfter
        in: query
        description: Search subjects where the associated record/account was deleted after a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects where the associated record/account was deleted after a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: hostingDeletedBefore
        in: query
        description: Search subjects where the associated record/account was deleted before a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects where the associated record/account was deleted before a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: hostingUpdatedAfter
        in: query
        description: Search subjects where the associated record/account was updated after a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects where the associated record/account was updated after a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: hostingUpdatedBefore
        in: query
        description: Search subjects where the associated record/account was updated before a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects where the associated record/account was updated before a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: hostingStatuses
        in: query
        description: Search subjects by the status of the associated record/account
        required: false
        schema:
          type: array
          items:
            type: string
        example:
        - example-hostingStatuses
      - name: reviewedBefore
        in: query
        description: Search subjects reviewed before a given timestamp
        required: false
        schema:
          type: string
          description: Search subjects reviewed before a given timestamp
          format: date-time
        example: '2024-01-15T12:00:00.000Z'
      - name: includeMuted
        in: query
        description: By default, we don't include muted subjects in the results. Set this to true to include them.
        required: false
        schema:
          type: boolean
          description: By default, we don't include muted subjects in the results. Set this to true to include them.
        example: true
      - name: onlyMuted
        in: query
        description: When set to true, only muted subjects and reporters will be returned.
        required: false
        schema:
          type: boolean
          description: When set to true, only muted subjects and reporters will be returned.
        example: true
      - name: reviewState
        in: query
        description: Specify when fetching subjects in a certain state
        required: false
        schema:
          type: string
          descri

# --- truncated at 32 KB (72 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/bluesky/refs/heads/main/openapi/bluesky-ozone-moderation-api-openapi.yml