curl --request POST \
--url https://production.trackstarhq.com/magic-links \
--header 'Content-Type: application/json' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '
{
"connection_id": "<string>",
"integration_allow_list": [
"shipbob"
],
"integration_block_list": [
"shipbob"
],
"integrations_with_endpoints": [
"get_inventory",
"get_products",
"create_order"
],
"integration_type": "wms",
"link_duration": 7,
"customer_id": "customer_id"
}
'import requests
url = "https://production.trackstarhq.com/magic-links"
payload = {
"connection_id": "<string>",
"integration_allow_list": ["shipbob"],
"integration_block_list": ["shipbob"],
"integrations_with_endpoints": ["get_inventory", "get_products", "create_order"],
"integration_type": "wms",
"link_duration": 7,
"customer_id": "customer_id"
}
headers = {
"x-trackstar-api-key": "<x-trackstar-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-trackstar-api-key': '<x-trackstar-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
connection_id: '<string>',
integration_allow_list: ['shipbob'],
integration_block_list: ['shipbob'],
integrations_with_endpoints: ['get_inventory', 'get_products', 'create_order'],
integration_type: 'wms',
link_duration: 7,
customer_id: 'customer_id'
})
};
fetch('https://production.trackstarhq.com/magic-links', 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://production.trackstarhq.com/magic-links",
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([
'connection_id' => '<string>',
'integration_allow_list' => [
'shipbob'
],
'integration_block_list' => [
'shipbob'
],
'integrations_with_endpoints' => [
'get_inventory',
'get_products',
'create_order'
],
'integration_type' => 'wms',
'link_duration' => 7,
'customer_id' => 'customer_id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-trackstar-api-key: <x-trackstar-api-key>"
],
]);
$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://production.trackstarhq.com/magic-links"
payload := strings.NewReader("{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-trackstar-api-key", "<x-trackstar-api-key>")
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://production.trackstarhq.com/magic-links")
.header("x-trackstar-api-key", "<x-trackstar-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.trackstarhq.com/magic-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trackstar-api-key"] = '<x-trackstar-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}"
response = http.request(request)
puts response.read_body{
"magic_link": {
"id": "c0a4fef52f664ecf9e766c16811c3289",
"url": "https://link.trackstarhq.com/c0a4fef52f664ecf9e766c16811c3289",
"expires_at": "2025-09-17T15:01:41Z",
"integration_type": "wms",
"integration_allow_list": [
"shipbob"
],
"integration_block_list": [
"extensiv-3pl-central"
],
"integrations_with_endpoints": [
"get_inventory"
],
"customer_id": "customer-123"
}
}{
"error": "<string>",
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
}
}Create Magic Link
Create a Magic Link to allow users to connect their integrations via a temporary link.
curl --request POST \
--url https://production.trackstarhq.com/magic-links \
--header 'Content-Type: application/json' \
--header 'x-trackstar-api-key: <x-trackstar-api-key>' \
--data '
{
"connection_id": "<string>",
"integration_allow_list": [
"shipbob"
],
"integration_block_list": [
"shipbob"
],
"integrations_with_endpoints": [
"get_inventory",
"get_products",
"create_order"
],
"integration_type": "wms",
"link_duration": 7,
"customer_id": "customer_id"
}
'import requests
url = "https://production.trackstarhq.com/magic-links"
payload = {
"connection_id": "<string>",
"integration_allow_list": ["shipbob"],
"integration_block_list": ["shipbob"],
"integrations_with_endpoints": ["get_inventory", "get_products", "create_order"],
"integration_type": "wms",
"link_duration": 7,
"customer_id": "customer_id"
}
headers = {
"x-trackstar-api-key": "<x-trackstar-api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-trackstar-api-key': '<x-trackstar-api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
connection_id: '<string>',
integration_allow_list: ['shipbob'],
integration_block_list: ['shipbob'],
integrations_with_endpoints: ['get_inventory', 'get_products', 'create_order'],
integration_type: 'wms',
link_duration: 7,
customer_id: 'customer_id'
})
};
fetch('https://production.trackstarhq.com/magic-links', 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://production.trackstarhq.com/magic-links",
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([
'connection_id' => '<string>',
'integration_allow_list' => [
'shipbob'
],
'integration_block_list' => [
'shipbob'
],
'integrations_with_endpoints' => [
'get_inventory',
'get_products',
'create_order'
],
'integration_type' => 'wms',
'link_duration' => 7,
'customer_id' => 'customer_id'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-trackstar-api-key: <x-trackstar-api-key>"
],
]);
$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://production.trackstarhq.com/magic-links"
payload := strings.NewReader("{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-trackstar-api-key", "<x-trackstar-api-key>")
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://production.trackstarhq.com/magic-links")
.header("x-trackstar-api-key", "<x-trackstar-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://production.trackstarhq.com/magic-links")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-trackstar-api-key"] = '<x-trackstar-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"connection_id\": \"<string>\",\n \"integration_allow_list\": [\n \"shipbob\"\n ],\n \"integration_block_list\": [\n \"shipbob\"\n ],\n \"integrations_with_endpoints\": [\n \"get_inventory\",\n \"get_products\",\n \"create_order\"\n ],\n \"integration_type\": \"wms\",\n \"link_duration\": 7,\n \"customer_id\": \"customer_id\"\n}"
response = http.request(request)
puts response.read_body{
"magic_link": {
"id": "c0a4fef52f664ecf9e766c16811c3289",
"url": "https://link.trackstarhq.com/c0a4fef52f664ecf9e766c16811c3289",
"expires_at": "2025-09-17T15:01:41Z",
"integration_type": "wms",
"integration_allow_list": [
"shipbob"
],
"integration_block_list": [
"extensiv-3pl-central"
],
"integrations_with_endpoints": [
"get_inventory"
],
"customer_id": "customer-123"
}
}{
"error": "<string>",
"detail": {
"<location>": {
"<field_name>": [
"<string>"
]
}
}
}Headers
Your organization-level Trackstar API key.
"<x-trackstar-api-key>"
Body
An optional existing connection ID. If provided, the connection is reinstalled instead of a new connection being created.
Integrations that your users will be allowed to install. Mutually exclusive with integration_block_list and integrations_with_endpoints.
["shipbob"]
Integrations that your users will not be allowed to install. Mutually exclusive with integration_allow_list.
["shipbob"]
Only show integrations that support these endpoints. Mutually exclusive with integration_allow_list.
[
"get_inventory",
"get_products",
"create_order"
]
The type of integration to filter by.
wms, freight, cart, carrier, erp The number of days you want this magic link to be active.
7
An identifier for your end customer.
"customer_id"
Response
Successful response
Show child attributes
Show child attributes