> ## 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 originally submitted in `analyzeRequest` so Bodyguard can reproduce the analysis your feedback refers to.

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 originally submitted in
        `analyzeRequest` so Bodyguard can reproduce the analysis your feedback
        refers to.


        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: >-
            Free-text comment explaining why you judge the content differently.
            Helps Bodyguard's moderation teams understand the context behind
            your feedback. Counts on its own: a feedback carrying only `notes`,
            with no classification change, is valid.
        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: >-
            Hint about the content language as an ISO 639-1 code (e.g. `en`,
            `fr`).
          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: >-
        How confident you are about the classifications you submitted. Bodyguard
        uses it to prioritise which feedback to review first. You can base it on
        who flagged the content on your side — for example `LOW` or `MEDIUM` for
        a report from an end-user, `HIGH` or `VERY_HIGH` for a decision from
        your Trust & Safety team. Optional — omit it if you cannot qualify your
        confidence.
      enum:
        - LOW
        - MEDIUM
        - HIGH
        - VERY_HIGH
    bodyguard.analyze.v1.AnalyzeTextRequest.Post:
      type: object
      required:
        - title
      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.
        reference:
          type: string
          maxLength: 256
          description: Your own stable identifier for this post.
        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.
        countryCode:
          type: string
          minLength: 2
          maxLength: 2
          description: >-
            Country the post is aimed at, as an uppercase ISO 3166-1 alpha-2
            code (e.g. `US`, `FR`).
          example: US
    bodyguard.analyze.v1.AnalyzeTextRequest.Author:
      type: object
      required:
        - username
      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.
        reference:
          type: string
          maxLength: 256
          description: Your own stable identifier for this author.
        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`).
          example: US
  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>
        ```

````