Agent Message Feedback
List of valid attributes:
Attribute | Description | Specifics |
---|---|---|
message_id | ID of the message being rated | Cannot be set, Must reference an existing agent message |
note | Additional note for the rating | Can be empty, Must be less than 140 characters |
rating | Rating for the agent message | Must be present, Allowed values: -1 (negative) or 1 (positive) |
Create
Endpoint to create feedback for an agent message.
Endpoint
POST /api/v1/messages/:message_id/agent_message_feedbacks
Parameter | Description |
---|---|
message_id | ID of the message that we want to give feedback to |
Request
{ "data": { "type": "agent_message_feedback", "attributes": { "note": "Great job!", "rating": 1 } }}
Response
{ "data": { "id": "f5139073-dc7d-434e-989e-99786b7535a1", "type": "agent_message_feedback", "attributes": { "note": "Great job!", "rating": 1 } }}
Update
Endpoint to update feedback for an agent message.
Endpoint
PUT /api/v1/messages/:message_id/agent_message_feedbacks/:id
Parameter | Description |
---|---|
message_id | ID of the message that we want to give feedback to |
id | ID of the feedback we want to update |
Request
{ "data": { "type": "agent_message_feedback", "attributes": { "note": "Needs improvement", "rating": -1 } }}
Response
{ "data": { "id": "f5139073-dc7d-434e-989e-99786b7535a1", "type": "agent_message_feedback", "attributes": { "note": "Needs improvement", "rating": -1 } }}
Delete
Endpoint to delete feedback for an agent message.
Endpoint
DELETE /api/v1/messages/:message_id/agent_message_feedbacks/:id
Parameter | Description |
---|---|
message_id | ID of the message we want to remove feedback from |
id | ID of the feedback we want to delete |
Response
{ "data": { "id": "f5139073-dc7d-434e-989e-99786b7535a1", "type": "agent_message_feedback", "attributes": { "note": "Needs improvement", "rating": -1 } }}