---
title: "Route agent reply fix"
method: POST
path: "/api/agent-runs/{sid}/route-fix"
tags: ["agent_runs"]
---

# Route agent reply fix

`POST /api/agent-runs/{sid}/route-fix`

## Request

- Base URL: `https://beta.getsales.io/unibox/v1`
- URL: `https://beta.getsales.io/unibox/v1/api/agent-runs/{sid}/route-fix`
- Auth: HTTP bearer and API key in header `Team-SID`

Where a person's fix to an AI SDR reply belongs, with its draft: a Knowledge answer, the reply as the golden set should hold it, a line of the Brief, a line of the voice, a field of the Rules with its value, or a line on a step of the scenario the reply came from, and a sentence on why. place asks for one place's draft. Nothing is saved: apply_agent_fix adds it. 503 composer_unavailable; 409 fix_not_routed (say it another way, or pick the place).

Contract:
- MCP tool `route_agent_fix`, registry package `mcp.unibox/agent_runs`, mount `unibox.agent-memory`.
- Operation `action`, response envelope `action`.
- Flags: read only.

## Path parameters

- `sid` string, required: The run whose reply the fix is about (ub_rn_…): a row of the Analyzer's log, from search_agent_runs.

## Request body

- RouteAgentFixRequest: Request body of `route_agent_fix`.
  - `text` string, required: What the person said about the reply, typed or dictated, as they said it (1..2000 chars).
  - `place` 'knowledge' | 'golden_set' | 'brief' | 'voice' | 'rules' | 'scenario', nullable: The place the person picked, for its draft: knowledge (a fact), golden_set (the reply as it should have gone), brief (a standing rule), voice (one of its four lines), rules (a setting), scenario (a line on its step). Left out, the composer picks.

## Response `200`

`action` success envelope.

- RouteAgentFixResponse
  - `success` true, required
  - `operation` 'action', required
  - `action` string, required: kebab-case verb; matches the route segment.
  - `item` unknown, required
  - `result` object, required
    - `place` 'knowledge' | 'golden_set' | 'brief' | 'voice' | 'rules' | 'scenario', required: Where the fix belongs.
    - `proposal` union, required: Its draft in the place's own shape: pass it to apply_agent_fix as it is or as the person edited it.
      - object
        - `place` 'knowledge', required
        - `title` string, required: The question leads ask, as they put it, which the answer answers (1..120 chars).
        - `text` string, required: The answer: plain sentences that stand on their own (1..1200 chars).
      - object
        - `place` 'golden_set', required
        - `situation` string, required: What the lead wrote, the message the reply answered (1..2000 chars).
        - `answer` string, required: The reply as it should have gone, exactly as it would go out (1..2000 chars).
      - object
        - `place` 'brief', required
        - `section` string, required: The Brief's section the line goes under, by its own heading as route_agent_fix named it.
        - `line` string, required: The line added at the end of that section, one or two plain sentences (1..300 chars).
      - object
        - `place` 'voice', required
        - `line` string, required: Which of the voice's four lines the fix sets: length, questions, register or sign_off (AgentVoiceValue::LINES, a list on the Value, not an enum).
        - `text` string, required: The whole line as it should read from now on, in a few words to the agent (1..160 chars); set and pinned as update_agent_voice sets it.
      - object
        - `place` 'rules', required
        - `field` string, required: The Rules field by its dotted path as route_agent_fix named it: reply_words.linkedin.max, meeting_ask, reply_delay_minutes.min, quiet_hours.from, weekends, followups, followup_days, checks.stop_words and the rest of get_agent_rules.
        - `value` union, required: The new value within what the field takes (a whole number in its range, true or false, a choice of the enum, a time as HH:MM); the Rules refuse one outside it (422).
          - string
          - number
          - boolean
      - object
        - `place` 'scenario', required
        - `scenario` string, required: The scenario the line goes on: a platform scenario's key (info_request) or the team's own scenario's sid (ub_sc_…), as route_agent_fix named it.
        - `step` string, required: The id of the step the line goes on (reply, playbook, nudge…), one of the scenario's steps as route_agent_fix listed them.
        - `line` string, required: The instruction added under the step's instructions, one or two plain sentences to the agent (1..300 chars).
    - `sentence` string, required: The composer's one line on what goes where ("Suggested: ..."), a value to show the person.
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-unibox/revisions/8f1bc317897f?raw)
