curl --request POST \
--url https://api.olie.ai/api/management/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Nova meta",
"description": "Descrição da meta",
"status": "active",
"type": "funnel_steps_links_by_user",
"periodicity": 1,
"target": 10,
"unit": "count",
"comparison_mode": "target",
"start_date": "2026-05-27",
"end_date": "2026-06-05",
"children": [],
"funnel_step_id": 197,
"user_id": "019c75de-5124-71d6-8698-271e32b743ce"
}
'import requests
url = "https://api.olie.ai/api/management/goals"
payload = {
"title": "Nova meta",
"description": "Descrição da meta",
"status": "active",
"type": "funnel_steps_links_by_user",
"periodicity": 1,
"target": 10,
"unit": "count",
"comparison_mode": "target",
"start_date": "2026-05-27",
"end_date": "2026-06-05",
"children": [],
"funnel_step_id": 197,
"user_id": "019c75de-5124-71d6-8698-271e32b743ce"
}
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({
title: 'Nova meta',
description: 'Descrição da meta',
status: 'active',
type: 'funnel_steps_links_by_user',
periodicity: 1,
target: 10,
unit: 'count',
comparison_mode: 'target',
start_date: '2026-05-27',
end_date: '2026-06-05',
children: [],
funnel_step_id: 197,
user_id: '019c75de-5124-71d6-8698-271e32b743ce'
})
};
fetch('https://api.olie.ai/api/management/goals', 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/goals",
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([
'title' => 'Nova meta',
'description' => 'Descrição da meta',
'status' => 'active',
'type' => 'funnel_steps_links_by_user',
'periodicity' => 1,
'target' => 10,
'unit' => 'count',
'comparison_mode' => 'target',
'start_date' => '2026-05-27',
'end_date' => '2026-06-05',
'children' => [
],
'funnel_step_id' => 197,
'user_id' => '019c75de-5124-71d6-8698-271e32b743ce'
]),
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/goals"
payload := strings.NewReader("{\n \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\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/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/goals")
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 \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\n}"
response = http.request(request)
puts response.read_bodyCriar uma meta
Cria uma nova meta. Permite associar metas filhas (children) para metas compostas. Após a criação, executa o cálculo persistente do progresso.
curl --request POST \
--url https://api.olie.ai/api/management/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Nova meta",
"description": "Descrição da meta",
"status": "active",
"type": "funnel_steps_links_by_user",
"periodicity": 1,
"target": 10,
"unit": "count",
"comparison_mode": "target",
"start_date": "2026-05-27",
"end_date": "2026-06-05",
"children": [],
"funnel_step_id": 197,
"user_id": "019c75de-5124-71d6-8698-271e32b743ce"
}
'import requests
url = "https://api.olie.ai/api/management/goals"
payload = {
"title": "Nova meta",
"description": "Descrição da meta",
"status": "active",
"type": "funnel_steps_links_by_user",
"periodicity": 1,
"target": 10,
"unit": "count",
"comparison_mode": "target",
"start_date": "2026-05-27",
"end_date": "2026-06-05",
"children": [],
"funnel_step_id": 197,
"user_id": "019c75de-5124-71d6-8698-271e32b743ce"
}
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({
title: 'Nova meta',
description: 'Descrição da meta',
status: 'active',
type: 'funnel_steps_links_by_user',
periodicity: 1,
target: 10,
unit: 'count',
comparison_mode: 'target',
start_date: '2026-05-27',
end_date: '2026-06-05',
children: [],
funnel_step_id: 197,
user_id: '019c75de-5124-71d6-8698-271e32b743ce'
})
};
fetch('https://api.olie.ai/api/management/goals', 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/goals",
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([
'title' => 'Nova meta',
'description' => 'Descrição da meta',
'status' => 'active',
'type' => 'funnel_steps_links_by_user',
'periodicity' => 1,
'target' => 10,
'unit' => 'count',
'comparison_mode' => 'target',
'start_date' => '2026-05-27',
'end_date' => '2026-06-05',
'children' => [
],
'funnel_step_id' => 197,
'user_id' => '019c75de-5124-71d6-8698-271e32b743ce'
]),
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/goals"
payload := strings.NewReader("{\n \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\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/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.olie.ai/api/management/goals")
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 \"title\": \"Nova meta\",\n \"description\": \"Descrição da meta\",\n \"status\": \"active\",\n \"type\": \"funnel_steps_links_by_user\",\n \"periodicity\": 1,\n \"target\": 10,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"start_date\": \"2026-05-27\",\n \"end_date\": \"2026-06-05\",\n \"children\": [],\n \"funnel_step_id\": 197,\n \"user_id\": \"019c75de-5124-71d6-8698-271e32b743ce\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
- Meta Manual
- Meta de Projetos Criados
- Meta de Projetos Criados por Usuário
- Meta de Projetos em Etapa
- Meta de Projetos em Etapa por Usuário
- Meta Composta
Payload para criação de metas de diferentes tipos.
Título da meta.
191"Nova meta"
Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
active, inactive, completed "active"
Tipo da meta.
manual "manual"
Periodicidade da meta.
1
Valor alvo da meta.
10
Unidade utilizada na meta.
"count"
Modo de comparação utilizado para validação da meta.
target "target"
Progresso inicial da meta manual.
1
Data de início da meta.
"2026-05-27"
Data final da meta.
"2026-06-05"
Descrição detalhada da meta.
"Descrição da meta"
Lista de metas filhas.
[]
Response
200
Was this page helpful?