segment · Capability

Segment Profile API — Events

Segment Profile API — Events. 1 operations. Lead operation: Get user events. Self-contained Naftiko capability covering one Segment business surface.

Run with Naftiko SegmentEvents

What You Can Do

GET
Getuserevents — Get user events
/v1/collections/users/profiles/{externalid}/events

MCP Tools

get-user-events

Get user events

read-only idempotent

Capability Spec

profile-events.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Segment Profile API — Events
  description: 'Segment Profile API — Events. 1 operations. Lead operation: Get user events. Self-contained Naftiko capability
    covering one Segment business surface.'
  tags:
  - Segment
  - Events
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    SEGMENT_API_KEY: SEGMENT_API_KEY
capability:
  consumes:
  - type: http
    namespace: profile-events
    baseUri: https://profiles.segment.com/v1/spaces/{spaceId}
    description: Segment Profile API — Events business capability. Self-contained, no shared references.
    resources:
    - name: collections-users-profiles-externalId-events
      path: /collections/users/profiles/{externalId}/events
      operations:
      - name: getuserevents
        method: GET
        description: Get user events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: basic
      username: '{{env.SEGMENT_USER}}'
      password: '{{env.SEGMENT_PASS}}'
  exposes:
  - type: rest
    namespace: profile-events-rest
    port: 8080
    description: REST adapter for Segment Profile API — Events. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/collections/users/profiles/{externalid}/events
      name: collections-users-profiles-externalid-events
      description: REST surface for collections-users-profiles-externalId-events.
      operations:
      - method: GET
        name: getuserevents
        description: Get user events
        call: profile-events.getuserevents
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: profile-events-mcp
    port: 9090
    transport: http
    description: MCP adapter for Segment Profile API — Events. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: get-user-events
      description: Get user events
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: profile-events.getuserevents
      outputParameters:
      - type: object
        mapping: $.