Pipedrive · Capability

Pipedrive API v1 — Goals

Pipedrive API v1 — Goals. 5 operations. Lead operation: Add a new goal. Self-contained Naftiko capability covering one Pipedrive business surface.

Run with Naftiko PipedriveGoals

What You Can Do

POST
Addgoal — Add a new goal
/v1/goals
GET
Getgoals — Find goals
/v1/goals/find
PUT
Updategoal — Update existing goal
/v1/goals/{id}
DELETE
Deletegoal — Delete existing goal
/v1/goals/{id}
GET
Getgoalresult — Get result of a goal
/v1/goals/{id}/results

MCP Tools

add-new-goal

Add a new goal

find-goals

Find goals

read-only idempotent
update-existing-goal

Update existing goal

idempotent
delete-existing-goal

Delete existing goal

idempotent
get-result-goal

Get result of a goal

read-only idempotent

Capability Spec

v1-goals.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Pipedrive API v1 — Goals
  description: 'Pipedrive API v1 — Goals. 5 operations. Lead operation: Add a new goal. Self-contained Naftiko capability
    covering one Pipedrive business surface.'
  tags:
  - Pipedrive
  - Goals
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    PIPEDRIVE_API_KEY: PIPEDRIVE_API_KEY
capability:
  consumes:
  - type: http
    namespace: v1-goals
    baseUri: https://api.pipedrive.com/v1
    description: Pipedrive API v1 — Goals business capability. Self-contained, no shared references.
    resources:
    - name: goals
      path: /goals
      operations:
      - name: addgoal
        method: POST
        description: Add a new goal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
    - name: goals-find
      path: /goals/find
      operations:
      - name: getgoals
        method: GET
        description: Find goals
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: type.name
          in: query
          type: string
          description: The type of the goal. If provided, everyone's goals will be returned.
        - name: title
          in: query
          type: string
          description: The title of the goal
        - name: is_active
          in: query
          type: boolean
          description: Whether the goal is active or not
        - name: assignee.id
          in: query
          type: integer
          description: The ID of the user who's goal to fetch. When omitted, only your goals will be returned.
        - name: assignee.type
          in: query
          type: string
          description: The type of the goal's assignee. If provided, everyone's goals will be returned.
        - name: expected_outcome.target
          in: query
          type: number
          description: The numeric value of the outcome. If provided, everyone's goals will be returned.
        - name: expected_outcome.tracking_metric
          in: query
          type: string
          description: The tracking metric of the expected outcome of the goal. If provided, everyone's goals will be returned.
        - name: expected_outcome.currency_id
          in: query
          type: integer
          description: 'The numeric ID of the goal''s currency. Only applicable to goals with `expected_outcome.tracking_metric`
            with value `sum`. If provided, everyone''s goals will be '
        - name: type.params.pipeline_id
          in: query
          type: array
          description: An array of pipeline IDs or `null` for all pipelines. If provided, everyone's goals will be returned.
        - name: type.params.stage_id
          in: query
          type: integer
          description: The ID of the stage. Applicable to only `deals_progressed` type of goals. If provided, everyone's goals
            will be returned.
        - name: type.params.activity_type_id
          in: query
          type: array
          description: An array of IDs or `null` for all activity types. Only applicable for `activities_completed` and/or
            `activities_added` types of goals. If provided, everyone's g
        - name: period.start
          in: query
          type: string
          description: The start date of the period for which to find goals. Date in format of YYYY-MM-DD. When `period.start`
            is provided, `period.end` must be provided too.
        - name: period.end
          in: query
          type: string
          description: The end date of the period for which to find goals. Date in format of YYYY-MM-DD.
    - name: goals-id
      path: /goals/{id}
      operations:
      - name: updategoal
        method: PUT
        description: Update existing goal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the goal
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: false
      - name: deletegoal
        method: DELETE
        description: Delete existing goal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the goal
          required: true
    - name: goals-id-results
      path: /goals/{id}/results
      operations:
      - name: getgoalresult
        method: GET
        description: Get result of a goal
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: id
          in: path
          type: string
          description: The ID of the goal that the results are looked for
          required: true
        - name: period.start
          in: query
          type: string
          description: 'The start date of the period for which to find the goal''s progress. Format: YYYY-MM-DD. This date
            must be the same or after the goal duration start date.'
          required: true
        - name: period.end
          in: query
          type: string
          description: 'The end date of the period for which to find the goal''s progress. Format: YYYY-MM-DD. This date must
            be the same or before the goal duration end date.'
          required: true
    authentication:
      type: bearer
      token: '{{env.PIPEDRIVE_API_KEY}}'
  exposes:
  - type: rest
    namespace: v1-goals-rest
    port: 8080
    description: REST adapter for Pipedrive API v1 — Goals. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/goals
      name: goals
      description: REST surface for goals.
      operations:
      - method: POST
        name: addgoal
        description: Add a new goal
        call: v1-goals.addgoal
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/goals/find
      name: goals-find
      description: REST surface for goals-find.
      operations:
      - method: GET
        name: getgoals
        description: Find goals
        call: v1-goals.getgoals
        with:
          type.name: rest.type.name
          title: rest.title
          is_active: rest.is_active
          assignee.id: rest.assignee.id
          assignee.type: rest.assignee.type
          expected_outcome.target: rest.expected_outcome.target
          expected_outcome.tracking_metric: rest.expected_outcome.tracking_metric
          expected_outcome.currency_id: rest.expected_outcome.currency_id
          type.params.pipeline_id: rest.type.params.pipeline_id
          type.params.stage_id: rest.type.params.stage_id
          type.params.activity_type_id: rest.type.params.activity_type_id
          period.start: rest.period.start
          period.end: rest.period.end
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/goals/{id}
      name: goals-id
      description: REST surface for goals-id.
      operations:
      - method: PUT
        name: updategoal
        description: Update existing goal
        call: v1-goals.updategoal
        with:
          id: rest.id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletegoal
        description: Delete existing goal
        call: v1-goals.deletegoal
        with:
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/goals/{id}/results
      name: goals-id-results
      description: REST surface for goals-id-results.
      operations:
      - method: GET
        name: getgoalresult
        description: Get result of a goal
        call: v1-goals.getgoalresult
        with:
          id: rest.id
          period.start: rest.period.start
          period.end: rest.period.end
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: v1-goals-mcp
    port: 9090
    transport: http
    description: MCP adapter for Pipedrive API v1 — Goals. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: add-new-goal
      description: Add a new goal
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: v1-goals.addgoal
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: find-goals
      description: Find goals
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: v1-goals.getgoals
      with:
        type.name: tools.type.name
        title: tools.title
        is_active: tools.is_active
        assignee.id: tools.assignee.id
        assignee.type: tools.assignee.type
        expected_outcome.target: tools.expected_outcome.target
        expected_outcome.tracking_metric: tools.expected_outcome.tracking_metric
        expected_outcome.currency_id: tools.expected_outcome.currency_id
        type.params.pipeline_id: tools.type.params.pipeline_id
        type.params.stage_id: tools.type.params.stage_id
        type.params.activity_type_id: tools.type.params.activity_type_id
        period.start: tools.period.start
        period.end: tools.period.end
      outputParameters:
      - type: object
        mapping: $.
    - name: update-existing-goal
      description: Update existing goal
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: v1-goals.updategoal
      with:
        id: tools.id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-existing-goal
      description: Delete existing goal
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: v1-goals.deletegoal
      with:
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: get-result-goal
      description: Get result of a goal
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: v1-goals.getgoalresult
      with:
        id: tools.id
        period.start: tools.period.start
        period.end: tools.period.end
      outputParameters:
      - type: object
        mapping: $.