Lago · Capability

Lago API documentation — Events

Lago API documentation — Events. 5 operations. Lead operation: Lago Send usage events. Self-contained Naftiko capability covering one Lago business surface.

Run with Naftiko LagoEvents

What You Can Do

POST
Createevent — Lago Send usage events
/v1/events
GET
Findallevents — Lago List all events
/v1/events
POST
Createbatchevents — Lago Batch multiple events
/v1/events/batch
POST
Eventestimatefees — Lago Estimate fees for a pay in advance charge
/v1/events/estimate-fees
GET
Findevent — Lago Retrieve a specific event
/v1/events/{transaction-id}

MCP Tools

lago-send-usage-events

Lago Send usage events

lago-list-all-events

Lago List all events

read-only idempotent
lago-batch-multiple-events

Lago Batch multiple events

lago-estimate-fees-pay-advance

Lago Estimate fees for a pay in advance charge

lago-retrieve-specific-event

Lago Retrieve a specific event

read-only idempotent

Capability Spec

lago-events.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Lago API documentation — Events
  description: 'Lago API documentation — Events. 5 operations. Lead operation: Lago Send usage events. Self-contained Naftiko
    capability covering one Lago business surface.'
  tags:
  - Lago
  - Events
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    LAGO_API_KEY: LAGO_API_KEY
capability:
  consumes:
  - type: http
    namespace: lago-events
    baseUri: https://api.getlago.com/api/v1
    description: Lago API documentation — Events business capability. Self-contained, no shared references.
    resources:
    - name: events
      path: /events
      operations:
      - name: createevent
        method: POST
        description: Lago Send usage events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: findallevents
        method: GET
        description: Lago List all events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: code
          in: query
          type: string
          description: Filter events by its code.
        - name: timestamp_from
          in: query
          type: string
          description: Filter events by timestamp starting from a specific date.
        - name: timestamp_to
          in: query
          type: string
          description: Filter events by timestamp up to a specific date.
    - name: events-batch
      path: /events/batch
      operations:
      - name: createbatchevents
        method: POST
        description: Lago Batch multiple events
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: events-estimate_fees
      path: /events/estimate_fees
      operations:
      - name: eventestimatefees
        method: POST
        description: Lago Estimate fees for a pay in advance charge
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: events-transaction_id
      path: /events/{transaction_id}
      operations:
      - name: findevent
        method: GET
        description: Lago Retrieve a specific event
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.LAGO_API_KEY}}'
  exposes:
  - type: rest
    namespace: lago-events-rest
    port: 8080
    description: REST adapter for Lago API documentation — Events. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/events
      name: events
      description: REST surface for events.
      operations:
      - method: POST
        name: createevent
        description: Lago Send usage events
        call: lago-events.createevent
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: GET
        name: findallevents
        description: Lago List all events
        call: lago-events.findallevents
        with:
          code: rest.code
          timestamp_from: rest.timestamp_from
          timestamp_to: rest.timestamp_to
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/events/batch
      name: events-batch
      description: REST surface for events-batch.
      operations:
      - method: POST
        name: createbatchevents
        description: Lago Batch multiple events
        call: lago-events.createbatchevents
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/events/estimate-fees
      name: events-estimate-fees
      description: REST surface for events-estimate_fees.
      operations:
      - method: POST
        name: eventestimatefees
        description: Lago Estimate fees for a pay in advance charge
        call: lago-events.eventestimatefees
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/events/{transaction-id}
      name: events-transaction-id
      description: REST surface for events-transaction_id.
      operations:
      - method: GET
        name: findevent
        description: Lago Retrieve a specific event
        call: lago-events.findevent
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: lago-events-mcp
    port: 9090
    transport: http
    description: MCP adapter for Lago API documentation — Events. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: lago-send-usage-events
      description: Lago Send usage events
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lago-events.createevent
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lago-list-all-events
      description: Lago List all events
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lago-events.findallevents
      with:
        code: tools.code
        timestamp_from: tools.timestamp_from
        timestamp_to: tools.timestamp_to
      outputParameters:
      - type: object
        mapping: $.
    - name: lago-batch-multiple-events
      description: Lago Batch multiple events
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lago-events.createbatchevents
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lago-estimate-fees-pay-advance
      description: Lago Estimate fees for a pay in advance charge
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: lago-events.eventestimatefees
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: lago-retrieve-specific-event
      description: Lago Retrieve a specific event
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: lago-events.findevent
      outputParameters:
      - type: object
        mapping: $.