Swetrix · OpenAPI Overlay 1.0.0

API Evangelist conversational phrasing for Swetrix Admin Annotations Events API

4 actions 4 updates phrasing extends openapi/swetrix-events-api-openapi.yml
Generated by API Evangelist Written by API Evangelist tooling for Swetrix's API. It is a proposal applied on top of the contract, not a document Swetrix publishes.
View Overlay File View on GitHub Overlay Specification

What the actions change

x-apievangelist-phrasing

Targets 4

$.info
$.paths['/log'].post
$.paths['/log/custom'].post
$.paths['/log/hb'].post

OpenAPI Overlay

Raw ↑
# Generated by API Evangelist (build-phrasing.py). Our phrasing, not observed demand.
overlay: 1.0.0
info:
  title: API Evangelist conversational phrasing for Swetrix Admin Annotations Events API
  version: 1.0.0
extends: openapi/swetrix-events-api-openapi.yml
actions:
- target: $.info
  update:
    x-apievangelist-phrasing:
      method: generated
      generated: '2026-09-26'
      generator: build-phrasing.py
      label: Generated by API Evangelist
      operations: 3
- target: $.paths['/log'].post
  update:
    x-apievangelist-phrasing:
      intent: Record a pageview for a visitor
      effect: write
      questions:
      - How do I track a page load from my own code instead of the script?
      - Can I pass UTM source, medium and campaign with a pageview?
      - Is there a way to count only unique visits?
      instructions:
      - text: Record a pageview of {pg} for project {pid}.
        slots:
          pg: requestBody.pg
          pid: requestBody.pid
      - text: Log a pageview on {pg} in project {pid} referred by {ref} from campaign {ca}.
        slots:
          pg: requestBody.pg
          pid: requestBody.pid
          ref: requestBody.ref
          ca: requestBody.ca
      method: generated
      generated: '2026-09-26'
- target: $.paths['/log/custom'].post
  update:
    x-apievangelist-phrasing:
      intent: Record a named custom event
      effect: write
      questions:
      - How do I track a button click as a custom event?
      - Can I attach metadata key-value pairs to a custom event?
      - What limits apply to custom event metadata?
      instructions:
      - text: Record custom event {ev} for project {pid}.
        slots:
          ev: requestBody.ev
          pid: requestBody.pid
      - text: Log custom event {ev} on page {pg} in project {pid} with metadata {meta}.
        slots:
          ev: requestBody.ev
          pg: requestBody.pg
          pid: requestBody.pid
          meta: requestBody.meta
      method: generated
      generated: '2026-09-26'
- target: $.paths['/log/hb'].post
  update:
    x-apievangelist-phrasing:
      intent: Keep a visitor's session alive
      effect: write
      questions:
      - Why does session duration look too short, and what keeps a session alive?
      - How often should a heartbeat be sent while someone is on the page?
      instructions:
      - text: Send a session heartbeat for project {pid}.
        slots:
          pid: requestBody.pid
      - text: Ping project {pid} to keep the current visitor's session active.
        slots:
          pid: requestBody.pid
      method: generated
      generated: '2026-09-26'