---
title: "Api Triage"
method: POST
path: "/v1/optimizer/triage"
tags: ["optimizer"]
---

# Api Triage

`POST /v1/optimizer/triage`

## Request

- Base URL: `https://api.branchly.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.branchly.io/v1/optimizer/triage`
- Auth: API key in header `branchly-api-key`

Run the optimizer agent against one customer-reported issue.

## Request body

- IssueReportAPI
  - `application_id` string, uuid, required
  - `chat_request_id` string, uuid, required
  - `session_id` string, uuid, required
  - `issue` string, required
  - `expected_output` string, required
  - `meta` object

## Response `200`

Successful Response

- TriageResponseAPI
  - `chat_request_id` string, uuid, required
  - `session_id` string, uuid, required
  - `application_id` string, uuid, required
  - `resolution_type` 'Manual FAQ Node' | 'Amended Output Prompt' | 'Adjusted AI Action Params' | 'Amended Routing Prompt' | 'Other' | 'Code Adjustments' | 'Adjust Customer Web Page Settings' | 'Adjust Data Source' | 'Create AI Action' | 'Deleted Cached Response' | 'Ignore' | 'Bugfix' | 'No Action' | 'Technical' | 'Delete Outdated Pages', required
  - `recommendations` union[], required
    - union
      - PromptUpdateRecommendation
        - `type` 'prompt:update'
        - `reasoning` string, required: Why the change is needed and what effect it will have.
        - `subtype` 'routing_instructions' | 'output_instructions', required: routing_instructions = Prompt Persona (which AI Action fires); output_instructions = Output Instructions (response style/format).
        - `prompt` string, required: The new prompt text.
      - DataSourceUpdateRecommendation
        - `type` 'data_source:update'
        - `reasoning` string, required: Why the change is needed and what effect it will have.
        - `data_source_id` string, uuid, required
        - `settings_delta` object, required: Partial settings to merge into the existing settings object. Only the fields to change — NOT the full settings object. The applying system reads current settings first, merges this delta, then writes the complete object (per the skill's read-first-merge-write pattern).
        - `name` string, nullable
        - `schedule` object, nullable
      - NodeAddRecommendation
        - `type` 'node:add'
        - `reasoning` string, required: Why the change is needed and what effect it will have.
        - `title` string, required: The new node's title (plain text, session's language).
        - `text` string, required: The new node's content (plain text, session's language).
        - `source` string, nullable
        - `label` string, nullable
        - `score_boost` number, nullable
      - ToolUpdateRecommendation
        - `type` 'tool:update'
        - `reasoning` string, required: Why the change is needed and what effect it will have.
        - `tool_id` string, uuid, required
        - `name` string, nullable
        - `tool_description` string, nullable: The tool's new description (clear trigger conditions for the routing agent).
        - `active` boolean, nullable
        - `function_arguments` object, nullable: Retrieval/config changes, e.g. document_limit_default, retrieval_method, data_source_ids_filter.
      - ToolAddRecommendation
        - `type` 'tool:add'
        - `reasoning` string, required: Why the change is needed and what effect it will have.
        - `name` string, required
        - `tool_description` string, required: The proposed tool's description (clear trigger conditions).
        - `function_arguments` object, nullable: Proposed tool config / function arguments.
  - `analysis` string, required
  - `meta` object

## Other responses

- `422`: Validation Error

---

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