---
title: "Generate a tracking script"
method: POST
path: "/radar/operator/v1/tracking-scripts"
tags: ["Tracking scripts"]
---

# Generate a tracking script

`POST /radar/operator/v1/tracking-scripts`

## Request body

- object
  - `internal_identifier` string, required — The identifier for the tracking script as used in your system. Should be unique for every generated tracking script
  - `description` string — A description for the tracking script
  - `domains` string[] — Domains to whitelist for this tracking script. Only traffic from these domains (and their subdomains) is accepted.

## Response `200`

Tracking script generated successfully

- object
  - `success` boolean
  - `data` TrackingScriptTrackingScript[]
    - `tracking_script_id` string, required
    - `internal_identifier` string, required
    - `description` string, nullable
    - `active` boolean, required
    - `domains` string[]

## Other responses

- `422` — The identifier is already in use

---

[API](https://skmtc.dev/snitcher/apis/snitcher-api.md) · [All operations](https://skmtc.dev/snitcher/apis/snitcher-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/snitcher/snitcher-api/revisions/cb6fa68e7c8e/schema)
