---
title: "Salvar versão das respostas"
method: POST
path: "/api/management/answers-history"
tags: ["answers-history"]
---

# Salvar versão das respostas

`POST /api/management/answers-history`

Congela as respostas atuais de um formulário em uma nova [versão](https://docs.olie.ai/guides/forms/loose-forms) do histórico; com `clean_edges`, os campos são esvaziados em seguida para o próximo ciclo. O formulário é identificado pelo [pivot](https://docs.olie.ai/api-reference/general/form-answer-pivot), em que `father_class` e `father_id` são obrigatórios.

## Request body

- object
  - `pivot_class` string
  - `form_id` unknown
  - `project_id` unknown
  - `id` unknown
  - `father_class` string
  - `father_id` unknown
  - `clean_edges` boolean

## Response `200`

Sucesso

- object
  - `response` boolean
  - `answer_history` object
    - `answers` object[]
      - `id` integer
      - `type` string
      - `label` string
      - `index` integer
      - `help_text` unknown
      - `description` unknown
      - `options` unknown[]
        - unknown
      - `initial_value` unknown
      - `required` boolean
      - `custom_validation` unknown
      - `conditional` unknown
      - `form_id` integer
      - `created_at` string, date-time
      - `updated_at` string, date-time
      - `deleted_at` unknown
      - `is_multiple` boolean
      - `logical_operator` string
      - `is_migrated` boolean
      - `conditional_action` unknown
      - `answer` string
      - `answered_by` string
    - `user_id` string
    - `frame_id` string
    - `form_id` integer
    - `model_class` string
    - `model_id` integer
    - `updated_at` string, date-time
    - `created_at` string, date-time
    - `id` integer
    - `user` object
      - `id` string
      - `name` string
      - `avatar_url` string, uri

## Other responses

- `404` — Registro de origem não encontrado
- `422` — Validação falhou

## Changes

- **2026-09-22** `d71b18b1685d` — 4 info
  - added optional request body
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `404`
  - added the non-success response with the status `422`

[Change history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/answers-history/post.md)

---

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