---
title: "Build campaign URLs with utm_* parameters, parse and lint tagged links, and strip UTM and click-ID tracking parameters."
method: POST
path: "/api/v1/utm"
tags: ["Web Tools"]
---

# Build campaign URLs with utm_\* parameters, parse and lint tagged links, and strip UTM and click-ID tracking parameters.

`POST /api/v1/utm`

## Request

- Base URL: `https://programmes.net`
- URL: `https://programmes.net/api/v1/utm`
- Auth: none declared

UTM Link Builder. Operations: `build` — Add UTM parameters to a URL, normalising case and spaces, and lint the result. `parse` — Split a URL into UTM tags, ad click IDs and other parameters, with warnings. `strip` — Remove utm_* and click-ID parameters (gclid, fbclid, msclkid…) from a URL. `batch` — Tag many URLs (one per line) with the same UTM parameters.

## Request body

- union
  - UtmBuild: Add UTM parameters to a URL, normalising case and spaces, and lint the result.
    - `operation` 'build', required
    - `input` string: The landing-page URL.
    - `options` object
      - `source` string: utm_source — where the traffic comes from.
      - `medium` string: utm_medium — the channel (cpc, email, social…).
      - `campaign` string: utm_campaign — the campaign name.
      - `term` string: utm_term — paid search keyword.
      - `content` string: utm_content — which link or creative.
      - `id` string: utm_id — campaign identifier.
      - `normalize` boolean: Lowercase values and replace spaces with underscores.
  - UtmParse: Split a URL into UTM tags, ad click IDs and other parameters, with warnings.
    - `operation` 'parse', required
    - `input` string: A tagged URL.
    - `options` object
  - UtmStrip: Remove utm_* and click-ID parameters (gclid, fbclid, msclkid…) from a URL.
    - `operation` 'strip', required
    - `input` string: A URL with tracking parameters.
    - `options` object
  - UtmBatch: Tag many URLs (one per line) with the same UTM parameters.
    - `operation` 'batch', required
    - `input` string: Landing-page URLs, one per line.
    - `options` object
      - `source` string: utm_source — where the traffic comes from.
      - `medium` string: utm_medium — the channel (cpc, email, social…).
      - `campaign` string: utm_campaign — the campaign name.
      - `term` string: utm_term — paid search keyword.
      - `content` string: utm_content — which link or creative.
      - `id` string: utm_id — campaign identifier.

## Response `200`

The operation ran.

- object
  - `ok` unknown, required
  - `tool` 'utm', required
  - `operation` 'build' | 'parse' | 'strip' | 'batch', required
  - `result` unknown, required

## Other responses

- `400`: The request is not valid (https://programmes.net/api#invalid-request); The tool has no such operation (https://programmes.net/api#unknown-operation)
- `404`: No such tool (https://programmes.net/api#unknown-tool)
- `413`: The request or its input is too large (https://programmes.net/api#content-too-large)
- `415`: The body must be JSON (https://programmes.net/api#unsupported-media-type)
- `422`: An option is missing, of the wrong type or out of range (https://programmes.net/api#invalid-options); This call needs more CPU than one API call may use (https://programmes.net/api#refused); The operation could not process the input (https://programmes.net/api#tool-error)
- `429`: Too many requests (https://programmes.net/api#rate-limited)
- `500`: Internal error (https://programmes.net/api#internal-error)

---

[API](https://skmtc.dev/programmes/apis/programmes-net-api.md) · [All operations](https://skmtc.dev/programmes/apis/programmes-net-api/llms.txt) · [OpenAPI document](https://skmtc.dev/programmes/apis/programmes-net-api/revisions/aa939784a2e6?raw)
