POST
/
feedback
curl --request POST \
  --url https://app.melodi.fyi/api/external/feedback \
  --header 'Content-Type: application/json' \
  --header 'api-key: <api-key>' \
  --data '{
  "feedbackType": "POSITIVE",
  "feedbackText": "<string>",
  "externalThreadId": "<string>",
  "externalMessageId": "<string>",
  "projectId": 123,
  "externalUser": {
    "externalId": "<string>",
    "email": "<string>",
    "name": "<string>",
    "username": "<string>",
    "segments": {
      "team": "engineering",
      "role": "developer"
    }
  },
  "attributes": {
    "Quality": "Wonderful",
    "Relevance": "High"
  }
}'
{
  "id": 123,
  "feedbackType": "<string>",
  "feedbackText": "<string>",
  "externalUser": {
    "id": 123,
    "organizationId": 123,
    "externalId": "<string>",
    "name": "<string>",
    "email": "<string>",
    "username": "<string>",
    "segments": [
      {
        "id": 123,
        "organizationId": 123,
        "name": "<string>",
        "userSegmentTypeId": 123,
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z",
        "type": {
          "id": 123,
          "organizationId": 123,
          "name": "<string>",
          "createdAt": "2023-11-07T05:31:56Z",
          "updatedAt": "2023-11-07T05:31:56Z"
        }
      }
    ],
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "attributeOptions": [
    {
      "id": 123,
      "attributeId": 123,
      "name": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "attribute": {
        "id": 123,
        "organizationId": 123,
        "projectId": 123,
        "name": "<string>",
        "options": [
          {
            "id": 123,
            "attributeId": 123,
            "name": "<string>",
            "createdAt": "2023-11-07T05:31:56Z",
            "updatedAt": "2023-11-07T05:31:56Z"
          }
        ],
        "createdAt": "2023-11-07T05:31:56Z",
        "updatedAt": "2023-11-07T05:31:56Z"
      }
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

api-key
string
header
required

Your Melodi API key

Body

application/json

Create feedback request object. Feedback is always associated with a message:

  • If only externalThreadId is provided, feedback will be attached to the last message in the thread
  • If both externalThreadId and externalMessageId are provided, feedback will be attached to the specified message Note: externalThreadId is only unique per project, so including projectId is recommended to ensure correct thread identification.

Response

200
application/json

Feedback successfully created

The response is of type object.