Salvar formulário
curl --request POST \
--url https://api.olie.ai/api/management/save-form \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": null,
"title": "Briefing de projeto",
"edges": [
{
"id": "CREATE1",
"label": "Objetivo do projeto",
"type": "short_text",
"index": 0,
"required": true,
"help_text": "Descreva em uma frase.",
"description": null,
"custom_validation": null
},
{
"id": "CREATE2",
"label": "Canal de venda",
"type": "select",
"index": 1,
"required": false,
"options": [
"Loja física",
"E-commerce",
"Marketplace"
]
},
{
"id": "CREATE3",
"label": "URL da loja",
"type": "link",
"index": 2,
"required": false,
"conditional_action": "show",
"logical_operator": "and",
"conditionals": [
{
"target_id": "CREATE2",
"operator": "equals",
"value": "E-commerce"
}
]
}
]
}
'import requests
url = "https://api.olie.ai/api/management/save-form"
payload = {
"id": None,
"title": "Briefing de projeto",
"edges": [
{
"id": "CREATE1",
"label": "Objetivo do projeto",
"type": "short_text",
"index": 0,
"required": True,
"help_text": "Descreva em uma frase.",
"description": None,
"custom_validation": None
},
{
"id": "CREATE2",
"label": "Canal de venda",
"type": "select",
"index": 1,
"required": False,
"options": ["Loja física", "E-commerce", "Marketplace"]
},
{
"id": "CREATE3",
"label": "URL da loja",
"type": "link",
"index": 2,
"required": False,
"conditional_action": "show",
"logical_operator": "and",
"conditionals": [
{
"target_id": "CREATE2",
"operator": "equals",
"value": "E-commerce"
}
]
}
]
}
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({
id: null,
title: 'Briefing de projeto',
edges: [
{
id: 'CREATE1',
label: 'Objetivo do projeto',
type: 'short_text',
index: 0,
required: true,
help_text: 'Descreva em uma frase.',
description: null,
custom_validation: null
},
{
id: 'CREATE2',
label: 'Canal de venda',
type: 'select',
index: 1,
required: false,
options: ['Loja física', 'E-commerce', 'Marketplace']
},
{
id: 'CREATE3',
label: 'URL da loja',
type: 'link',
index: 2,
required: false,
conditional_action: 'show',
logical_operator: 'and',
conditionals: [{target_id: 'CREATE2', operator: 'equals', value: 'E-commerce'}]
}
]
})
};
fetch('https://api.olie.ai/api/management/save-form', 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/save-form",
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([
'id' => null,
'title' => 'Briefing de projeto',
'edges' => [
[
'id' => 'CREATE1',
'label' => 'Objetivo do projeto',
'type' => 'short_text',
'index' => 0,
'required' => true,
'help_text' => 'Descreva em uma frase.',
'description' => null,
'custom_validation' => null
],
[
'id' => 'CREATE2',
'label' => 'Canal de venda',
'type' => 'select',
'index' => 1,
'required' => false,
'options' => [
'Loja física',
'E-commerce',
'Marketplace'
]
],
[
'id' => 'CREATE3',
'label' => 'URL da loja',
'type' => 'link',
'index' => 2,
'required' => false,
'conditional_action' => 'show',
'logical_operator' => 'and',
'conditionals' => [
[
'target_id' => 'CREATE2',
'operator' => 'equals',
'value' => 'E-commerce'
]
]
]
]
]),
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/save-form"
payload := strings.NewReader("{\n \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\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/save-form")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/save-form")
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 \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"form": {
"title": "Briefing de projeto",
"frame_id": "01a0252b-d865-71af-a0a2-d4e168d1ffe5",
"updated_at": "2026-09-22T21:40:47.000000Z",
"created_at": "2026-09-22T21:40:47.000000Z",
"id": 69,
"edges": [
{
"id": 112,
"type": "short_text",
"label": "Objetivo do projeto",
"index": 0,
"help_text": "Descreva em uma frase.",
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"conditionals": []
},
{
"id": 113,
"type": "select",
"label": "Canal de venda",
"index": 1,
"help_text": null,
"description": null,
"options": [
"Loja física",
"E-commerce",
"Marketplace"
],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"conditionals": []
},
{
"id": 114,
"type": "link",
"label": "URL da loja",
"index": 2,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": "show",
"conditionals": [
{
"id": 1,
"form_edge_id": 114,
"target_id": 113,
"operator": "equals",
"value": "E-commerce",
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z"
}
]
}
]
}
}{
"response": false,
"message": "validation_errors",
"error": "The título must be at least 3 characters. (and 1 more error)",
"validation": {
"title": [
"The título must be at least 3 characters."
],
"edges": [
"The edges must have at least 1 items."
]
}
}forms
Salvar formulário
Cria um formulário ou, quando id é enviado, atualiza o título e os campos de um existente. A lista edges é sempre a definição completa: campo existente que não vier no payload é removido definitivamente. Tipos de campo e lógica condicional estão em Criar um formulário.
POST
/
api
/
management
/
save-form
Salvar formulário
curl --request POST \
--url https://api.olie.ai/api/management/save-form \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"id": null,
"title": "Briefing de projeto",
"edges": [
{
"id": "CREATE1",
"label": "Objetivo do projeto",
"type": "short_text",
"index": 0,
"required": true,
"help_text": "Descreva em uma frase.",
"description": null,
"custom_validation": null
},
{
"id": "CREATE2",
"label": "Canal de venda",
"type": "select",
"index": 1,
"required": false,
"options": [
"Loja física",
"E-commerce",
"Marketplace"
]
},
{
"id": "CREATE3",
"label": "URL da loja",
"type": "link",
"index": 2,
"required": false,
"conditional_action": "show",
"logical_operator": "and",
"conditionals": [
{
"target_id": "CREATE2",
"operator": "equals",
"value": "E-commerce"
}
]
}
]
}
'import requests
url = "https://api.olie.ai/api/management/save-form"
payload = {
"id": None,
"title": "Briefing de projeto",
"edges": [
{
"id": "CREATE1",
"label": "Objetivo do projeto",
"type": "short_text",
"index": 0,
"required": True,
"help_text": "Descreva em uma frase.",
"description": None,
"custom_validation": None
},
{
"id": "CREATE2",
"label": "Canal de venda",
"type": "select",
"index": 1,
"required": False,
"options": ["Loja física", "E-commerce", "Marketplace"]
},
{
"id": "CREATE3",
"label": "URL da loja",
"type": "link",
"index": 2,
"required": False,
"conditional_action": "show",
"logical_operator": "and",
"conditionals": [
{
"target_id": "CREATE2",
"operator": "equals",
"value": "E-commerce"
}
]
}
]
}
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({
id: null,
title: 'Briefing de projeto',
edges: [
{
id: 'CREATE1',
label: 'Objetivo do projeto',
type: 'short_text',
index: 0,
required: true,
help_text: 'Descreva em uma frase.',
description: null,
custom_validation: null
},
{
id: 'CREATE2',
label: 'Canal de venda',
type: 'select',
index: 1,
required: false,
options: ['Loja física', 'E-commerce', 'Marketplace']
},
{
id: 'CREATE3',
label: 'URL da loja',
type: 'link',
index: 2,
required: false,
conditional_action: 'show',
logical_operator: 'and',
conditionals: [{target_id: 'CREATE2', operator: 'equals', value: 'E-commerce'}]
}
]
})
};
fetch('https://api.olie.ai/api/management/save-form', 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/save-form",
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([
'id' => null,
'title' => 'Briefing de projeto',
'edges' => [
[
'id' => 'CREATE1',
'label' => 'Objetivo do projeto',
'type' => 'short_text',
'index' => 0,
'required' => true,
'help_text' => 'Descreva em uma frase.',
'description' => null,
'custom_validation' => null
],
[
'id' => 'CREATE2',
'label' => 'Canal de venda',
'type' => 'select',
'index' => 1,
'required' => false,
'options' => [
'Loja física',
'E-commerce',
'Marketplace'
]
],
[
'id' => 'CREATE3',
'label' => 'URL da loja',
'type' => 'link',
'index' => 2,
'required' => false,
'conditional_action' => 'show',
'logical_operator' => 'and',
'conditionals' => [
[
'target_id' => 'CREATE2',
'operator' => 'equals',
'value' => 'E-commerce'
]
]
]
]
]),
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/save-form"
payload := strings.NewReader("{\n \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\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/save-form")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/save-form")
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 \"id\": null,\n \"title\": \"Briefing de projeto\",\n \"edges\": [\n {\n \"id\": \"CREATE1\",\n \"label\": \"Objetivo do projeto\",\n \"type\": \"short_text\",\n \"index\": 0,\n \"required\": true,\n \"help_text\": \"Descreva em uma frase.\",\n \"description\": null,\n \"custom_validation\": null\n },\n {\n \"id\": \"CREATE2\",\n \"label\": \"Canal de venda\",\n \"type\": \"select\",\n \"index\": 1,\n \"required\": false,\n \"options\": [\n \"Loja física\",\n \"E-commerce\",\n \"Marketplace\"\n ]\n },\n {\n \"id\": \"CREATE3\",\n \"label\": \"URL da loja\",\n \"type\": \"link\",\n \"index\": 2,\n \"required\": false,\n \"conditional_action\": \"show\",\n \"logical_operator\": \"and\",\n \"conditionals\": [\n {\n \"target_id\": \"CREATE2\",\n \"operator\": \"equals\",\n \"value\": \"E-commerce\"\n }\n ]\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"form": {
"title": "Briefing de projeto",
"frame_id": "01a0252b-d865-71af-a0a2-d4e168d1ffe5",
"updated_at": "2026-09-22T21:40:47.000000Z",
"created_at": "2026-09-22T21:40:47.000000Z",
"id": 69,
"edges": [
{
"id": 112,
"type": "short_text",
"label": "Objetivo do projeto",
"index": 0,
"help_text": "Descreva em uma frase.",
"description": null,
"options": [],
"initial_value": null,
"required": true,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"conditionals": []
},
{
"id": 113,
"type": "select",
"label": "Canal de venda",
"index": 1,
"help_text": null,
"description": null,
"options": [
"Loja física",
"E-commerce",
"Marketplace"
],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": null,
"conditionals": []
},
{
"id": 114,
"type": "link",
"label": "URL da loja",
"index": 2,
"help_text": null,
"description": null,
"options": [],
"initial_value": null,
"required": false,
"custom_validation": null,
"conditional": null,
"form_id": 69,
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z",
"deleted_at": null,
"is_multiple": false,
"logical_operator": "and",
"is_migrated": false,
"conditional_action": "show",
"conditionals": [
{
"id": 1,
"form_edge_id": 114,
"target_id": 113,
"operator": "equals",
"value": "E-commerce",
"created_at": "2026-09-22T21:40:47.000000Z",
"updated_at": "2026-09-22T21:40:47.000000Z"
}
]
}
]
}
}{
"response": false,
"message": "validation_errors",
"error": "The título must be at least 3 characters. (and 1 more error)",
"validation": {
"title": [
"The título must be at least 3 characters."
],
"edges": [
"The edges must have at least 1 items."
]
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Definição completa do formulário.
Título do formulário (3 a 255 caracteres).
Required string length:
3 - 255Lista completa de campos, na ordem desejada. Campos existentes que não forem enviados são removidos definitivamente.
Minimum array length:
1Show child attributes
Show child attributes
ID do formulário a atualizar. Omita ou envie nulo para criar um novo.
Was this page helpful?