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

# Scores added via API not displaying in UI

> [!NOTE]
>
> **Applies to:**
>
> * Plan - Any
> * Deployment - Braintrust-hosted
> *
> * Use case - Programmatically adding scores to existing traces via API

## Summary

**Issue:** Scores submitted via the Braintrust feedback API do not appear in the UI for existing traces, and instead create new trace entries with the provided `span_id` and `root_span_id`.

**Cause:** The `span_id` used in the API payload does not match the actual `id` property in the raw trace data.

**Resolution:** Use the correct `id` from the raw span data when submitting scores via the feedback API.

## Resolution Steps

### Step 1: Get the correct span ID

Navigate to the trace in the Braintrust UI and click the "Raw span and trace data" button to view the underlying JSON.

### Step 2: Identify the ID field

Locate the `id` property in the raw trace data JSON - this is the value you need to use in your API calls.

### Step 3: Update your API payload

Use the `id` from the raw data as the `span_id` in your feedback API payload:

```text theme={"theme":{"light":"github-light","dark":"github-dark-dimmed"}}
payload = {
    "events": [
        {
            "span_id": "correct-id-from-raw-data",
            "root_span_id": "correct-id-from-raw-data",
            "scores": 0.0,
            "metadata": feedback_update["metadata"],
            "_is_merge": True,
            "_merge_paths": merge_paths,
        }
    ]
}

```

### Step 4: Verify the score appears

Refresh the trace view in the UI to confirm the score is now attached to the existing trace instead of creating a new one.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.