{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/usercall-co/json-schema/usercall-co-post-api-v1-agent-triggers-request-schema.json",
  "title": "PostApiV1AgentTriggersRequest",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_ae-authored/usercall-co-openapi-generated.yml#/components/schemas/PostApiV1AgentTriggersRequest",
  "type": "object",
  "properties": {
    "study_id": {
      "type": "string",
      "description": "UUID of the study owning the interview"
    },
    "event_name": {
      "type": "string",
      "description": "Observed event name (1‑120 chars)"
    },
    "properties": {
      "type": "object",
      "description": "Exact equality filters on event properties"
    },
    "traits": {
      "type": "object",
      "description": "Exact equality filters on user traits"
    },
    "url": {
      "type": "object",
      "description": "{ operator: equals|contains|starts_with, value }"
    },
    "dwell_seconds": {
      "type": "number",
      "description": "1‑600 (page‑visit triggers only)"
    },
    "sampling_percent": {
      "type": "number",
      "description": "1‑100"
    },
    "cooldown_days": {
      "type": "number",
      "description": "0‑365"
    },
    "max_invites_per_day": {
      "type": "number",
      "description": "1‑100"
    },
    "delivery_method": {
      "type": "string",
      "description": "intercept (default) or webhook"
    },
    "webhook_url": {
      "type": "string",
      "description": "Public HTTPS URL if delivery_method is webhook"
    },
    "invite_link_params": {
      "type": "object",
      "description": "Static, from_traits, from_properties maps; non‑empty turns enable_link_context on"
    }
  },
  "required": [
    "study_id",
    "event_name"
  ]
}