naftiko: 1.0.0-alpha2 info: label: Klaviyo API — Events description: 'Klaviyo API — Events. 8 operations. Lead operation: Bulk Create Events. Self-contained Naftiko capability covering one Klaviyo business surface.' tags: - Klaviyo - Events created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: KLAVIYO_API_KEY: KLAVIYO_API_KEY capability: consumes: - type: http namespace: klaviyo-events baseUri: https://a.klaviyo.com description: Klaviyo API — Events business capability. Self-contained, no shared references. resources: - name: api-event-bulk-create-jobs path: /api/event-bulk-create-jobs operations: - name: bulkcreateevents method: POST description: Bulk Create Events outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-events path: /api/events operations: - name: getevents method: GET description: Get Events outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: fields[event] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: fields[metric] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: fields[profile] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: filter in: query type: string description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#filtering
Allowed field(s)/operator(s):
`metric_id` - name: include in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships - name: page[cursor] in: query type: string description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#pagination - name: page[size] in: query type: integer description: 'Default: 200. Min: 1. Max: 1000.' - name: sort in: query type: string description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sorting - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: createevent method: POST description: Create Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: body in: body type: object description: Request body (JSON). required: true - name: api-events-id path: /api/events/{id} operations: - name: getevent method: GET description: Get Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: ID of the event required: true - name: fields[event] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: fields[metric] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: fields[profile] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: include in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#relationships - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: api-events-id-metric path: /api/events/{id}/metric operations: - name: getmetricforevent method: GET description: Get Metric for Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: ID of the event required: true - name: fields[metric] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: api-events-id-profile path: /api/events/{id}/profile operations: - name: getprofileforevent method: GET description: Get Profile for Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: ID of the event required: true - name: additional-fields[profile] in: query type: array description: 'Request additional fields not included by default in the response. Supported values: ''subscriptions'', ''predictive_analytics''' - name: fields[profile] in: query type: array description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: api-events-id-relationships-metric path: /api/events/{id}/relationships/metric operations: - name: getmetricidforevent method: GET description: Get Metric ID for Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: ID of the event required: true - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true - name: api-events-id-relationships-profile path: /api/events/{id}/relationships/profile operations: - name: getprofileidforevent method: GET description: Get Profile ID for Event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: ID of the event required: true - name: revision in: header type: string description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])' required: true authentication: type: apikey key: Authorization value: '{{env.KLAVIYO_API_KEY}}' placement: header exposes: - type: rest namespace: klaviyo-events-rest port: 8080 description: REST adapter for Klaviyo API — Events. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/event-bulk-create-jobs name: api-event-bulk-create-jobs description: REST surface for api-event-bulk-create-jobs. operations: - method: POST name: bulkcreateevents description: Bulk Create Events call: klaviyo-events.bulkcreateevents with: revision: rest.revision body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/events name: api-events description: REST surface for api-events. operations: - method: GET name: getevents description: Get Events call: klaviyo-events.getevents with: fields[event]: rest.fields[event] fields[metric]: rest.fields[metric] fields[profile]: rest.fields[profile] filter: rest.filter include: rest.include page[cursor]: rest.page[cursor] page[size]: rest.page[size] sort: rest.sort revision: rest.revision outputParameters: - type: object mapping: $. - method: POST name: createevent description: Create Event call: klaviyo-events.createevent with: revision: rest.revision body: rest.body outputParameters: - type: object mapping: $. - path: /v1/api/events/{id} name: api-events-id description: REST surface for api-events-id. operations: - method: GET name: getevent description: Get Event call: klaviyo-events.getevent with: id: rest.id fields[event]: rest.fields[event] fields[metric]: rest.fields[metric] fields[profile]: rest.fields[profile] include: rest.include revision: rest.revision outputParameters: - type: object mapping: $. - path: /v1/api/events/{id}/metric name: api-events-id-metric description: REST surface for api-events-id-metric. operations: - method: GET name: getmetricforevent description: Get Metric for Event call: klaviyo-events.getmetricforevent with: id: rest.id fields[metric]: rest.fields[metric] revision: rest.revision outputParameters: - type: object mapping: $. - path: /v1/api/events/{id}/profile name: api-events-id-profile description: REST surface for api-events-id-profile. operations: - method: GET name: getprofileforevent description: Get Profile for Event call: klaviyo-events.getprofileforevent with: id: rest.id additional-fields[profile]: rest.additional-fields[profile] fields[profile]: rest.fields[profile] revision: rest.revision outputParameters: - type: object mapping: $. - path: /v1/api/events/{id}/relationships/metric name: api-events-id-relationships-metric description: REST surface for api-events-id-relationships-metric. operations: - method: GET name: getmetricidforevent description: Get Metric ID for Event call: klaviyo-events.getmetricidforevent with: id: rest.id revision: rest.revision outputParameters: - type: object mapping: $. - path: /v1/api/events/{id}/relationships/profile name: api-events-id-relationships-profile description: REST surface for api-events-id-relationships-profile. operations: - method: GET name: getprofileidforevent description: Get Profile ID for Event call: klaviyo-events.getprofileidforevent with: id: rest.id revision: rest.revision outputParameters: - type: object mapping: $. - type: mcp namespace: klaviyo-events-mcp port: 9090 transport: http description: MCP adapter for Klaviyo API — Events. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: bulk-create-events description: Bulk Create Events hints: readOnly: false destructive: false idempotent: false call: klaviyo-events.bulkcreateevents with: revision: tools.revision body: tools.body outputParameters: - type: object mapping: $. - name: get-events description: Get Events hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getevents with: fields[event]: tools.fields[event] fields[metric]: tools.fields[metric] fields[profile]: tools.fields[profile] filter: tools.filter include: tools.include page[cursor]: tools.page[cursor] page[size]: tools.page[size] sort: tools.sort revision: tools.revision outputParameters: - type: object mapping: $. - name: create-event description: Create Event hints: readOnly: false destructive: false idempotent: false call: klaviyo-events.createevent with: revision: tools.revision body: tools.body outputParameters: - type: object mapping: $. - name: get-event description: Get Event hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getevent with: id: tools.id fields[event]: tools.fields[event] fields[metric]: tools.fields[metric] fields[profile]: tools.fields[profile] include: tools.include revision: tools.revision outputParameters: - type: object mapping: $. - name: get-metric-event description: Get Metric for Event hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getmetricforevent with: id: tools.id fields[metric]: tools.fields[metric] revision: tools.revision outputParameters: - type: object mapping: $. - name: get-profile-event description: Get Profile for Event hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getprofileforevent with: id: tools.id additional-fields[profile]: tools.additional-fields[profile] fields[profile]: tools.fields[profile] revision: tools.revision outputParameters: - type: object mapping: $. - name: get-metric-id-event description: Get Metric ID for Event hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getmetricidforevent with: id: tools.id revision: tools.revision outputParameters: - type: object mapping: $. - name: get-profile-id-event description: Get Profile ID for Event hints: readOnly: true destructive: false idempotent: true call: klaviyo-events.getprofileidforevent with: id: tools.id revision: tools.revision outputParameters: - type: object mapping: $.