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

# Send User Feedback

This endpoint allows you to send user feedbacks collected from your application’s frontend. In particular, it enables you to link end-user feedback or instances where users copy and paste text generated by the AI system to the corresponding user interaction.

<Note>
  User feedbacks are linked to an interaction using the end\_user, input, and output fields you can provide in the metadata. The platform expects the interaction to have already been sent when submitting a user feedback, and the timestamp of the user feedback must be after the timestamp marking the end of the interaction generation.
</Note>

<ParamField body="feedback" type="object" required>
  The user feedback you are tracking.

  <Expandable title="properties">
    <ParamField path="slug" type="string" initialValue="thumbs_up" required>
      This represents the types of user feedbacks you are sending to the platform. Accepted values are:

      * thumbs\_up: Indicates that the end user has given a thumbs up. The text field can be used to include any additional comments left by the user.
      * thumbs\_down: Indicates that the end user has given a thumbs down. The text field can be used to include any additional comments left by the user.
      * copy\_input: Indicates that the user has copied the input message. In this case, the text field should contain the portion of the input that was copied.
      * copy\_output: Indicates that the user has copied the output message. In this case, the text field should contain the portion of the output that was copied.
      * paste: Indicates that the user has pasted some text into the chatbot input box. The text field should contain the pasted text.
      * rating: Indicates that the user has given a score to the chatbot, from 1 to 5. With this slug, you should use the field value instead of the text field.
    </ParamField>

    <ParamField path="text" type="string" initialValue="action related text">
      The text given as extra context to the slug. See slug description for further info.
    </ParamField>

    <ParamField path="value" type="number" initialValue="1">
      The score given by the user. It can be an integer between 1 and 5. This field is only used when the slug is "rating".
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="metadata" type="object" required>
  Metadata is required to accurately associate the user feedback with its corresponding interaction.

  <Expandable title="properties">
    <ParamField path="input" type="string" initialValue="">
      The input of the interactions to which the action refers to. If not given the interaction will be determined using the action time-stamp and the end-user id.
    </ParamField>

    <ParamField path="output" type="string" initialValue="">
      The output of the interactions to which the action refers to. If not given the interaction will be determined using the action time-stamp and the end-user id.
    </ParamField>

    <ParamField path="end_user" type="string" required>
      The identified used for the end-user.
    </ParamField>

    <ParamField path="timestamp" type="string" required>
      The timestamp of the action event.
    </ParamField>

    <ParamField path="anonymize" type="bool">
      Boolean flag. If set to true, PII will be removed from the text field.
    </ParamField>
  </Expandable>
</ParamField>
