# Send one piece of customer feedback to the product as a source record (/api/feedback/send_feedback)

`POST /v1/products/{productId}/source-records`

Operation name: `send_feedback`

Takes a feedback endpoint's key (`endpointKey` through MCP), or the person's own access: product Owners only, the record's source then naming the app and the person (`sentBy`). Only `text` is required; add the customer's company, contact, customer status and ARR when you know them, so feedback counts can weigh it. Send `mrr` instead when you know monthly revenue: the record's ARR is then 12 times it; when both are sent, `arr` is used. Always send an `externalId` (your own id for the feedback) so a retry is safe: a repeat from the same endpoint, or the same person through the same app, answers the record it stored. The record is then split into insights in the background: `get_source_record` shows its status (received, then processed or needs_attention). A record too long for one answer answers its first part (`part`; read on with `get_source_record`). An endpoint, and a person on a product, take at most 120 requests a minute and 5,000 a day (`rate_limited` says when to try again); the person's limit on all calls applies too.

## Authentication

A feedback endpoint's key, sent as `Authorization: Bearer <key>` by the tools that send feedback. A product Owner adds an endpoint with `add_feedback_endpoint`, which shows its key once; `revoke_feedback_endpoint` stops it. Through MCP, `send_feedback` takes the key as its `endpointKey` argument instead. A product Owner's access token sends feedback too, as the person, and so does a full-access API key.

Or: An OAuth access token for the person who allowed your tool: register a client, then the authorization code flow with PKCE (S256). Send it as `Authorization: Bearer <token>` on every route that needs a signed-in person. Calls with a token are limited per person, across all their apps, to 120 calls a minute and 10,000 a UTC day; calls that start AI runs or knowledge base reads (creating an organization, starting a knowledge base read, rebuilding categories, retrying topics or rechecking) also to 10 a minute and 200 a UTC day. Over a limit a call answers 429 `rate_limited` with `Retry-After` and `details.retryAfter` in seconds, and changes nothing.

Or: An API key, sent as `Authorization: Bearer ha_…` (keys made before the rename to Heuristic start `fsa_` and keep working). Keys are created only in the Heuristic web app and shown once. A personal key (Settings → Personal → My API keys) acts as its person in one of their organizations, with exactly their access there, checked on every call; its calls count toward the person's limits on calls through apps and agents, as described for OAuth tokens, and it can't change the person's account (their profile, organizations, invitations or connected apps). An organization key (Settings → Organization → API keys, created by Admins) acts for the organization, not a person: it can see and change every product and its feedback as an Admin can, but not people, product access, CRM connections or the organization's settings, and it can't delete a product; each organization key has its own limits, with the same numbers. Either kind is Full access or Read only (a change with a read-only key answers 403 `read_only_key`), reaches only its own organization (others answer 404), works on /v1 only, not on the MCP server, and can't create keys or manage the organization's API keys. Other refused calls answer 403 `api_key_not_allowed`. A wrong, expired or revoked key, or a disabled member's personal key, answers 401 `unauthorized`. A full-access key sends feedback: a personal key as its person, to the products they own; an organization key to any product of its organization; the record's `sentBy` names the key.

## Path parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `productId` | path | string | yes | A Heuristic id: a uuid, in any case (it is read in lower case). Anything else answers 400 `validation_error`. |

## Request body

Content type: `application/json` (required)

```json
{
  "type": "object",
  "properties": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200000,
      "pattern": "^[^\\u0000]*$",
      "description": "The customer's words, as they wrote or said them: up to 200,000 characters."
    },
    "sourceUrl": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048,
      "pattern": "^[^\\s\\u0000-\\u001f\\u007f-\\u009f]+$",
      "description": "Where the feedback can be read, such as the ticket or call note: an http or https address."
    },
    "saidAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "When the customer gave it: a date (2026-11-03) or a date and time with offset (2026-11-03T14:05:00Z). Left out: when it arrives."
    },
    "externalId": {
      "type": [
        "string",
        "null"
      ],
      "minLength": 1,
      "maxLength": 200,
      "pattern": "^[^\\u0000]*$",
      "description": "Your own id for this feedback, up to 200 characters, so that a retry is safe: a repeat with the same `externalId` on the same endpoint answers the record it stored."
    },
    "company": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "name": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 200,
          "pattern": "^[^\\u0000]*$",
          "description": "The company's name, up to 200 characters."
        },
        "domain": {
          "type": [
            "string",
            "null"
          ],
          "description": "The company's web domain, such as acme.com."
        }
      },
      "description": "The customer's company: a name, a web domain, or both."
    },
    "contact": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "email": {
          "type": "string",
          "maxLength": 254,
          "description": "The contact's email address."
        },
        "name": {
          "type": [
            "string",
            "null"
          ],
          "maxLength": 200,
          "pattern": "^[^\\u0000]*$",
          "description": "The contact's name, up to 200 characters."
        }
      },
      "required": [
        "email"
      ],
      "description": "The person who gave the feedback: an email, and a name if known."
    },
    "customerStatus": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "customer",
        "prospect",
        null
      ],
      "description": "`customer` when they pay for the product, `prospect` when they don't yet."
    },
    "arr": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000000000000,
          "description": "The yearly amount, 0 to 1,000,000,000,000, with at most two decimals."
        },
        "currency": {
          "type": "string",
          "description": "Its ISO 4217 currency code, such as EUR or USD."
        }
      },
      "required": [
        "amount",
        "currency"
      ],
      "description": "The customer's annual recurring revenue, if known."
    },
    "mrr": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "amount": {
          "type": "number",
          "minimum": 0,
          "maximum": 83333333333.33,
          "description": "The monthly amount, 0 to 83,333,333,333.33, with at most two decimals."
        },
        "currency": {
          "type": "string",
          "description": "Its ISO 4217 currency code, such as EUR or USD."
        }
      },
      "required": [
        "amount",
        "currency"
      ],
      "description": "The customer's monthly recurring revenue, if that is what you know instead of ARR: the record's ARR is then 12 times it, in its currency, and the MRR itself is not kept. When `arr` is sent too, `arr` is used and `mrr` is ignored, though a wrong `mrr` is still refused."
    },
    "customFields": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ]
      },
      "description": "Up to 50 extra values to keep with the record, by name: text, numbers, true, false or null."
    }
  },
  "required": [
    "text"
  ],
  "description": "The feedback. Only `text` is required."
}
```

## Responses

### 200

The record an earlier request with this externalId stored

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "saidAt": {
          "type": "string"
        },
        "receivedAt": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "received",
            "processed",
            "needs_attention"
          ]
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "sentBy": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "app": {
              "type": "object",
              "properties": {
                "clientId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "clientId",
                "name"
              ]
            },
            "person": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "required": [
            "app",
            "person"
          ],
          "description": "Who sent it, when an app or agent sent it with a person's sign-in: the app and the person, named as they were when it was sent (the person null once they left the organization). Null for feedback from a feedback endpoint or a CRM."
        },
        "company": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "domain": {
              "type": [
                "string",
                "null"
              ]
            },
            "customerStatus": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "customer",
                "prospect",
                null
              ]
            },
            "arr": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "amount": {
                  "type": "number"
                },
                "currency": {
                  "type": "string"
                }
              },
              "required": [
                "amount",
                "currency"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "domain",
            "customerStatus",
            "arr"
          ]
        },
        "contact": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "name",
            "email"
          ]
        },
        "customerStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "customer",
            "prospect",
            null
          ]
        },
        "arr": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            }
          },
          "required": [
            "amount",
            "currency"
          ]
        },
        "customFields": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "insightsCapped": {
          "type": "boolean"
        },
        "waitingFor": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "knowledge_base",
            null
          ]
        },
        "failedStage": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "split",
            "link",
            null
          ]
        },
        "failureReason": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "too_long",
            null
          ]
        },
        "insights": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "statement": {
                "type": "string"
              },
              "quote": {
                "type": "string"
              },
              "quoteStart": {
                "type": "integer"
              },
              "type": {
                "type": "string",
                "enum": [
                  "feature_request",
                  "bug",
                  "praise",
                  "complaint",
                  "question"
                ]
              },
              "sentiment": {
                "type": "string",
                "enum": [
                  "positive",
                  "neutral",
                  "negative"
                ]
              },
              "linked": {
                "type": "boolean"
              },
              "feature": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "title"
                ]
              },
              "topic": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "edited": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "statement",
              "quote",
              "quoteStart",
              "type",
              "sentiment",
              "linked",
              "feature",
              "topic",
              "edited"
            ]
          }
        },
        "part": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "textFrom": {
              "type": "integer"
            },
            "textTo": {
              "type": "integer"
            },
            "textLength": {
              "type": "integer"
            },
            "insightsFrom": {
              "type": "integer"
            },
            "insightsTo": {
              "type": "integer"
            },
            "insightsTotal": {
              "type": "integer"
            },
            "next": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "textFrom": {
                  "type": "integer"
                },
                "insightsFrom": {
                  "type": "integer"
                }
              },
              "required": [
                "textFrom",
                "insightsFrom"
              ]
            }
          },
          "required": [
            "textFrom",
            "textTo",
            "textLength",
            "insightsFrom",
            "insightsTo",
            "insightsTotal",
            "next"
          ]
        }
      },
      "required": [
        "id",
        "text",
        "sourceUrl",
        "saidAt",
        "receivedAt",
        "status",
        "externalId",
        "source",
        "sentBy",
        "company",
        "contact",
        "customerStatus",
        "arr",
        "customFields",
        "insightsCapped",
        "waitingFor",
        "failedStage",
        "failureReason",
        "insights",
        "part"
      ]
    },
    "meta": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "data",
    "meta"
  ]
}
```

### 201

The stored record

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "sourceUrl": {
          "type": [
            "string",
            "null"
          ]
        },
        "saidAt": {
          "type": "string"
        },
        "receivedAt": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "received",
            "processed",
            "needs_attention"
          ]
        },
        "externalId": {
          "type": [
            "string",
            "null"
          ]
        },
        "source": {
          "type": "string"
        },
        "sentBy": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "app": {
              "type": "object",
              "properties": {
                "clientId": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "clientId",
                "name"
              ]
            },
            "person": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "name"
              ]
            }
          },
          "required": [
            "app",
            "person"
          ],
          "description": "Who sent it, when an app or agent sent it with a person's sign-in: the app and the person, named as they were when it was sent (the person null once they left the organization). Null for feedback from a feedback endpoint or a CRM."
        },
        "company": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "domain": {
              "type": [
                "string",
                "null"
              ]
            },
            "customerStatus": {
              "type": [
                "string",
                "null"
              ],
              "enum": [
                "customer",
                "prospect",
                null
              ]
            },
            "arr": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "amount": {
                  "type": "number"
                },
                "currency": {
                  "type": "string"
                }
              },
              "required": [
                "amount",
                "currency"
              ]
            }
          },
          "required": [
            "id",
            "name",
            "domain",
            "customerStatus",
            "arr"
          ]
        },
        "contact": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "id": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "email": {
              "type": "string"
            }
          },
          "required": [
            "id",
            "name",
            "email"
          ]
        },
        "customerStatus": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "customer",
            "prospect",
            null
          ]
        },
        "arr": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "amount": {
              "type": "number"
            },
            "currency": {
              "type": "string"
            }
          },
          "required": [
            "amount",
            "currency"
          ]
        },
        "customFields": {
          "type": "object",
          "additionalProperties": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "insightsCapped": {
          "type": "boolean"
        },
        "waitingFor": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "knowledge_base",
            null
          ]
        },
        "failedStage": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "split",
            "link",
            null
          ]
        },
        "failureReason": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "too_long",
            null
          ]
        },
        "insights": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "statement": {
                "type": "string"
              },
              "quote": {
                "type": "string"
              },
              "quoteStart": {
                "type": "integer"
              },
              "type": {
                "type": "string",
                "enum": [
                  "feature_request",
                  "bug",
                  "praise",
                  "complaint",
                  "question"
                ]
              },
              "sentiment": {
                "type": "string",
                "enum": [
                  "positive",
                  "neutral",
                  "negative"
                ]
              },
              "linked": {
                "type": "boolean"
              },
              "feature": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "title": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "title"
                ]
              },
              "topic": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": "string"
                  }
                },
                "required": [
                  "id",
                  "name"
                ]
              },
              "edited": {
                "type": "boolean"
              }
            },
            "required": [
              "id",
              "statement",
              "quote",
              "quoteStart",
              "type",
              "sentiment",
              "linked",
              "feature",
              "topic",
              "edited"
            ]
          }
        },
        "part": {
          "type": [
            "object",
            "null"
          ],
          "properties": {
            "textFrom": {
              "type": "integer"
            },
            "textTo": {
              "type": "integer"
            },
            "textLength": {
              "type": "integer"
            },
            "insightsFrom": {
              "type": "integer"
            },
            "insightsTo": {
              "type": "integer"
            },
            "insightsTotal": {
              "type": "integer"
            },
            "next": {
              "type": [
                "object",
                "null"
              ],
              "properties": {
                "textFrom": {
                  "type": "integer"
                },
                "insightsFrom": {
                  "type": "integer"
                }
              },
              "required": [
                "textFrom",
                "insightsFrom"
              ]
            }
          },
          "required": [
            "textFrom",
            "textTo",
            "textLength",
            "insightsFrom",
            "insightsTo",
            "insightsTotal",
            "next"
          ]
        }
      },
      "required": [
        "id",
        "text",
        "sourceUrl",
        "saidAt",
        "receivedAt",
        "status",
        "externalId",
        "source",
        "sentBy",
        "company",
        "contact",
        "customerStatus",
        "arr",
        "customFields",
        "insightsCapped",
        "waitingFor",
        "failedStage",
        "failureReason",
        "insights",
        "part"
      ]
    },
    "meta": {
      "type": "object",
      "additionalProperties": {}
    }
  },
  "required": [
    "data",
    "meta"
  ]
}
```

### 400

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 401

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 403

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 404

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 409

The product was deleted: its feedback endpoints, and its Owners' sign-ins, refuse feedback

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 413

Error

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

### 429

The key, or the person on this product, is over its limit of requests a minute or its daily limit, or the person over their limit on all calls; `Retry-After` and `details.retryAfterSeconds` (`details.retryAfter` for the limit on all calls) say how many seconds to wait

```json
{
  "type": "object",
  "properties": {
    "error": {
      "type": "object",
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {}
      },
      "required": [
        "code",
        "message"
      ]
    }
  },
  "required": [
    "error"
  ]
}
```

## Example request

```bash
curl -X POST "https://staging.heuristic.app/v1/products/{productId}/source-records" \
  -H "Authorization: Bearer <feedback endpoint key>" \
  -H "Content-Type: application/json" \
  -d '{"text":"string","sourceUrl":"string","saidAt":"string","externalId":"string","company":{"name":"string","domain":"string"},"contact":{"email":"string","name":"string"},"customerStatus":"customer","arr":{"amount":0,"currency":"string"},"mrr":{"amount":0,"currency":"string"},"customFields":{}}'
```
