naftiko: 1.0.0-alpha2 info: label: Pipedrive API v1 — Oauth description: 'Pipedrive API v1 — Oauth. 3 operations. Lead operation: Requesting authorization. Self-contained Naftiko capability covering one Pipedrive business surface.' tags: - Pipedrive - Oauth created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: PIPEDRIVE_API_KEY: PIPEDRIVE_API_KEY capability: consumes: - type: http namespace: v1-oauth baseUri: https://api.pipedrive.com/v1 description: Pipedrive API v1 — Oauth business capability. Self-contained, no shared references. resources: - name: oauth-authorize path: /oauth/authorize operations: - name: authorize method: GET description: Requesting authorization outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: client_id in: query type: string description: The client ID provided to you by the Pipedrive Marketplace when you register your app required: true - name: redirect_uri in: query type: string description: The callback URL you provided when you registered your app. Authorization code will be sent to that URL (if it matches with the value you entered in the registr required: true - name: state in: query type: string description: You may pass any random string as the state parameter and the same string will be returned to your app after a user authorizes access. It may be used to store t - name: oauth-token path: /oauth/token operations: - name: gettokens method: POST description: Getting the tokens outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Authorization in: header type: string description: Base 64 encoded string containing the `client_id` and `client_secret` values. The header value should be `Basic `. required: true - name: body in: body type: object description: Request body (JSON). required: false - name: oauth-token path: /oauth/token/ operations: - name: refreshtokens method: POST description: Refreshing the tokens outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: Authorization in: header type: string description: Base 64 encoded string containing the `client_id` and `client_secret` values. The header value should be `Basic `. required: true - name: body in: body type: object description: Request body (JSON). required: false authentication: type: bearer token: '{{env.PIPEDRIVE_API_KEY}}' exposes: - type: rest namespace: v1-oauth-rest port: 8080 description: REST adapter for Pipedrive API v1 — Oauth. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/oauth/authorize name: oauth-authorize description: REST surface for oauth-authorize. operations: - method: GET name: authorize description: Requesting authorization call: v1-oauth.authorize with: client_id: rest.client_id redirect_uri: rest.redirect_uri state: rest.state outputParameters: - type: object mapping: $. - path: /v1/oauth/token name: oauth-token description: REST surface for oauth-token. operations: - method: POST name: gettokens description: Getting the tokens call: v1-oauth.gettokens with: Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - path: /v1/oauth/token name: oauth-token description: REST surface for oauth-token. operations: - method: POST name: refreshtokens description: Refreshing the tokens call: v1-oauth.refreshtokens with: Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - type: mcp namespace: v1-oauth-mcp port: 9090 transport: http description: MCP adapter for Pipedrive API v1 — Oauth. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: requesting-authorization description: Requesting authorization hints: readOnly: true destructive: false idempotent: true call: v1-oauth.authorize with: client_id: tools.client_id redirect_uri: tools.redirect_uri state: tools.state outputParameters: - type: object mapping: $. - name: getting-tokens description: Getting the tokens hints: readOnly: false destructive: false idempotent: false call: v1-oauth.gettokens with: Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: refreshing-tokens description: Refreshing the tokens hints: readOnly: false destructive: false idempotent: false call: v1-oauth.refreshtokens with: Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $.