Unity · Capability

Unity Analytics API — Events

Unity Analytics API — Events. 2 operations. Lead operation: Record Analytics Events. Self-contained Naftiko capability covering one Unity business surface.

Run with Naftiko UnityEvents

What You Can Do

POST
Recordevents — Record Analytics Events
/v1/v1/projects/{projectid}/events
POST
Validateevents — Validate Analytics Events
/v1/v1/projects/{projectid}/events-validate

MCP Tools

record-analytics-events

Record Analytics Events

validate-analytics-events

Validate Analytics Events

read-only

Capability Spec

analytics-events.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Unity Analytics API — Events
  description: 'Unity Analytics API — Events. 2 operations. Lead operation: Record Analytics Events. Self-contained Naftiko
    capability covering one Unity business surface.'
  tags:
  - Unity
  - Events
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    UNITY_API_KEY: UNITY_API_KEY
capability:
  consumes:
  - type: http
    namespace: analytics-events
    baseUri: https://analytics.services.api.unity.com
    description: Unity Analytics API — Events business capability. Self-contained, no shared references.
    resources:
    - name: v1-projects-projectId-events
      path: /v1/projects/{projectId}/events
      operations:
      - name: recordevents
        method: POST
        description: Record Analytics Events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: v1-projects-projectId-events:validate
      path: /v1/projects/{projectId}/events:validate
      operations:
      - name: validateevents
        method: POST
        description: Validate Analytics Events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: projectId
          in: path
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: apikey
      key: x-api-key
      value: '{{env.UNITY_API_KEY}}'
      placement: header
  exposes:
  - type: rest
    namespace: analytics-events-rest
    port: 8080
    description: REST adapter for Unity Analytics API — Events. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/v1/projects/{projectid}/events
      name: v1-projects-projectid-events
      description: REST surface for v1-projects-projectId-events.
      operations:
      - method: POST
        name: recordevents
        description: Record Analytics Events
        call: analytics-events.recordevents
        with:
          projectId: rest.projectId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/v1/projects/{projectid}/events-validate
      name: v1-projects-projectid-events-validate
      description: REST surface for v1-projects-projectId-events:validate.
      operations:
      - method: POST
        name: validateevents
        description: Validate Analytics Events
        call: analytics-events.validateevents
        with:
          projectId: rest.projectId
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: analytics-events-mcp
    port: 9090
    transport: http
    description: MCP adapter for Unity Analytics API — Events. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: record-analytics-events
      description: Record Analytics Events
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: analytics-events.recordevents
      with:
        projectId: tools.projectId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: validate-analytics-events
      description: Validate Analytics Events
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: analytics-events.validateevents
      with:
        projectId: tools.projectId
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.