# Update Log Reference

<mark style="color:green;">`POST`</mark> `/api/v1/log/reference/update`

Sometimes, you need to update the reference you've been using for a set of logs. For example, a user starts a multi-stage checkout flow. In the first stage of this flow, you might need to use a session ID as the reference, but on the second page, where you've created a database record, you now want to change the session ID to the database record ID.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name            | Type   | Description                                                                                       |
| --------------- | ------ | ------------------------------------------------------------------------------------------------- |
| `channel_id`    | string | The ID of the channel you'll like a log assigned to. This can be found in the URL of the channel. |
| `old_reference` | string | The reference that is currently stored with us.                                                   |
| `new_reference` | string | THe reference you want to change the logs to use.                                                 |

**Response**

We'll return a HTTP 200 response.

{% tabs %}
{% tab title="200" %}

```json
{}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://logwire.gitbook.io/logwire/log/update-log-reference.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
