> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bodyguard.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Text analysis feedback

> Sends [feedback](/en/api-reference/concepts#feedback) on a classification returned by [`POST /analyze/v1/text`](/api-reference/analyze/analyze-a-text-message) that you judge incorrect for a given message, with the classifications you would have expected instead.

Send the exact analyze request body you initially submitted in `analyzeRequest`. This will allow Bodyguard to replicate the analysis you referenced in your feedback and potentially enhance it based on your context.

Before diving in, we recommend reading the [text taxonomy](/en/documentation/taxonomy/text-classifications) to understand the classifications you can add or remove.




## OpenAPI

````yaml /openapi/feedback.openapi.yaml post /feedback/v1/text
openapi: 3.1.0
info:
  title: Bodyguard Feedback API
  version: 1.0.0
servers:
  - url: https://api.bodyguard.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Feedback
    description: Classification feedback endpoints.
paths:
  /feedback/v1/text:
    post:
      tags:
        - Feedback
      summary: Text analysis feedback
      description: >
        Sends [feedback](/en/api-reference/concepts#feedback) on a
        classification returned by [`POST
        /analyze/v1/text`](/api-reference/analyze/analyze-a-text-message) that
        you judge incorrect for a given message, with the classifications you
        would have expected instead.


        Send the exact analyze request body you initially submitted in
        `analyzeRequest`. This will allow Bodyguard to replicate the analysis
        you referenced in your feedback and potentially enhance it based on your
        context.


        Before diving in, we recommend reading the [text
        taxonomy](/en/documentation/taxonomy/text-classifications) to understand
        the classifications you can add or remove.
      operationId: bodyguard.feedback.v1.CreateTextFeedback
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/bodyguard.feedback.v1.CreateTextFeedbackRequest
            examples:
              removeClassification:
                summary: Remove a classification that does not apply
                value:
                  analyzeRequest:
                    channelId: <your-channel-id>
                    text: Einstein is an asshole
                    publishedAt: '2026-04-23T10:30:00.000Z'
                    reference: comment-12346
                  classificationsToRemove:
                    - INSULT
                  notes: Quoting a well-known joke, not an insult directed at anyone.
                  confidence: HIGH
              addAndRemove:
                summary: Replace a classification
                value:
                  analyzeRequest:
                    channelId: <your-channel-id>
                    text: Einstein is an asshole
                    publishedAt: '2026-04-23T10:30:00.000Z'
                    language: en
                    reference: comment-12346
                    author:
                      username: johndoe
                      reference: user-987
                      countryCode: US
                  classificationsToRemove:
                    - INSULT
                  classificationsToAdd:
                    - CRITICISM
                  notes: Criticism of a public figure, not a personal insult.
                  confidence: MEDIUM
      responses:
        '200':
          description: Feedback recorded.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/bodyguard.feedback.v1.CreateTextFeedbackResponse
              examples:
                recorded:
                  summary: Feedback recorded
                  value:
                    id: 018f3b04-9c11-7a52-8e0d-3b7c9a1f4e62
components:
  schemas:
    bodyguard.feedback.v1.CreateTextFeedbackRequest:
      type: object
      required:
        - analyzeRequest
      description: >-
        Feedback on a text analysis. Provide at least one of
        `classificationsToAdd`, `classificationsToRemove`, or `notes` — a
        request with none of the three is considered invalid.
      properties:
        analyzeRequest:
          $ref: '#/components/schemas/bodyguard.analyze.v1.AnalyzeTextRequest'
          description: >-
            The analyze request body you originally sent to `POST
            /analyze/v1/text`. Send it unchanged so Bodyguard can identify the
            exact analysis your feedback refers to. It already carries the
            [channel](/en/api-reference/concepts#channel) the message belongs
            to, and your own `reference` for the message when you sent one.
        classificationsToRemove:
          type: array
          description: >-
            Classifications Bodyguard returned that you judge do not apply to
            this content. See the [text
            taxonomy](/en/documentation/taxonomy/text-classifications) for the
            full list.
          items:
            type: string
          example:
            - INSULT
        classificationsToAdd:
          type: array
          description: >-
            Classifications you judge apply to this content but that Bodyguard
            did not return. See the [text
            taxonomy](/en/documentation/taxonomy/text-classifications) for the
            full list.
          items:
            type: string
          example:
            - CRITICISM
        notes:
          type: string
          description: >-
            Notes will help explain why you judge the content differently from
            the classification received. They help Bodyguard's moderation team
            understand your feedback and can lead to a quicker edit. Note-only
            feedback is valid and will be reviewed by our team.
        confidence:
          $ref: '#/components/schemas/bodyguard.feedback.v1.Feedback.Confidence'
    bodyguard.feedback.v1.CreateTextFeedbackResponse:
      type: object
      required:
        - id
      properties:
        id:
          type: string
          format: uuid
          description: Bodyguard's identifier for this feedback.
    bodyguard.analyze.v1.AnalyzeTextRequest:
      type: object
      required:
        - channelId
        - text
      properties:
        channelId:
          type: string
          format: uuid
          description: >-
            Identifier of the [channel](/en/api-reference/concepts#channel) the
            text belongs to. Provided by Bodyguard.
        text:
          type: string
          maxLength: 10000
          description: The text content that was analyzed.
          example: I love this product!
        publishedAt:
          type: string
          format: date-time
          description: >-
            [Publication
            date](/en/api-reference/concepts#publication-date-publishedat) of
            the message.
        reference:
          type: string
          maxLength: 256
          description: Your own stable identifier for this piece of content.
        permalink:
          type: string
          format: uri
          description: A public URL pointing to the content, if available.
        language:
          type: string
          minLength: 2
          maxLength: 2
          description: >-
            Language of the content as an ISO 639-1 code (e.g. `en`, `fr`). If
            set, the analysis is forced in this language and auto-detection is
            disabled. If omitted, language is auto-detected.
          example: en
        post:
          $ref: '#/components/schemas/bodyguard.analyze.v1.AnalyzeTextRequest.Post'
        author:
          $ref: '#/components/schemas/bodyguard.analyze.v1.AnalyzeTextRequest.Author'
    bodyguard.feedback.v1.Feedback.Confidence:
      type: string
      description: >-
        Confidence scores reflect a feedback source's reliability based on its
        moderation expertise, helping Bodyguard prioritize feedback. Scores
        range from `LOW` to `VERY_HIGH`: end-user reports may be `LOW`, while
        Trust & Safety feedback may be `VERY_HIGH`. This field is optional —
        omit it if reliability can't be assessed.
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - VERY_HIGH
    bodyguard.analyze.v1.AnalyzeTextRequest.Post:
      type: object
      description: >-
        Metadata about the post the analyzed content belongs to, as sent in the
        original analyze request.
      properties:
        title:
          type: string
          maxLength: 2048
          description: >-
            Title or short description of the post. Can be omitted or left
            empty, in which case `reference` is required.
        reference:
          type: string
          maxLength: 256
          description: >-
            Your own stable identifier for this post. Required if `title` is
            omitted or empty.
        publishedAt:
          type: string
          format: date-time
          description: >-
            [Publication
            date](/en/api-reference/concepts#publication-date-publishedat) of
            the post.
        permalink:
          type: string
          format: uri
          description: Public URL of the post.
        countryCodes:
          type: array
          description: >-
            Countries the post is aimed at, as uppercase ISO 3166-1 alpha-2
            codes (e.g. `US`, `FR`). A post can target several countries. This
            information will help Bodyguard adapt its moderation rules to the
            cultural and linguistic context of each country. A word can be an
            insult in one country and a neutral adjective in another. Including
            the country codes offers the context necessary for more accurate
            content moderation.
          items:
            type: string
            minLength: 2
            maxLength: 2
          example:
            - US
            - CA
      anyOf:
        - required:
            - title
        - required:
            - reference
    bodyguard.analyze.v1.AnalyzeTextRequest.Author:
      type: object
      description: >-
        Metadata about the author of the content, as sent in the original
        analyze request.
      properties:
        username:
          type: string
          maxLength: 255
          description: >-
            Display name / username of the author. Can be omitted or left empty,
            in which case `reference` is required.
        reference:
          type: string
          maxLength: 256
          description: >-
            Your own stable identifier for this author. Required if `username`
            is omitted or empty.
        permalink:
          type: string
          format: uri
          description: Public URL of the author's profile.
        profilePictureUrl:
          type: string
          format: uri
          description: URL of the author's profile picture.
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          description: >-
            Country the author is located in, as an uppercase ISO 3166-1 alpha-2
            code (e.g. `US`, `FR`). This information will help Bodyguard adapt
            its moderation rules to the cultural and linguistic context of each
            country. A word can be an insult in one country and a neutral
            adjective in another. Including the country code offers the context
            necessary for more accurate content moderation.
          example: US
      anyOf:
        - required:
            - username
        - required:
            - reference
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      x-default: ApiKey <your-api-key>
      description: |
        API key authentication. Provide your key in the `Authorization`
        header with the `ApiKey` scheme:
        ```
        Authorization: ApiKey <your-api-key>
        ```

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.