---
title: "Correct which message a reply answers"
method: POST
path: "/v1/messages/{id}/correlation"
tags: ["Messages"]
---

# Correct which message a reply answers

`POST /v1/messages/{id}/correlation`

## Request

- Base URL: `https://www.chatrail.dev`
- URL: `https://www.chatrail.dev/v1/messages/{id}/correlation`
- Auth: HTTP bearer

Re-points an inbound reply at the outbound message it actually answers, or unlinks it with `null`. The engine's original choice is preserved, so corrections measure the correlation rules rather than quietly overwriting them. The previously linked alert reopens for correlation; the newly linked one is marked answered.

## Path parameters

- `id` string, required

## Request body

- object
  - `reply_to_message_id` string, uuid, nullable, required

## Response `200`

The corrected link, and what it overruled.

## Other responses

- `400`: The target is not an outbound message in the same conversation.
- `404`: No such message.
- `409`: Only an inbound message has a correlation to correct.

---

[API](https://skmtc.dev/chatrail/apis/chatrail-api.md) · [All operations](https://skmtc.dev/chatrail/apis/chatrail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/chatrail/apis/chatrail-api/revisions/acc5b88c6f59?raw)
