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

# API: Feedback Endpoints

> API routes for creating, retrieving, updating, and deleting Feedback resources.

# Feedback Endpoints

Use these endpoints to manage feedback entries within your organization. Some routes also apply to “spaces” (i.e., subsets or collections within your org).

***

## List All Feedback

**GET** `/api/v1/organizations/{org_uuid}/feedbacks`

Returns a paginated list of feedback for the specified organization.

### Path Parameters

* `org_uuid` (string) – The UUID of the organization.

### Query Parameters (optional)

* `page_size` (integer, default: `25`)
* `page_number` (integer, default: `1`)
* `customer_uuids`, `company_uuids` (comma-separated strings)
* `feedback_types` (comma-separated strings)
* `from_date`, `to_date`
* `search`
* Other filters (e.g., `priority`, `min_sentiment`, etc.).

### Example Request

`GET /api/v1/organizations/abc123/feedbacks?page_size=10`

### Example Response

```json theme={null}
{
  "feedbacks": [
    {
      "uuid": "fdbk-1111-2222-3333",
      "organization_uuid": "abc123",
      "customer_uuid": "cust-0001",
      "feedback_contents": "I love this feature!",
      "feedback_date": "2025-01-01T12:34:56",
      "priority": 0,
      "feedback_type": "FEEDBACK_RESPONSE",
      // ...
    }
  ],
  "total_feedback_count": 42
}
```

***

## Create Feedback

**POST** `/api/v1/organizations/{org_uuid}/feedbacks`

Creates a new feedback entry in the specified organization.

### Path Parameters

* `org_uuid` (string)

### Request Body

```json theme={null}
{
  "feedback_contents": "The UI could be simpler.",
  "feedback_date": "2025-03-20T10:15:00",
  "customer_uuid": "cust-0001",
  "priority": 1,
  "feedback_type": "FEEDBACK_RESPONSE",
  "space_uuids": ["space-xyz"]    // optional
}
```

### Example Request

```bash theme={null}
curl -X POST "https://api.useinari.com/api/v1/organizations/abc123/feedbacks" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "feedback_contents": "The UI could be simpler.",
    "customer_uuid": "cust-0001"
  }'
```

### Example Response

```json theme={null}
{
  "feedbacks": [
    {
      "uuid": "fdbk-2222-3333-4444",
      "organization_uuid": "abc123",
      "customer_uuid": "cust-0001",
      "feedback_contents": "The UI could be simpler.",
      "priority": 1,
      "feedback_type": "FEEDBACK_RESPONSE"
      // ...
    }
  ]
}
```

***

## Delete Feedback (Bulk)

**DELETE** `/api/v1/organizations/{org_uuid}/feedbacks`

Removes one or more feedback items from the organization. This removes all highlights associated with the feedback items.

### Path Parameters

* `org_uuid` (string)

### Request Body

```json theme={null}
{
  "feedback_uuids": ["fdbk-1111-2222", "fdbk-3333-4444"]
}
```

### Example Request

```bash theme={null}
curl -X DELETE "https://api.useinari.com/api/v1/organizations/abc123/feedbacks" \
  -H "Authorization: Bearer <YOUR_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "feedback_uuids": ["fdbk-1111-2222", "fdbk-3333-4444"]
  }'
```

### Example Response

```json theme={null}
{}
```

***

## Get a Single Feedback

**GET** `/api/v1/organizations/{org_uuid}/feedbacks/{feedback_uuid}`

Retrieves a single feedback entry, including details such as highlights.

### Path Parameters

* `org_uuid` (string)
* `feedback_uuid` (string)

### Example Response

```json theme={null}
{
  "feedbacks": [
    {
      "uuid": "fdbk-1234",
      "feedback_date": "2025-03-01T00:00:00Z",
      "feedback_contents": "Sample feedback text...",
      "highlights": [
        {
          "uuid": "high-1234",
          "quote": "Sample highlighted text",
          "sentiment_score": 0.8,
          "archived": false
        }
      ]
    }
  ]
}
```

***

## Feedback Highlights (List)

**GET** `/api/v1/organizations/{org_uuid}/feedbacks/{feedback_uuid}/highlights`

Returns the highlights for a single feedback item.

### Path Parameters

* `org_uuid` (string)
* `feedback_uuid` (string)

### Query Parameters (optional)

* `page_size` (integer, default: 25)
* `page_number` (integer, default: 1)

### Example Request

`GET /api/v1/organizations/abc123/feedbacks/fdbk-1234/highlights`

### Example Response

```json theme={null}
{
  "highlights": [
    {
      "uuid": "high-1234",
      "quote": "Sample highlighted text",
      "sentiment_score": 0.8
      // ...
    }
  ],
  "total_highlight_count": 1
}
```

***

## Get Feedback in a Space

**GET** `/api/v1/organizations/{org_uuid}/spaces/{space_uuid}/feedbacks`

Lists feedback entries associated with a particular space.

### Path Parameters

* `org_uuid` (string)
* `space_uuid` (string)

### Example Request

`GET /api/v1/organizations/abc123/spaces/xyz456/feedbacks`

***

## Get Top Feedback Highlights

**GET** `/api/v1/organizations/{org_uuid}/feedback_highlights`

Lists the most “notable” feedback highlights (sorted by sentiment, likes, etc.).

### Path Parameters

* `org_uuid` (string)

### Query Parameters

* `liked_only` (boolean, default: `false`)
* `page_size` (integer, default: `25`)
* `page_number` (integer, default: `1`)
* `sort_by` (string, default: `sentiment`)
* `sort_direction` (string, default: `desc`)

### Example Request

`GET /api/v1/organizations/abc123/feedback_highlights?liked_only=true`

### Example Response

```json theme={null}
{
  "feedback_highlights": [
    {
      "uuid": "high-9999",
      "quote": "This app exceeded my expectations!",
      "sentiment_score": 0.95,
      "liked": true,
      // ...
    }
  ],
  "total_highlight_count": 1,
  "total_customer_count": 1
}
```

***

## Additional Notes

* **Pagination**: All list endpoints support `page_size` (max=100 or 1000, depending on the route) and `page_number`.
* **Filtering**: Many routes accept query params like `search`, `customer_uuids`, `company_uuids`, etc.
* **Error Handling**:
  * **400**: Bad request or invalid parameters.
  * **401**: Unauthorized.
  * **404**: Feedback or organization not found.
  * **500**: Unexpected server error.
* **Space-Specific Endpoints**: Use the `/spaces/{space_uuid}` portion to manage feedback specifically tied to a space.
