# Feedback API

Two API endpoints are available for submitting and tracking feedback programmatically. These require configuration with the Kernel team.

## Authentication

Kernel will provide you with an x-api-key to pass to the headers.

## Submit Feedback

**`POST /feedback`**

Submit feedback for a Salesforce account.

```json
{
  "salesforceId": "0011Q00001z8wBzQAI",
  "name": "Missing revenue data",
  "feedback": "Revenue field is showing $0 but this account has known revenue of ~$50M"
}
```

| Field          | Type   | Required | Description                                                                  |
| -------------- | ------ | -------- | ---------------------------------------------------------------------------- |
| `salesforceId` | string | Yes      | Salesforce Account ID (18-character, starts with `001`)                      |
| `feedback`     | string | Yes      | The feedback details                                                         |
| `name`         | string | No       | Short title for the feedback. Defaults to the `salesforceId` if not provided |

**Response**

```json
{
  "status": "Success",
  "message": "Your feedback has been successfully submitted to our team",
  "ticketId": 118793
}
```

Save the `ticketId` to check the status of your feedback later.

## Get Feedback Status

**`GET /feedback`**

Check the status of a previously submitted feedback ticket.

```json
{
  "ticketId": 118793
}
```

| Field      | Type   | Required | Description                                     |
| ---------- | ------ | -------- | ----------------------------------------------- |
| `ticketId` | number | Yes      | The ticket ID returned from the submit endpoint |

**Response**

| Field          | Description                                                  |
| -------------- | ------------------------------------------------------------ |
| `ticketId`     | Ticket number                                                |
| `ticketState`  | `new`, `open`, or `closed`                                   |
| `outcome`      | Resolution outcome (populated when closed)                   |
| `salesforceId` | The Salesforce Account ID from the original submission       |
| `feedbackBody` | The feedback text. Prefixed with ✅ when the ticket is closed |

**Open ticket:**

```json
{
  "ticketId": 118793,
  "ticketState": "new",
  "outcome": "",
  "salesforceId": "0011Q00001z8wBzQAI",
  "feedbackBody": "Revenue field is showing $0 but this account has known revenue of ~$50M"
}
```

**Closed ticket:**

```json
{
  "ticketId": 118793,
  "ticketState": "closed",
  "outcome": "false_feedback_no_action",
  "salesforceId": "0011Q00001z8wBzQAI",
  "feedbackBody": "✅ Revenue field is showing $0 but this account has known revenue of ~$50M"
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kernel.ai/feedback-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
