---
title: "Submit frontend response"
method: POST
path: "/api/mcp/frontend-response"
tags: ["chat"]
---

# Submit frontend response

`POST /api/mcp/frontend-response`

## Request

- Base URL: `https://localhost:8080`
- URL: `https://localhost:8080/api/mcp/frontend-response`
- Auth: none declared

Submits a response from the frontend after receiving a frontend_request event via SSE

## Request body

- FrontendResponseDto
  - `requestId` string, required: Request ID from the frontend_request event
  - `success` boolean: Whether the frontend request was successful
  - `data` object: Response data from frontend (required if error is not provided). May contain a debugContext field with diagnostic info (platform, documentState, trackChanges, timing, textMatch).
  - `error` string: Error message if request failed (required if data is not provided)
  - `debugContext` object: Debug context for troubleshooting (platform, documentState, trackChanges, timing, textMatch, errorDetails)

## Response `200`

Frontend response received successfully

- FrontendResponseResultDto
  - `success` boolean, required: Whether the frontend response was processed successfully
  - `message` string, required: Response message

## Other responses

- `400`: Invalid request data

---

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