Skip to main content
POST
/
magic-links
Create Magic 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": "",
  "integration_allow_list": [
    "shipbob"
  ],
  "integration_block_list": [
    "shipbob"
  ],
  "integrations_with_endpoints": [
    "get_inventory",
    "get_products",
    "create_order"
  ],
  "integration_type": "",
  "link_duration": 7,
  "customer_id": "customer_id"
}'
{
  "magic_link": {
    "id": "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"
  }
}

Headers

x-trackstar-api-key
string
required

Your organization-level Trackstar API key.

Example:

"<x-trackstar-api-key>"

Body

application/json
connection_id
string | null

An optional existing connection ID. If provided, the connection is reinstalled instead of a new connection being created.

Example:

""

integration_allow_list
string[]

Integrations that your users will be allowed to install. Mutually exclusive with integration_block_list and integrations_with_endpoints.

Example:
["shipbob"]
integration_block_list
string[]

Integrations that your users will not be allowed to install. Mutually exclusive with integration_allow_list.

Example:
["shipbob"]
integrations_with_endpoints
string[]

Only show integrations that support these endpoints. Mutually exclusive with integration_allow_list.

Example:
[
"get_inventory",
"get_products",
"create_order"
]
integration_type
enum<string>
default:wms

The type of integration to filter by.

Available options:
wms,
freight,
cart
Example:

""

The number of days you want this magic link to be active.

Example:

7

customer_id
string | null

An identifier for your end customer.

Example:

"customer_id"

Response

Successful response