Klaviyo · Capability

Klaviyo API — Templates

Klaviyo API — Templates. 12 operations. Lead operation: Clone Template. Self-contained Naftiko capability covering one Klaviyo business surface.

Run with Naftiko KlaviyoTemplates

What You Can Do

POST
Clonetemplate — Clone Template
/v1/api/template-clone
POST
Rendertemplate — Render Template
/v1/api/template-render
GET
Getalluniversalcontent — Get All Universal Content
/v1/api/template-universal-content
POST
Createuniversalcontent — Create Universal Content
/v1/api/template-universal-content
GET
Getuniversalcontent — Get Universal Content
/v1/api/template-universal-content/{id}
PATCH
Updateuniversalcontent — Update Universal Content
/v1/api/template-universal-content/{id}
DELETE
Deleteuniversalcontent — Delete Universal Content
/v1/api/template-universal-content/{id}
GET
Gettemplates — Get Templates
/v1/api/templates
POST
Createtemplate — Create Template
/v1/api/templates
GET
Gettemplate — Get Template
/v1/api/templates/{id}
PATCH
Updatetemplate — Update Template
/v1/api/templates/{id}
DELETE
Deletetemplate — Delete Template
/v1/api/templates/{id}

MCP Tools

clone-template

Clone Template

render-template

Render Template

get-all-universal-content

Get All Universal Content

read-only idempotent
create-universal-content

Create Universal Content

get-universal-content

Get Universal Content

read-only idempotent
update-universal-content

Update Universal Content

idempotent
delete-universal-content

Delete Universal Content

idempotent
get-templates

Get Templates

read-only idempotent
create-template

Create Template

get-template

Get Template

read-only idempotent
update-template

Update Template

idempotent
delete-template

Delete Template

idempotent

Capability Spec

klaviyo-templates.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Klaviyo API — Templates
  description: 'Klaviyo API — Templates. 12 operations. Lead operation: Clone Template. Self-contained Naftiko capability
    covering one Klaviyo business surface.'
  tags:
  - Klaviyo
  - Templates
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    KLAVIYO_API_KEY: KLAVIYO_API_KEY
capability:
  consumes:
  - type: http
    namespace: klaviyo-templates
    baseUri: https://a.klaviyo.com
    description: Klaviyo API — Templates business capability. Self-contained, no shared references.
    resources:
    - name: api-template-clone
      path: /api/template-clone
      operations:
      - name: clonetemplate
        method: POST
        description: Clone Template
        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-template-render
      path: /api/template-render
      operations:
      - name: rendertemplate
        method: POST
        description: Render Template
        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-template-universal-content
      path: /api/template-universal-content
      operations:
      - name: getalluniversalcontent
        method: GET
        description: Get All Universal Content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: fields[template-universal-content]
          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<br>Allowed
            field(s)/operator(s):<br>`id`: `any`'
        - 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: 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: createuniversalcontent
        method: POST
        description: Create Universal Content
        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-template-universal-content-id
      path: /api/template-universal-content/{id}
      operations:
      - name: getuniversalcontent
        method: GET
        description: Get Universal Content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the universal content
          required: true
        - name: fields[template-universal-content]
          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: updateuniversalcontent
        method: PATCH
        description: Update Universal Content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the template universal content
          required: true
        - 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: deleteuniversalcontent
        method: DELETE
        description: Delete Universal Content
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the template universal content
          required: true
        - name: revision
          in: header
          type: string
          description: 'API endpoint revision (format: YYYY-MM-DD[.suffix])'
          required: true
    - name: api-templates
      path: /api/templates
      operations:
      - name: gettemplates
        method: GET
        description: Get Templates
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: additional-fields[template]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''definition'''
        - name: fields[template]
          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<br>Allowed
            field(s)/operator(s):<br>`id`: `any`'
        - 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: 10. Min: 1. Max: 10.'
        - 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: createtemplate
        method: POST
        description: Create Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: additional-fields[template]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''definition'''
        - 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-templates-id
      path: /api/templates/{id}
      operations:
      - name: gettemplate
        method: GET
        description: Get Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of template
          required: true
        - name: additional-fields[template]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''definition'''
        - name: fields[template]
          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: updatetemplate
        method: PATCH
        description: Update Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of template
          required: true
        - name: additional-fields[template]
          in: query
          type: array
          description: 'Request additional fields not included by default in the response. Supported values: ''definition'''
        - 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: deletetemplate
        method: DELETE
        description: Delete Template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of template
          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-templates-rest
    port: 8080
    description: REST adapter for Klaviyo API — Templates. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/api/template-clone
      name: api-template-clone
      description: REST surface for api-template-clone.
      operations:
      - method: POST
        name: clonetemplate
        description: Clone Template
        call: klaviyo-templates.clonetemplate
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/template-render
      name: api-template-render
      description: REST surface for api-template-render.
      operations:
      - method: POST
        name: rendertemplate
        description: Render Template
        call: klaviyo-templates.rendertemplate
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/template-universal-content
      name: api-template-universal-content
      description: REST surface for api-template-universal-content.
      operations:
      - method: GET
        name: getalluniversalcontent
        description: Get All Universal Content
        call: klaviyo-templates.getalluniversalcontent
        with:
          fields[template-universal-content]: rest.fields[template-universal-content]
          filter: rest.filter
          page[cursor]: rest.page[cursor]
          page[size]: rest.page[size]
          sort: rest.sort
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createuniversalcontent
        description: Create Universal Content
        call: klaviyo-templates.createuniversalcontent
        with:
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/template-universal-content/{id}
      name: api-template-universal-content-id
      description: REST surface for api-template-universal-content-id.
      operations:
      - method: GET
        name: getuniversalcontent
        description: Get Universal Content
        call: klaviyo-templates.getuniversalcontent
        with:
          id: rest.id
          fields[template-universal-content]: rest.fields[template-universal-content]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updateuniversalcontent
        description: Update Universal Content
        call: klaviyo-templates.updateuniversalcontent
        with:
          id: rest.id
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteuniversalcontent
        description: Delete Universal Content
        call: klaviyo-templates.deleteuniversalcontent
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/templates
      name: api-templates
      description: REST surface for api-templates.
      operations:
      - method: GET
        name: gettemplates
        description: Get Templates
        call: klaviyo-templates.gettemplates
        with:
          additional-fields[template]: rest.additional-fields[template]
          fields[template]: rest.fields[template]
          filter: rest.filter
          page[cursor]: rest.page[cursor]
          page[size]: rest.page[size]
          sort: rest.sort
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createtemplate
        description: Create Template
        call: klaviyo-templates.createtemplate
        with:
          additional-fields[template]: rest.additional-fields[template]
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/api/templates/{id}
      name: api-templates-id
      description: REST surface for api-templates-id.
      operations:
      - method: GET
        name: gettemplate
        description: Get Template
        call: klaviyo-templates.gettemplate
        with:
          id: rest.id
          additional-fields[template]: rest.additional-fields[template]
          fields[template]: rest.fields[template]
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
      - method: PATCH
        name: updatetemplate
        description: Update Template
        call: klaviyo-templates.updatetemplate
        with:
          id: rest.id
          additional-fields[template]: rest.additional-fields[template]
          revision: rest.revision
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletetemplate
        description: Delete Template
        call: klaviyo-templates.deletetemplate
        with:
          id: rest.id
          revision: rest.revision
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: klaviyo-templates-mcp
    port: 9090
    transport: http
    description: MCP adapter for Klaviyo API — Templates. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: clone-template
      description: Clone Template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-templates.clonetemplate
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: render-template
      description: Render Template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-templates.rendertemplate
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-all-universal-content
      description: Get All Universal Content
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-templates.getalluniversalcontent
      with:
        fields[template-universal-content]: tools.fields[template-universal-content]
        filter: tools.filter
        page[cursor]: tools.page[cursor]
        page[size]: tools.page[size]
        sort: tools.sort
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: create-universal-content
      description: Create Universal Content
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-templates.createuniversalcontent
      with:
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-universal-content
      description: Get Universal Content
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-templates.getuniversalcontent
      with:
        id: tools.id
        fields[template-universal-content]: tools.fields[template-universal-content]
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: update-universal-content
      description: Update Universal Content
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: klaviyo-templates.updateuniversalcontent
      with:
        id: tools.id
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-universal-content
      description: Delete Universal Content
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: klaviyo-templates.deleteuniversalcontent
      with:
        id: tools.id
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: get-templates
      description: Get Templates
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-templates.gettemplates
      with:
        additional-fields[template]: tools.additional-fields[template]
        fields[template]: tools.fields[template]
        filter: tools.filter
        page[cursor]: tools.page[cursor]
        page[size]: tools.page[size]
        sort: tools.sort
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: create-template
      description: Create Template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: klaviyo-templates.createtemplate
      with:
        additional-fields[template]: tools.additional-fields[template]
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-template
      description: Get Template
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: klaviyo-templates.gettemplate
      with:
        id: tools.id
        additional-fields[template]: tools.additional-fields[template]
        fields[template]: tools.fields[template]
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.
    - name: update-template
      description: Update Template
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: klaviyo-templates.updatetemplate
      with:
        id: tools.id
        additional-fields[template]: tools.additional-fields[template]
        revision: tools.revision
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-template
      description: Delete Template
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: klaviyo-templates.deletetemplate
      with:
        id: tools.id
        revision: tools.revision
      outputParameters:
      - type: object
        mapping: $.