---
title: "Add a new feedback to exist session for a specific conversation and AI agent"
method: POST
path: "/aiagents/AddFeedback"
tags: ["AIAgents"]
---

# Add a new feedback to exist session for a specific conversation and AI agent

`POST /aiagents/AddFeedback`

## Request

- Base URL: `https://sb2api.servicechannel.com/v3`
- URL: `https://sb2api.servicechannel.com/v3/aiagents/AddFeedback`
- Auth: OAuth 2
  - Authorization code: `https://sb2login.servicechannel.com/oauth/authorize`
  - Token URL: `https://sb2login.servicechannel.com/oauth/token`
- TypeScript: <https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/docs/aiagents/AddFeedback/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- ServiceChannelServicesWebApiModelsRequestDashboardAiAgentsWoAiAddFeedbackRequest: Model for adding feedback to an existing WoAI feedback session.
  - `SessionId` string, required: SessionId of the existing feedback session to which the feedback will be added.
  - `Rating` integer: Rating provided by the user for the assistant's response, typically on a scale (e.g., 1-5).
  - `Reaction` 'Negative' | 'Neutral' | 'Positive': Reaction provided by the user, indicating their sentiment towards the assistant's response (e.g., Positive = 3, Negative = 1, Neutral = 2).
  - `Feedback` string: Textual feedback provided by the user, offering more detailed insights into their experience with the assistant's response.
  - `AssistantStep` string, required: Step of the assistant's response of creating work order process (issueChoice, assets, duplicates, troubleshooting, summary)
  - `ThreadId` string, required: Identifier for the conversation thread, allowing feedback to be associated with a specific interaction session with the assistant.
  - `TotalTokens` integer: Total number of tokens used in the assistant's response
  - `ElapsedSeconds` integer: Time taken in seconds for the assistant to generate the response
  - `LocationId` integer: LocationId associated with the work order

## Response `200`

Request succeeded and the requested information is in the response.

- ServiceChannelApiModelDashboardWorkOrdersAiWoAiFeedbackSessionResponse
  - `SessionId` string
  - `Type` string
  - `TargetId` string
  - `EntryCount` integer
  - `CreatedAt` string, date-time
  - `UpdatedAt` string, date-time
  - `LatestEntry` ServiceChannelApiModelDashboardWorkOrdersAiWoAiFeedbackEntryResponse
    - `Sequence` integer
    - `SubmittedAt` string, date-time
    - `Rating` integer
    - `Reaction` 'Negative' | 'Neutral' | 'Positive'
    - `Feedback` string
    - `Extensions` object
  - `History` ServiceChannelApiModelDashboardWorkOrdersAiWoAiFeedbackEntryResponse[]
    - `Sequence` integer
    - `SubmittedAt` string, date-time
    - `Rating` integer
    - `Reaction` 'Negative' | 'Neutral' | 'Positive'
    - `Feedback` string
    - `Extensions` object

## Other responses

- `400`: The request is not accepted due to bad syntax, missing parameters, insufficient data, etc.
- `401`: Indicates that the requested resource requires authentication. <br>Error codes: 504 - API call rejected by security permissions;
- `403`: You are not authorized to request this resource, or the resource is unavailable for some reason. <br/>Error codes: 100 — User has no rights to perform this action.
- `500`: The server was unable to complete the request due to an internal error. <br/>Error codes: 501 - Unspecified internal server error occurred

---

[API](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3.md) - [All operations](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/llms.txt) - [OpenAPI document](https://skmtc.dev/servicechannel/apis/servicechannel-api-v-3/revisions/d490d6596809?raw)
