# Enrichment Feedback

> Submit freeform feedback on a returned enrichment result (synchronous, 200).

- **Endpoint:** `POST https://api.nyne.ai/person/enrichment/feedback`
- **Group:** Person APIs (https://api.nyne.ai/documentation/person.md)
- **Auth:** `X-API-Key` + `X-API-Secret` headers
- **Mode:** Synchronous — the response is returned inline.
- **HTML version:** https://api.nyne.ai/documentation/person/enrichment-feedback

Submit a freeform comment about a previously returned enrichment result. Unlike the rest of `/person/*` this endpoint is **synchronous** — it writes the feedback record and returns `200` inline (no queue, no `request_id` to poll). The `request_id` must reference an enrichment request owned by your API key’s user; feedback on another user’s request is rejected with `403 permission_denied`.

## Authentication

All `/person/*` and `/company/*` endpoints authenticate with an API key and secret sent as HTTP headers on every request: `X-API-Key` and `X-API-Secret`. Create keys from your Nyne dashboard and keep the secret server-side. Rate limits: 100 requests/minute, 1,000 requests/hour. Full guide: https://api.nyne.ai/documentation/authentication.md

## Parameters

| Name | Type | Required | Description | Example |
| --- | --- | --- | --- | --- |
| `request_id` | string | **yes** | The `request_id` of the enrichment result you are commenting on. | "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271" |
| `comments` | string | **yes** | Your freeform feedback. Non-empty after trimming. | "Phone number was out of date." |

## Credit usage

| Item | Credits | Condition |
| --- | --- | --- |
| Feedback | 0 | Submitting feedback is free |

## Responses

| Code | Meaning |
| --- | --- |
| `200` | Feedback stored |
| `400` | Missing request_id/comments or malformed JSON |
| `401` | Missing or invalid API credentials |
| `403` | permission_denied — the request_id is not owned by your account; or ip_not_allowed |
| `404` | request_not_found — no enrichment request matches the request_id |
| `429` | rate_limit_exceeded |
| `503` | service_unavailable — backing store unconfigured |

## Example request

### cURL

```bash
curl -X POST https://api.nyne.ai/person/enrichment/feedback \
  -H "X-API-Key: nyne_live_a17f…3c9b" \
  -H "X-API-Secret: nyne_sec_••••••••" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271",
    "comments": "Phone number was out of date."
  }'
```

### Python

```python
import requests

resp = requests.post(
    "https://api.nyne.ai/person/enrichment/feedback",
    headers={
        "X-API-Key": "nyne_live_a17f…3c9b",
        "X-API-Secret": "nyne_sec_••••••••",
    },
    json={
        "request_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271",
        "comments": "Phone number was out of date.",
    },
)
data = resp.json()
print(data)
```

### Node

```javascript
const resp = await fetch("https://api.nyne.ai/person/enrichment/feedback", {
  method: "POST",
  headers: {
    "X-API-Key": "nyne_live_a17f…3c9b",
    "X-API-Secret": "nyne_sec_••••••••",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    request_id: "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271",
    comments: "Phone number was out of date.",
  }),
});
const data = await resp.json();
console.log(data);
```

### PHP

```php
<?php
$ch = curl_init("https://api.nyne.ai/person/enrichment/feedback");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => [
    "X-API-Key: nyne_live_a17f…3c9b",
    "X-API-Secret: nyne_sec_••••••••",
    "Content-Type: application/json",
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "request_id" => "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271",
    "comments" => "Phone number was out of date.",
  ]),
]);
$data = json_decode(curl_exec($ch), true);
print_r($data);
```

## Example response

```json
{
  "success": true,
  "message": "Feedback submitted successfully",
  "request_id": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4_1717000000_4271"
}
```

---

All documentation pages are available as Markdown by appending `.md` to their URL. Index: https://api.nyne.ai/llms.txt
