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

# Respond to Feedback

This endpoint allows a merchant or partner to programmatically respond to a
customer's feedback with a text-based response. This will trigger a message to
the Thanx customer on behalf of the merchant. Only a single merchant response
is allowed for a given feedback record.

<Info>
  Scope required: `feedbacks.write`
</Info>

### Parameters

<ParamField path="id" type="string" required>
  Feedback ID
</ParamField>

### Parameters

<ParamField body="response" type="string" required>
  Merchant's response to the user's feedback
</ParamField>

### Response

<Snippet file="entities/feedback.mdx" />

<RequestExample>
  ```bash theme={null}
  curl https://api.thanxsandbox.com/feedbacks/590485d6f0/response \
    -X POST \
    -H 'X-ClientId: {client_id}' \
    -H 'Accept-Version: v4.0' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer {access_token}' \
    -d '{
      "feedback": {
        "response": "Merchant's written response to the customer's review."
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "feedback": {
      "id": "590485d6f0",
      "user_id": "weorifsdf",
      "merchant_id": "9a1f0772c",
      "location_id": "fgr2349gh",
      "state": "reviewed",
      "purchased_at": "2020-01-05T20:00:00Z",
      "viewed_at": "2020-01-06T20:00:00Z",
      "rated_at": "2020-01-06T20:02:00Z",
      "reviewed_at": "2020-01-06T20:03:00Z",
      "responded_at": null,
      "expires_at": "2020-01-07T20:00:00Z",
      "rating": 10,
      "review": "Customer's written review for their latest purchase.",
      "response": "Merchant's written response to the customer's review.",
      "purchase": {
        "id": "wourhfiwer",
        "purchased_at": "2020-01-01T20:00:00Z",
        "amount": 9.99,
        "order": {
          "id": "aepo3cme2p",
          "provider": "Toast"
        }
      }
    }
  }
  ```
</ResponseExample>
