curl --request POST \
--url https://api.olie.ai/api/management/answers-history \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pivot_class": "App\\Models\\ProjectLooseForm",
"form_id": null,
"project_id": null,
"id": null,
"father_class": "App\\Models\\Project",
"father_id": null,
"clean_edges": false
}
'import requests
url = "https://api.olie.ai/api/management/answers-history"
payload = {
"pivot_class": "App\Models\ProjectLooseForm",
"form_id": None,
"project_id": None,
"id": None,
"father_class": "App\Models\Project",
"father_id": None,
"clean_edges": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pivot_class: 'App\Models\ProjectLooseForm',
form_id: null,
project_id: null,
id: null,
father_class: 'App\Models\Project',
father_id: null,
clean_edges: false
})
};
fetch('https://api.olie.ai/api/management/answers-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/answers-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pivot_class' => 'App\\Models\\ProjectLooseForm',
'form_id' => null,
'project_id' => null,
'id' => null,
'father_class' => 'App\\Models\\Project',
'father_id' => null,
'clean_edges' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/answers-history"
payload := strings.NewReader("{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/answers-history")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/answers-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"answer_history": {
"answers": [
{
"id": 115,
"type": "short_text",
"label": "Nome completo",
"index": 0,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "Ana Souza",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 116,
"type": "email",
"label": "E-mail",
"index": 1,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "[email protected]",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 117,
"type": "phone",
"label": "Telefone",
"index": 2,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "+5511999998888",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 118,
"type": "select",
"label": "Como conheceu o evento",
"index": 3,
"help_text": null,
"description": null,
"options": [
"Indicação",
"Redes sociais",
"Site"
],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "Site",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 119,
"type": "user",
"label": "Responsável interno",
"index": 4,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:00:15.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": null
}
],
"user_id": "01a0252b-d7a0-7242-9420-bacbd51f678b",
"frame_id": "01a0252b-d865-71af-a0a2-d4e168d1ffe5",
"form_id": 70,
"model_class": "App\\Models\\ProjectLooseForm",
"model_id": 14,
"updated_at": "2026-09-22T22:01:47.000000Z",
"created_at": "2026-09-22T22:01:47.000000Z",
"id": 2,
"user": {
"id": "01a0252b-d7a0-7242-9420-bacbd51f678b",
"name": "Test User",
"avatar_url": "https://exemplo.com.br/avatars/usuario.png"
}
}
}{
"response": false,
"message": "project_model_not_found",
"error": "No query results for model [App\\Models\\Project] 00000000-0000-0000-0000-000000000000"
}{
"response": false,
"message": "validation_errors",
"error": "The father class field is required. (and 2 more errors)",
"validation": {
"father_class": [
"The father class field is required."
],
"father_id": [
"The father id field is required."
],
"clean_edges": [
"The clean edges field must be true or false."
]
}
}Salvar versão das respostas
curl --request POST \
--url https://api.olie.ai/api/management/answers-history \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"pivot_class": "App\\Models\\ProjectLooseForm",
"form_id": null,
"project_id": null,
"id": null,
"father_class": "App\\Models\\Project",
"father_id": null,
"clean_edges": false
}
'import requests
url = "https://api.olie.ai/api/management/answers-history"
payload = {
"pivot_class": "App\Models\ProjectLooseForm",
"form_id": None,
"project_id": None,
"id": None,
"father_class": "App\Models\Project",
"father_id": None,
"clean_edges": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pivot_class: 'App\Models\ProjectLooseForm',
form_id: null,
project_id: null,
id: null,
father_class: 'App\Models\Project',
father_id: null,
clean_edges: false
})
};
fetch('https://api.olie.ai/api/management/answers-history', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.olie.ai/api/management/answers-history",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pivot_class' => 'App\\Models\\ProjectLooseForm',
'form_id' => null,
'project_id' => null,
'id' => null,
'father_class' => 'App\\Models\\Project',
'father_id' => null,
'clean_edges' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.olie.ai/api/management/answers-history"
payload := strings.NewReader("{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.olie.ai/api/management/answers-history")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/answers-history")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pivot_class\": \"App\\\\Models\\\\ProjectLooseForm\",\n \"form_id\": null,\n \"project_id\": null,\n \"id\": null,\n \"father_class\": \"App\\\\Models\\\\Project\",\n \"father_id\": null,\n \"clean_edges\": false\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"answer_history": {
"answers": [
{
"id": 115,
"type": "short_text",
"label": "Nome completo",
"index": 0,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "Ana Souza",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 116,
"type": "email",
"label": "E-mail",
"index": 1,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "[email protected]",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 117,
"type": "phone",
"label": "Telefone",
"index": 2,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "+5511999998888",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 118,
"type": "select",
"label": "Como conheceu o evento",
"index": 3,
"help_text": null,
"description": null,
"options": [
"Indicação",
"Redes sociais",
"Site"
],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:01:40.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": "Site",
"answered_by": "01a0252b-d7a0-7242-9420-bacbd51f678b"
},
{
"id": 119,
"type": "user",
"label": "Responsável interno",
"index": 4,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 70,
"created_at": "2026-09-22T22:00:15.000000Z",
"updated_at": "2026-09-22T22:00:15.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"answer": null
}
],
"user_id": "01a0252b-d7a0-7242-9420-bacbd51f678b",
"frame_id": "01a0252b-d865-71af-a0a2-d4e168d1ffe5",
"form_id": 70,
"model_class": "App\\Models\\ProjectLooseForm",
"model_id": 14,
"updated_at": "2026-09-22T22:01:47.000000Z",
"created_at": "2026-09-22T22:01:47.000000Z",
"id": 2,
"user": {
"id": "01a0252b-d7a0-7242-9420-bacbd51f678b",
"name": "Test User",
"avatar_url": "https://exemplo.com.br/avatars/usuario.png"
}
}
}{
"response": false,
"message": "project_model_not_found",
"error": "No query results for model [App\\Models\\Project] 00000000-0000-0000-0000-000000000000"
}{
"response": false,
"message": "validation_errors",
"error": "The father class field is required. (and 2 more errors)",
"validation": {
"father_class": [
"The father class field is required."
],
"father_id": [
"The father id field is required."
],
"clean_edges": [
"The clean edges field must be true or false."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Endereço (pivot) do formulário a versionar.
Tipo de vínculo do formulário (ex.: App\Models\ProjectLooseForm). Define quais atributos de endereço são obrigatórios.
ID do formulário.
Tipo do registro de origem, quase sempre App\Models\Project. Usado para conferir se o formulário está anexado ali.
ID do registro de origem.
Atributo de endereço: ID do projeto, para vínculos de funil, etapa e avulso.
Atributo de endereço: ID do registro (projeto, cliente, contato, usuário da conta ou formulário avulso).
Atributo de endereço: ID do funil, para App\Models\ProjectFunnelAssignment.
Atributo de endereço: ID da etapa, para App\Models\ProjectStepForm.
Se true, esvazia as respostas do formulário depois de salvar a versão. Padrão: false.
Was this page helpful?