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

# Record what the agent should have said

> Stores a preference pair. When response_id is given, the customer message and the actual reply are read from the stored response rather than taken from the…

Stores a preference pair. When response\_id is given, the customer message and the actual reply are read from the stored response rather than taken from the request, so the recorded pair is authentic.

### Request body

`CreateEval`

<ParamField body="response_id" type="string (uuid)" />

<ParamField body="preferred_output" type="string" required />

<ParamField body="user_message" type="string" />

<ParamField body="non_preferred_output" type="string" />

<ParamField body="agent_id" type="string (uuid)" />

<ParamField body="name" type="string" />

<ParamField body="description" type="string" />

<ParamField body="reason_type" type="string" />

<ParamField body="customer_impact" type="string" />

### Response

Returns `object`.

### Status codes

| Code  | Meaning                                                                                                                                                                                                                                        |
| ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `201` | The eval                                                                                                                                                                                                                                       |
| `400` | Invalid request. `issues` names the offending field(s).                                                                                                                                                                                        |
| `401` | Missing, invalid, or expired API key.                                                                                                                                                                                                          |
| `403` | The key lacks a required scope.                                                                                                                                                                                                                |
| `404` | Not found, or not in the organization that owns the key.                                                                                                                                                                                       |
| `409` | Conflict — either the creation ceiling was reached for this organization (`agent_limit_reached`), or a request with the same Idempotency-Key is still in flight (`idempotency_in_progress`); retry the latter after the first attempt settles. |
| `422` | The Idempotency-Key was already used with a DIFFERENT request body (`idempotency_key_reused`). Reuse a key only to retry the identical request.                                                                                                |
| `429` | Rate limit exceeded.                                                                                                                                                                                                                           |

### Access

|                |                        |
| -------------- | ---------------------- |
| Required scope | `responses:write`      |
| Rate limit     | 30 requests per minute |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://response.stateset.com/api/v1/evals' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "response_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "preferred_output": "string",
    "user_message": "string",
    "non_preferred_output": "string",
    "agent_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "name": "string",
    "description": "string",
    "reason_type": "string",
    "customer_impact": "string"
  }'
  ```
</RequestExample>
