Close · Capability

API Endpoints — subpackage_emailTemplates

API Endpoints — subpackage_emailTemplates. 6 operations. Lead operation: List email templates. Self-contained Naftiko capability covering one Close business surface.

Run with Naftiko Closesubpackage_emailTemplates

What You Can Do

GET
List — List email templates
/v1/email-template
POST
Create — Create an email template
/v1/email-template
GET
Get — Fetch an email template
/v1/email-template/{id}
PUT
Update — Update an email template
/v1/email-template/{id}
DELETE
Delete — Delete an email template
/v1/email-template/{id}
GET
Render — Render an email template
/v1/email-template/{id}/render

MCP Tools

list-email-templates

List email templates

read-only idempotent
create-email-template

Create an email template

fetch-email-template

Fetch an email template

read-only idempotent
update-email-template

Update an email template

idempotent
delete-email-template

Delete an email template

idempotent
render-email-template

Render an email template

read-only idempotent

Capability Spec

close-subpackage-emailtemplates.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Endpoints — subpackage_emailTemplates
  description: 'API Endpoints — subpackage_emailTemplates. 6 operations. Lead operation: List email templates. Self-contained
    Naftiko capability covering one Close business surface.'
  tags:
  - Close
  - subpackage_emailTemplates
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CLOSE_API_KEY: CLOSE_API_KEY
capability:
  consumes:
  - type: http
    namespace: close-subpackage-emailtemplates
    baseUri: https://api.close.com/api/v1
    description: API Endpoints — subpackage_emailTemplates business capability. Self-contained, no shared references.
    resources:
    - name: email_template
      path: /email_template/
      operations:
      - name: list
        method: GET
        description: List email templates
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _limit
          in: query
          type: integer
          description: Number of results to return.
        - name: _skip
          in: query
          type: integer
          description: Number of results to skip before returning, for pagination.
        - name: is_archived
          in: query
          type: boolean
        - name: is_shared
          in: query
          type: boolean
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
      - name: create
        method: POST
        description: Create an email template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: _fields
          in: query
          type: string
          description: Comma-separated list of fields to include in the response.
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: email_template-id
      path: /email_template/{id}/
      operations:
      - name: get
        method: GET
        description: Fetch an email template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: _fields
          in: query
          type: string
          description: Comma-separated list of fields to include in the response.
        - name: include_embedded
          in: query
          type: boolean
          description: Include embedded templates used by Workflows.
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
      - name: update
        method: PUT
        description: Update an email template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: _fields
          in: query
          type: string
          description: Comma-separated list of fields to include in the response.
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: delete
        method: DELETE
        description: Delete an email template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
    - name: email_template-id-render
      path: /email_template/{id}/render/
      operations:
      - name: render
        method: GET
        description: Render an email template
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          required: true
        - name: email_account_id
          in: query
          type: string
        - name: bulk_object_type
          in: query
          type: string
        - name: contact_id
          in: query
          type: string
        - name: contact_preference
          in: query
          type: string
        - name: entry
          in: query
          type: integer
        - name: lead_id
          in: query
          type: string
        - name: limit
          in: query
          type: integer
        - name: query
          in: query
          type: string
        - name: results_limit
          in: query
          type: integer
        - name: s_query
          in: query
          type: string
        - name: sender
          in: query
          type: string
        - name: sort
          in: query
          type: array
        - name: mode
          in: query
          type: string
        - name: Authorization
          in: header
          type: string
          description: Use your API key as the username and leave the password empty.
          required: true
    authentication:
      type: bearer
      token: '{{env.CLOSE_API_KEY}}'
  exposes:
  - type: rest
    namespace: close-subpackage-emailtemplates-rest
    port: 8080
    description: REST adapter for API Endpoints — subpackage_emailTemplates. One Spectral-compliant resource per consumed
      operation, prefixed with /v1.
    resources:
    - path: /v1/email-template
      name: email-template
      description: REST surface for email_template.
      operations:
      - method: GET
        name: list
        description: List email templates
        call: close-subpackage-emailtemplates.list
        with:
          _limit: rest._limit
          _skip: rest._skip
          is_archived: rest.is_archived
          is_shared: rest.is_shared
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: create
        description: Create an email template
        call: close-subpackage-emailtemplates.create
        with:
          _fields: rest._fields
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/email-template/{id}
      name: email-template-id
      description: REST surface for email_template-id.
      operations:
      - method: GET
        name: get
        description: Fetch an email template
        call: close-subpackage-emailtemplates.get
        with:
          id: rest.id
          _fields: rest._fields
          include_embedded: rest.include_embedded
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: update
        description: Update an email template
        call: close-subpackage-emailtemplates.update
        with:
          id: rest.id
          _fields: rest._fields
          Authorization: rest.Authorization
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: delete
        description: Delete an email template
        call: close-subpackage-emailtemplates.delete
        with:
          id: rest.id
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/email-template/{id}/render
      name: email-template-id-render
      description: REST surface for email_template-id-render.
      operations:
      - method: GET
        name: render
        description: Render an email template
        call: close-subpackage-emailtemplates.render
        with:
          id: rest.id
          email_account_id: rest.email_account_id
          bulk_object_type: rest.bulk_object_type
          contact_id: rest.contact_id
          contact_preference: rest.contact_preference
          entry: rest.entry
          lead_id: rest.lead_id
          limit: rest.limit
          query: rest.query
          results_limit: rest.results_limit
          s_query: rest.s_query
          sender: rest.sender
          sort: rest.sort
          mode: rest.mode
          Authorization: rest.Authorization
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: close-subpackage-emailtemplates-mcp
    port: 9090
    transport: http
    description: MCP adapter for API Endpoints — subpackage_emailTemplates. One tool per consumed operation, routed inline
      through this capability's consumes block.
    tools:
    - name: list-email-templates
      description: List email templates
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: close-subpackage-emailtemplates.list
      with:
        _limit: tools._limit
        _skip: tools._skip
        is_archived: tools.is_archived
        is_shared: tools.is_shared
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: create-email-template
      description: Create an email template
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: close-subpackage-emailtemplates.create
      with:
        _fields: tools._fields
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: fetch-email-template
      description: Fetch an email template
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: close-subpackage-emailtemplates.get
      with:
        id: tools.id
        _fields: tools._fields
        include_embedded: tools.include_embedded
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: update-email-template
      description: Update an email template
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: close-subpackage-emailtemplates.update
      with:
        id: tools.id
        _fields: tools._fields
        Authorization: tools.Authorization
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-email-template
      description: Delete an email template
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: close-subpackage-emailtemplates.delete
      with:
        id: tools.id
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.
    - name: render-email-template
      description: Render an email template
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: close-subpackage-emailtemplates.render
      with:
        id: tools.id
        email_account_id: tools.email_account_id
        bulk_object_type: tools.bulk_object_type
        contact_id: tools.contact_id
        contact_preference: tools.contact_preference
        entry: tools.entry
        lead_id: tools.lead_id
        limit: tools.limit
        query: tools.query
        results_limit: tools.results_limit
        s_query: tools.s_query
        sender: tools.sender
        sort: tools.sort
        mode: tools.mode
        Authorization: tools.Authorization
      outputParameters:
      - type: object
        mapping: $.