Merge · Capability

Merge CRM API — Opportunities

Merge CRM API — Opportunities. 2 operations. Lead operation: Merge List Opportunities. Self-contained Naftiko capability covering one Merge business surface.

Run with Naftiko MergeOpportunities

What You Can Do

GET
Listopportunities — Merge List Opportunities
/v1/opportunities
POST
Createopportunity — Merge Create Opportunity
/v1/opportunities

MCP Tools

merge-list-opportunities

Merge List Opportunities

read-only idempotent
merge-create-opportunity

Merge Create Opportunity

Capability Spec

crm-opportunities.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Merge CRM API — Opportunities
  description: 'Merge CRM API — Opportunities. 2 operations. Lead operation: Merge List Opportunities. Self-contained Naftiko
    capability covering one Merge business surface.'
  tags:
  - Merge
  - Opportunities
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MERGE_API_KEY: MERGE_API_KEY
capability:
  consumes:
  - type: http
    namespace: crm-opportunities
    baseUri: https://api.merge.dev/api/crm/v1
    description: Merge CRM API — Opportunities business capability. Self-contained, no shared references.
    resources:
    - name: opportunities
      path: /opportunities
      operations:
      - name: listopportunities
        method: GET
        description: Merge List Opportunities
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: status
          in: query
          type: string
          description: Filter by opportunity status.
      - name: createopportunity
        method: POST
        description: Merge Create Opportunity
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.MERGE_API_KEY}}'
  exposes:
  - type: rest
    namespace: crm-opportunities-rest
    port: 8080
    description: REST adapter for Merge CRM API — Opportunities. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/opportunities
      name: opportunities
      description: REST surface for opportunities.
      operations:
      - method: GET
        name: listopportunities
        description: Merge List Opportunities
        call: crm-opportunities.listopportunities
        with:
          status: rest.status
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createopportunity
        description: Merge Create Opportunity
        call: crm-opportunities.createopportunity
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: crm-opportunities-mcp
    port: 9090
    transport: http
    description: MCP adapter for Merge CRM API — Opportunities. One tool per consumed operation, routed inline through this
      capability's consumes block.
    tools:
    - name: merge-list-opportunities
      description: Merge List Opportunities
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: crm-opportunities.listopportunities
      with:
        status: tools.status
      outputParameters:
      - type: object
        mapping: $.
    - name: merge-create-opportunity
      description: Merge Create Opportunity
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: crm-opportunities.createopportunity
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.