---
title: "Create website tracked event"
method: POST
path: "/api/website-tracked-events"
tags: ["website_tracked_events"]
---

# Create website tracked event

`POST /api/website-tracked-events`

## Request

- Base URL: `https://beta.getsales.io/signals/v1`
- URL: `https://beta.getsales.io/signals/v1/api/website-tracked-events`
- Auth: HTTP bearer and API key in header `Team-SID`

Register a custom event of a site so that it counts: site_sid, the name the site sends (event, matched without letter case, immutable), a label and is_conversion. From then on a session that sends the name carries the fact website_event. A name the site already tracks is 409 duplicate_rejected with the existing sid. A page visit is a key page (create_website_key_page) and a marked form is a fact by itself: neither needs this.

Contract:
- MCP tool `create_website_tracked_event`, registry package `mcp.signals/website_tracked_events`, mount `signals.website`.
- Operation `create`, response envelope `create`.
- Flags: none.

## Request body

- CreateWebsiteTrackedEventRequest: Request body of `create_website_tracked_event`.
  - `site_sid` string, required: Website site sid (sg_si_...), the event's site.
  - `event` string, required: The name the site's script sends (trial_started), 1..64 characters of letters, digits, space, _ . : -; matched without letter case; immutable.
  - `label` string, required: What the event is called in the feed (Trial started).
  - `is_conversion` boolean: Count it as a conversion. Default false.

## Response `200`

`create` success envelope.

- CreateWebsiteTrackedEventResponse
  - `success` true, required
  - `operation` 'create', required
  - `item` object, required
    - `sid` string, required: Website tracked event sid (sg_te_...).
    - `team_sid` string, required: Owning team (ts_tm_..., external: gs.service.id).
    - `site_sid` string, required: The site the event belongs to (sg_si_...).
    - `event` string, required: The name the site sends, stored as entered, matched without letter case; immutable (a fact's key carries it).
    - `label` string, required: What the event is called in the feed.
    - `is_conversion` boolean, required: Counted as a conversion in the feed and the Overview card.
    - `created_by` object, required: Actor that registered the event.
      - `actor_type` 'user' | 'support' | 'api_key' | 'system' | 'agent', required
      - `actor_sid` string, nullable, required
      - `team_sid` string, required
      - `actor_name` string, nullable: The OAuth client that acted ("Claude", "n8n"); null for a user, an API key or a system job.
      - `oauth_client_sid` string, nullable: The acting OAuth client (id_oc_*); null off the OAuth path.
      - `reason` string, nullable: Why a system actor wrote the row (snapshot_capture_job, ...); null otherwise.
      - `permissions` object, required: Internal audit context: the grant set the actor held at write time. Not a contract.
      - `cluster_id` integer, nullable: Internal audit context: the cluster that served the write.
      - `trace_id` string, nullable: Internal audit context: the trace id of the request that wrote the row.
    - `created_at` string, required: ISO 8601 UTC.
    - `updated_at` string, required: ISO 8601 UTC.
    - `deleted_at` string, nullable, required: ISO 8601 UTC; null = live. Also set by the site's cleanup job.
  - `already_exists` boolean, required
  - `meta` object, required
    - `trace_id` string, required: UUID v7; same 128-bit value as the X-Trace-Id header.
    - `span_id` string, required: 16 hex chars, root span of this request.
    - `timestamp` string, required: ISO 8601 UTC (Y-m-dTH:i:sZ), response time.
    - `duration_ms` integer, required: Server-side wall clock.
    - `team_sid` string, nullable: The team this call ran in (the token team, or the team_sid override). Null when unauthenticated; absent from pre-2026-08-20 backends.
    - `actor_type` string, nullable: user | agent | api_key | system. Null when unauthenticated; absent from pre-2026-08-20 backends.

## Other responses

- `4XX`: MCP error envelope. `error.code` is one of validation_failed, nothing_to_update, not_found, relation_not_found, invalid_transition, limit_exceeded, payment_required, duplicate_rejected, conflict, delete_blocked, unauthorized, forbidden, rate_limited, not_implemented.
- `5XX`: MCP error envelope with `error.code` internal_error or service_unavailable.

---

[API](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals.md) - [All operations](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals/llms.txt) - [OpenAPI document](https://skmtc.dev/getsales/apis/getsales-public-contract-gs-service-signals/revisions/310ca5d2219d?raw)
