Create a conversion goal
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/analytics/goals/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Checkout completed",
"type": "pixel_fire",
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/analytics/goals/"
payload = {
"name": "Checkout completed",
"type": "pixel_fire",
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": True
}
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: 'Checkout completed',
type: 'pixel_fire',
value_cents: 4999,
lookback_days: 14,
attribution_model: 'last_touch',
enabled: true
})
};
fetch('https://api.orbit.devotel.io/api/v1/analytics/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.orbit.devotel.io/api/v1/analytics/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' => 'Checkout completed',
'type' => 'pixel_fire',
'value_cents' => 4999,
'lookback_days' => 14,
'attribution_model' => 'last_touch',
'enabled' => true
]),
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.orbit.devotel.io/api/v1/analytics/goals/"
payload := strings.NewReader("{\n \"name\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\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.orbit.devotel.io/api/v1/analytics/goals/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/analytics/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\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "goal_7Fb2c1a7b",
"name": "Checkout completed",
"type": "pixel_fire",
"config": {},
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": true,
"created_at": "2026-08-02T12:00:00.000Z",
"updated_at": "2026-08-02T12:00:00.000Z",
"pixel_url": "https://api.orbit.devotel.io/g/goal_7Fb2c1a7b/{contact_id}.gif?sig=<hmac(goalId:contact_id:tenant_schema)>&schema=<tenant_schema>"
},
"meta": {
"request_id": "req_9f2c1a7b",
"timestamp": "2026-08-02T12:00:00.000Z"
}
}Analytics
Create a conversion goal
Creates a conversion goal for the tenant. Choose a type (pixel_fire, webhook_hit, manual, tag_added, custom_event), an attribution model and a lookback window; pixel_fire goals return a signed pixel URL hint you can embed on a thank-you page. Requires the owner, admin or developer role. Returns the created goal (201).
POST
/
api
/
v1
/
analytics
/
goals
/
Create a conversion goal
curl --request POST \
--url https://api.orbit.devotel.io/api/v1/analytics/goals/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Checkout completed",
"type": "pixel_fire",
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": true
}
'import requests
url = "https://api.orbit.devotel.io/api/v1/analytics/goals/"
payload = {
"name": "Checkout completed",
"type": "pixel_fire",
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": True
}
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: 'Checkout completed',
type: 'pixel_fire',
value_cents: 4999,
lookback_days: 14,
attribution_model: 'last_touch',
enabled: true
})
};
fetch('https://api.orbit.devotel.io/api/v1/analytics/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.orbit.devotel.io/api/v1/analytics/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' => 'Checkout completed',
'type' => 'pixel_fire',
'value_cents' => 4999,
'lookback_days' => 14,
'attribution_model' => 'last_touch',
'enabled' => true
]),
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.orbit.devotel.io/api/v1/analytics/goals/"
payload := strings.NewReader("{\n \"name\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\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.orbit.devotel.io/api/v1/analytics/goals/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.orbit.devotel.io/api/v1/analytics/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\": \"Checkout completed\",\n \"type\": \"pixel_fire\",\n \"value_cents\": 4999,\n \"lookback_days\": 14,\n \"attribution_model\": \"last_touch\",\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "goal_7Fb2c1a7b",
"name": "Checkout completed",
"type": "pixel_fire",
"config": {},
"value_cents": 4999,
"lookback_days": 14,
"attribution_model": "last_touch",
"enabled": true,
"created_at": "2026-08-02T12:00:00.000Z",
"updated_at": "2026-08-02T12:00:00.000Z",
"pixel_url": "https://api.orbit.devotel.io/g/goal_7Fb2c1a7b/{contact_id}.gif?sig=<hmac(goalId:contact_id:tenant_schema)>&schema=<tenant_schema>"
},
"meta": {
"request_id": "req_9f2c1a7b",
"timestamp": "2026-08-02T12:00:00.000Z"
}
}Authorizations
BearerApiKey
Dashboard JWT token from Clerk
Body
application/json
Required string length:
1 - 160Available options:
pixel_fire, webhook_hit, manual, tag_added, custom_event Type-specific configuration.
Monetary value credited per conversion, in minor units.
Required range:
x >= 0Attribution lookback window in days.
Required range:
1 <= x <= 180Available options:
last_touch, first_touch, linear, time_decay Response
201 - application/json
The created goal.
⌘I