---
title: "Create custom UTM event"
method: POST
path: "/api/public/utm-event/create"
tags: ["UTM Events"]
---

# Create custom UTM event

`POST /api/public/utm-event/create`

Queues a custom UTM event with user-defined fields. Only ai_contact_id is required; all other fields are optional. Accepts arbitrary JSON in additional_params.

## Headers

- `x-api-key` string, required

## Request body

- CreatePublicUtmEventDto
  - `ai_contact_id` string, required
  - `customer_id` string, nullable
  - `referrer_url` string, nullable
  - `user_agent` string, nullable
  - `ip_address` string, nullable
  - `integration_type` 'facebook' | 'google' | 'tiktok' | 'snapchat' | 'linkedin' | 'twitter' | 'pinterest' | 'bing' | 'facebook_whatsapp' | 'facebook_instagram' | 'facebook_messenger' | 'unknown', nullable
  - `campaign_id` string, nullable
  - `ad_set_id` string, nullable
  - `ad_id` string, nullable
  - `ad_source_click_id` string, nullable
  - `utm_source` string
  - `utm_medium` string
  - `utm_term` string
  - `utm_content` string
  - `utm_referrer` string
  - `additional_params` object, required

## Response `201`

Event accepted for processing

- object
  - `success` boolean
  - `message` string

## Other responses

- `401` — Unauthorized

---

[API](https://skmtc.net/vambe/apis/vambe-ai-api.md) · [All operations](https://skmtc.net/vambe/apis/vambe-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vambe/vambe-ai-api/revisions/e206709d4be5/schema)
