---
title: "Save Fields Suggestion Result"
method: POST
path: "/api/tasks/{task_uuid}/fields-suggestion-result"
tags: ["agent-task-fields-suggestion"]
---

# Save Fields Suggestion Result

`POST /api/tasks/{task_uuid}/fields-suggestion-result`

## Request

- Base URL: `https://api.regdoor.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.regdoor.com/api/tasks/{task_uuid}/fields-suggestion-result`
- Auth: HTTP bearer

Callback: persists one agent run's suggested fields (or its failure).

## Path parameters

- `task_uuid` string, uuid, required

## Request body

- TaskFieldsSuggestionResultRequest: Callback body for one agent run. `ok=False` records `error_message` and flips `ai_fill_status` to `failed` — the Jurídico form then falls back to manual entry with a "Fill with AI" retry button. `ok=True` requires all four suggested fields.
  - `ok` boolean, required
  - `error_message` string, nullable
  - `assunto_principal` string, nullable
  - `criticidade` 'alta' | 'media' | 'baixa'
  - `analise_juridico_regulatorio` string, nullable
  - `prazo_atual` string, date, nullable

## Response `200`

Successful Response

- TaskFieldsSuggestionResultResponse
  - `saved` boolean
  - `ai_fill_status` 'processing' | 'done' | 'failed', required: State of the `task-fields-suggester` Managed Agent run for one Task's Jurídico fields (`assunto_principal`/`criticidade`/`analise_juridico_regulatorio`/ `prazo_atual`). `None` means it was never triggered (Task is `informativo=True`, or predates this feature). `processing` is set right when the Task is created (or a retry is requested); the agent's callback flips it to `done`/`failed`. On `failed`, the Jurídico form falls back to manual entry with a "Fill with AI" retry button.

## Other responses

- `422`: Validation Error

---

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