curl --request POST \
--url https://api.olie.ai/api/management/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"type": "manual",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"user_id": null,
"funnel_step_id": null,
"children": []
}
'import requests
url = "https://api.olie.ai/api/management/goals"
payload = {
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"type": "manual",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"user_id": None,
"funnel_step_id": None,
"children": []
}
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: 'Reuniões de alinhamento',
description: 'Encontros semanais registrados manualmente.',
type: 'manual',
status: 'active',
start_date: '2026-01-01',
end_date: '2026-12-31',
periodicity: 30,
target: 12,
unit: 'count',
comparison_mode: 'target',
progress: 0,
user_id: null,
funnel_step_id: null,
children: []
})
};
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' => 'Reuniões de alinhamento',
'description' => 'Encontros semanais registrados manualmente.',
'type' => 'manual',
'status' => 'active',
'start_date' => '2026-01-01',
'end_date' => '2026-12-31',
'periodicity' => 30,
'target' => 12,
'unit' => 'count',
'comparison_mode' => 'target',
'progress' => 0,
'user_id' => null,
'funnel_step_id' => null,
'children' => [
]
]),
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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"goal": {
"id": "9b2d1f4a-3c5e-4a7b-8d9f-1e2c3a4b5c6d",
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"type": "manual",
"user_id": null,
"funnel_step_id": null,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"progress_change_percentage": 0,
"percentage": 0,
"is_past_calculable": false,
"created_at": "2026-01-06T14:45:51.000000Z",
"updated_at": "2026-01-06T14:45:51.000000Z",
"deleted_at": null
}
}{
"response": false,
"message": "validation_errors",
"error": "O campo título é obrigatório. (and 3 more errors)",
"validation": {
"title": [
"O campo título é obrigatório."
],
"type": [
"O campo type é obrigatório."
],
"start_date": [
"O campo start date é obrigatório."
],
"target": [
"O campo target é obrigatório."
]
}
}Criar uma meta
Cria uma meta e já calcula o progresso inicial dela. Os campos de recorte (user_id, funnel_step_id) e a lista de metas filhas (children) só são aceitos preenchidos nos tipos que os exigem; nos demais tipos eles devem ir nulos ou vazios. Metas do tipo manual informam o progresso no próprio corpo.
curl --request POST \
--url https://api.olie.ai/api/management/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"type": "manual",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"user_id": null,
"funnel_step_id": null,
"children": []
}
'import requests
url = "https://api.olie.ai/api/management/goals"
payload = {
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"type": "manual",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"user_id": None,
"funnel_step_id": None,
"children": []
}
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: 'Reuniões de alinhamento',
description: 'Encontros semanais registrados manualmente.',
type: 'manual',
status: 'active',
start_date: '2026-01-01',
end_date: '2026-12-31',
periodicity: 30,
target: 12,
unit: 'count',
comparison_mode: 'target',
progress: 0,
user_id: null,
funnel_step_id: null,
children: []
})
};
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' => 'Reuniões de alinhamento',
'description' => 'Encontros semanais registrados manualmente.',
'type' => 'manual',
'status' => 'active',
'start_date' => '2026-01-01',
'end_date' => '2026-12-31',
'periodicity' => 30,
'target' => 12,
'unit' => 'count',
'comparison_mode' => 'target',
'progress' => 0,
'user_id' => null,
'funnel_step_id' => null,
'children' => [
]
]),
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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\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\": \"Reuniões de alinhamento\",\n \"description\": \"Encontros semanais registrados manualmente.\",\n \"type\": \"manual\",\n \"status\": \"active\",\n \"start_date\": \"2026-01-01\",\n \"end_date\": \"2026-12-31\",\n \"periodicity\": 30,\n \"target\": 12,\n \"unit\": \"count\",\n \"comparison_mode\": \"target\",\n \"progress\": 0,\n \"user_id\": null,\n \"funnel_step_id\": null,\n \"children\": []\n}"
response = http.request(request)
puts response.read_body{
"response": true,
"goal": {
"id": "9b2d1f4a-3c5e-4a7b-8d9f-1e2c3a4b5c6d",
"title": "Reuniões de alinhamento",
"description": "Encontros semanais registrados manualmente.",
"status": "active",
"start_date": "2026-01-01",
"end_date": "2026-12-31",
"periodicity": 30,
"type": "manual",
"user_id": null,
"funnel_step_id": null,
"target": 12,
"unit": "count",
"comparison_mode": "target",
"progress": 0,
"progress_change_percentage": 0,
"percentage": 0,
"is_past_calculable": false,
"created_at": "2026-01-06T14:45:51.000000Z",
"updated_at": "2026-01-06T14:45:51.000000Z",
"deleted_at": null
}
}{
"response": false,
"message": "validation_errors",
"error": "O campo título é obrigatório. (and 3 more errors)",
"validation": {
"title": [
"O campo título é obrigatório."
],
"type": [
"O campo type é obrigatório."
],
"start_date": [
"O campo start date é obrigatório."
],
"target": [
"O campo target é obrigatório."
]
}
}Authorizations
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.
[]
Was this page helpful?