Create a goal
curl --request POST \
--url https://galinum.com/api/v1/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Activate new workspaces",
"description": "<string>",
"targetEvent": "activated_workspace",
"guardrails": {},
"approvalMode": "require_human"
}
'import requests
url = "https://galinum.com/api/v1/goals"
payload = {
"name": "Activate new workspaces",
"description": "<string>",
"targetEvent": "activated_workspace",
"guardrails": {},
"approvalMode": "require_human"
}
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({
name: 'Activate new workspaces',
description: '<string>',
targetEvent: 'activated_workspace',
guardrails: {},
approvalMode: 'require_human'
})
};
fetch('https://galinum.com/api/v1/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://galinum.com/api/v1/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([
'name' => 'Activate new workspaces',
'description' => '<string>',
'targetEvent' => 'activated_workspace',
'guardrails' => [
],
'approvalMode' => 'require_human'
]),
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://galinum.com/api/v1/goals"
payload := strings.NewReader("{\n \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\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://galinum.com/api/v1/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/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 \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\n}"
response = http.request(request)
puts response.read_body{
"goal": {
"id": "goal_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "Activate new workspaces",
"description": "Get signups to create their first board within 7 days",
"targetEvent": "activated_workspace",
"guardrails": {
"tone": "friendly, no urgency tactics",
"maxActiveCampaigns": 2
},
"approvalMode": "require_human",
"status": "active",
"createdAt": 123
}
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Goals
Create a goal
Creates a business goal for the optimized-communication loop: a target event to move, binding guardrails, and an approval mode. Goals are optional — direct communications don’t need one.
POST
/
api
/
v1
/
goals
Create a goal
curl --request POST \
--url https://galinum.com/api/v1/goals \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Activate new workspaces",
"description": "<string>",
"targetEvent": "activated_workspace",
"guardrails": {},
"approvalMode": "require_human"
}
'import requests
url = "https://galinum.com/api/v1/goals"
payload = {
"name": "Activate new workspaces",
"description": "<string>",
"targetEvent": "activated_workspace",
"guardrails": {},
"approvalMode": "require_human"
}
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({
name: 'Activate new workspaces',
description: '<string>',
targetEvent: 'activated_workspace',
guardrails: {},
approvalMode: 'require_human'
})
};
fetch('https://galinum.com/api/v1/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://galinum.com/api/v1/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([
'name' => 'Activate new workspaces',
'description' => '<string>',
'targetEvent' => 'activated_workspace',
'guardrails' => [
],
'approvalMode' => 'require_human'
]),
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://galinum.com/api/v1/goals"
payload := strings.NewReader("{\n \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\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://galinum.com/api/v1/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://galinum.com/api/v1/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 \"name\": \"Activate new workspaces\",\n \"description\": \"<string>\",\n \"targetEvent\": \"activated_workspace\",\n \"guardrails\": {},\n \"approvalMode\": \"require_human\"\n}"
response = http.request(request)
puts response.read_body{
"goal": {
"id": "goal_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"name": "Activate new workspaces",
"description": "Get signups to create their first board within 7 days",
"targetEvent": "activated_workspace",
"guardrails": {
"tone": "friendly, no urgency tactics",
"maxActiveCampaigns": 2
},
"approvalMode": "require_human",
"status": "active",
"createdAt": 123
}
}{
"error": "userId is required"
}{
"error": "Unauthorized"
}{
"error": "Invalid request"
}{
"error": "Too many requests"
}{
"error": "Could not identify user"
}Authorizations
Your project's secret key (pk_…, without the pub segment). Server-side only — never ship it to a browser. Get it from Settings → Projects in the dashboard.
Body
application/json
Maximum string length:
80Example:
"Activate new workspaces"
Maximum string length:
1000A tracked event name.
Maximum string length:
80Example:
"activated_workspace"
Free-form JSON object (max 4 KB serialized).
Available options:
require_human, auto Response
The created goal.
Show child attributes
Show child attributes