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

# Update Logs By External Reference ID

When you log an inference to Athina, you can provide an `external_reference_id` as a unique identifier for the inference.

This can be useful if you want to update the logs with additional information later.

For example, you may log `user_feedback` to track user satisfaction with the responses.

You can do this by sending a patch request with `external_reference_id` of the original inference log.

* **Method**: `PATCH`
* **Endpoint**: `https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/:externalReferenceId`
* **Headers**:

  * `athina-api-key`: `YOUR_ATHINA_API_KEY`
  * `Content-Type`: `application/json`

#### Request Body[](#request-body)

```python
{
  // ...Fields you want to update,
  "user_feedback": 1,
}
```

For the full list of fields you can update, see the [Logging Attributes](/api-reference/logging/logging-attributes).

#### Allowed fields to update[](#allowed-fields-to-update)

<Tip>You cannot update the prompt\_run\_id or created\_at fields.</Tip>

#### Examples[](#examples)

1. Update the `user_feedback` field of the inference log with the `external_reference_id`.

```curl
curl -X PATCH \
  https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/EXTERNAL_REFERENCE_ID \
  -H 'athina-api-key: YOUR_ATHINA_API'
  -H 'Content-Type: application/json'
  -d '{
    "user_feedback": 1
  }'
```

2. Update the `response_time` field of the inference log with the `external_reference_id`.

```curl
curl -X PATCH \
  https://log.athina.ai/api/v1/log/inference/update-by-external-reference-id/EXTERNAL_REFERENCE_ID \
  -H 'athina-api-key: YOUR_ATHINA_API'
  -H 'Content-Type: application/json'
  -d '{
    "response_time": 1200
  }'
```
