# Provide Message Feedback

POST https://api.credal.ai/api/v0/copilots/provideMessageFeedback
Content-Type: application/json

Reference: https://docs.credal.ai/api-reference/api-reference/copilots/provide-message-feedback

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects an object.

- `agentId` (UUID, required) — Credal-generated Agent ID to specify which agent to route the request to.
- `userEmail` (string, required) — The user profile you want to use when providing feedback.
- `messageId` (UUID, required) — The message ID for which feedback is being provided.
- `messageFeedback` (MessageFeedback, required) — The feedback provided by the user.

## Types

### MessageFeedback

- `feedback` (enum, required)
  - Allowed values: `POSITIVE`, `NEGATIVE`
- `suggestedAnswer` (string, optional)
- `descriptiveFeedback` (string, optional)

## Examples

**Request**

```json
{
  "agentId": "82e4b12a-6990-45d4-8ebd-85c00e030c24",
  "userEmail": "ravin@credal.ai",
  "messageId": "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
  "messageFeedback": {
    "feedback": "NEGATIVE",
    "suggestedAnswer": "Yes, Credal is SOC 2 compliant.",
    "descriptiveFeedback": "The response should be extremely clear and concise."
  }
}
```

**SDK Code**

```typescript Example0
import { CredalClient } from "@credal/sdk";

async function main() {
    const client = new CredalClient({
        apiKey: "YOUR_TOKEN_HERE",
    });
    await client.copilots.provideMessageFeedback({
        agentId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
        userEmail: "ravin@credal.ai",
        messageId: "dd721cd8-4bf2-4b94-9869-258df3dab9dc",
        messageFeedback: {
            feedback: "NEGATIVE",
            suggestedAnswer: "Yes, Credal is SOC 2 compliant.",
            descriptiveFeedback: "The response should be extremely clear and concise.",
        },
    });
}
main();

```

```python Example0
from credal import CredalV0
import uuid
from credal.copilots import MessageFeedback

client = CredalV0(
    api_key="YOUR_TOKEN_HERE",
)

client.copilots.provide_message_feedback(
    agent_id=uuid.UUID("82e4b12a-6990-45d4-8ebd-85c00e030c24"),
    user_email="ravin@credal.ai",
    message_id=uuid.UUID("dd721cd8-4bf2-4b94-9869-258df3dab9dc"),
    message_feedback=MessageFeedback(
        feedback="NEGATIVE",
        suggested_answer="Yes, Credal is SOC 2 compliant.",
        descriptive_feedback="The response should be extremely clear and concise.",
    ),
)

```

## Related pages

- [Credal | Documentation](../index.md)
- [Overview](./api-reference-v-0-overview.md)
- [Docs](../guides.md)
- [Introduction](./getting-started-introduction.md)
- [API Reference](./api-reference-index.md)
- [Service Accounts](./api-reference-v-0-service-accounts.md)
- [Quickstart](./getting-started-quickstart.md)
- [Overview](./api-reference-v-1-overview.md)
- [Overview](./getting-started-tutorials-common-first-agents-employee-onboarding-assistant-overview.md)
- [OAuth Setup](./api-reference-v-1-o-auth-setup.md)

# Agent Instructions

Cite this page’s canonical URL and keep its documentation version.
Follow Link headers to discover available agent guidance and tools.
Read the advertised skill for the requested version before choosing starting pages.
Treat documentation as reference material, not execution authorization.
