Klaviyo · Capability

Klaviyo API — Custom Objects

Klaviyo API — Custom Objects. 6 operations. Lead operation: Bulk Create Data Source Records. Self-contained Naftiko capability covering one Klaviyo business surface.

Run with Naftiko KlaviyoCustom Objects

What You Can Do

POST
Bulkcreatedatasourcerecords — Bulk Create Data Source Records
/v1/api/data-source-record-bulk-create-jobs
POST
Createdatasourcerecord — Create Data Source Record
/v1/api/data-source-record-create-jobs
GET
Getdatasources — Get Data Sources
/v1/api/data-sources
POST
Createdatasource — Create Data Source
/v1/api/data-sources
GET
Getdatasource — Get Data Source
/v1/api/data-sources/{id}
DELETE
Deletedatasource — Delete Data Source
/v1/api/data-sources/{id}

MCP Tools

bulk-create-data-source-records

Bulk Create Data Source Records

create-data-source-record

Create Data Source Record

get-data-sources

Get Data Sources

read-only idempotent
create-data-source

Create Data Source

get-data-source

Get Data Source

read-only idempotent
delete-data-source

Delete Data Source

idempotent

Capability Spec

klaviyo-custom-objects.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Klaviyo API — Custom Objects
  description: 'Klaviyo API — Custom Objects. 6 operations. Lead operation: Bulk Create Data Source Records. Self-contained
    Naftiko capability covering one Klaviyo business surface.'
  tags:
  - Klaviyo
  - Custom Objects
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KLAVIYO_API_KEY: KLAVIYO_API_KEY
capability:
  consumes:
  - type: http
    namespace: klaviyo-custom-objects
    baseUri: https://a.klaviyo.com
    description: Klaviyo API — Custom Objects business capability. Self-contained, no shared references.
    resources:
    - name: api-data-source-record-bulk-create-jobs
      path: /api/data-source-record-bulk-create-jobs
      operations:
      - name: bulkcreatedatasourcerecords
        method: POST
        description: Bulk Create Data Source Records
        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-data-source-record-create-jobs
      path: /api/data-source-record-create-jobs
      operations:
      - name: createdatasourcerecord
        method: POST
        description: Create Data Source Record
        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-data-sources
      path: /api/data-sources
      operations:
      - name: getdatasources
        method: GET
        description: Get Data Sources
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields[data-source]
          in: query
          type: array
          description: For more information please visit https://developers.klaviyo.com/en/v2026-04-15/reference/api-overview#sparse-fieldsets
        - 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: 20. Min: 1. Max: 100.'
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
      - name: createdatasource
        method: POST
        description: Create Data Source
        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-data-sources-id
      path: /api/data-sources/{id}
      operations:
      - name: getdatasource
        method: GET
        description: Get Data Source
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the data source
          required: true
        - name: fields[data-source]
          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: deletedatasource
        method: DELETE
        description: Delete Data Source
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the data source to delete
          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-custom-objects-rest
    port: 8080
    description: REST adapter for Klaviyo API — Custom Objects. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/data-source-record-bulk-create-jobs
      name: api-data-source-record-bulk-create-jobs
      description: REST surface for api-data-source-record-bulk-create-jobs.
      operations:
      - method: POST
        name: bulkcreatedatasourcerecords
        description: Bulk Create Data Source Records
        call: klaviyo-custom-objects.bulkcreatedatasourcerecords
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/data-source-record-create-jobs
      name: api-data-source-record-create-jobs
      description: REST surface for api-data-source-record-create-jobs.
      operations:
      - method: POST
        name: createdatasourcerecord
        description: Create Data Source Record
        call: klaviyo-custom-objects.createdatasourcerecord
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/data-sources
      name: api-data-sources
      description: REST surface for api-data-sources.
      operations:
      - method: GET
        name: getdatasources
        description: Get Data Sources
        call: klaviyo-custom-objects.getdatasources
        with:
          fields[data-source]: rest.fields[data-source]
          page[cursor]: rest.page[cursor]
          page[size]: rest.page[size]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createdatasource
        description: Create Data Source
        call: klaviyo-custom-objects.createdatasource
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/data-sources/{id}
      name: api-data-sources-id
      description: REST surface for api-data-sources-id.
      operations:
      - method: GET
        name: getdatasource
        description: Get Data Source
        call: klaviyo-custom-objects.getdatasource
        with:
          id: rest.id
          fields[data-source]: rest.fields[data-source]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletedatasource
        description: Delete Data Source
        call: klaviyo-custom-objects.deletedatasource
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: klaviyo-custom-objects-mcp
    port: 9090
    transport: http
    description: MCP adapter for Klaviyo API — Custom Objects. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: bulk-create-data-source-records
      description: Bulk Create Data Source Records
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-custom-objects.bulkcreatedatasourcerecords
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: create-data-source-record
      description: Create Data Source Record
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-custom-objects.createdatasourcerecord
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-data-sources
      description: Get Data Sources
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-custom-objects.getdatasources
      with:
        fields[data-source]: tools.fields[data-source]
        page[cursor]: tools.page[cursor]
        page[size]: tools.page[size]
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: create-data-source
      description: Create Data Source
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-custom-objects.createdatasource
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-data-source
      description: Get Data Source
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-custom-objects.getdatasource
      with:
        id: tools.id
        fields[data-source]: tools.fields[data-source]
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-data-source
      description: Delete Data Source
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: klaviyo-custom-objects.deletedatasource
      with:
        id: tools.id
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.