> ## Documentation Index
> Fetch the complete documentation index at: https://kapso-1adbad2d.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Proxy PATCH request to connected app account

> Makes a PATCH request to an external API on behalf of a connected app account.
The Pipedream proxy handles OAuth credential injection and forwards the request
with the provided body to the target API endpoint.




## OpenAPI

````yaml api/legacy/openapi-functions.yaml patch /app_accounts/{account_id}/proxy
openapi: 3.0.3
info:
  title: Kapso External API - Functions and App Accounts API
  description: >-
    API for programmatically managing and invoking Kapso Functions, and for
    making API calls to connected app accounts through the Pipedream proxy. This
    specification includes all Functions and App Accounts API endpoints.
  version: 1.0.0
  contact:
    name: Kapso Support
servers:
  - url: https://app.kapso.ai/api/v1
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /app_accounts/{account_id}/proxy:
    patch:
      tags:
        - App Accounts Proxy
      summary: Proxy PATCH request to connected app account
      description: >
        Makes a PATCH request to an external API on behalf of a connected app
        account.

        The Pipedream proxy handles OAuth credential injection and forwards the
        request

        with the provided body to the target API endpoint.
      operationId: proxyPatchRequest
      parameters:
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            example: apn_1234567
          description: The Pipedream account ID for the connected app
        - name: X-Target-URL
          in: header
          required: false
          schema:
            type: string
            format: uri
          description: Alternative way to specify target URL via header
        - name: X-PD-Proxy-*
          in: header
          required: false
          schema:
            type: string
          description: |
            Custom headers to forward to the target API. Use X-PD-Proxy- prefix.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: The target API endpoint URL
              additionalProperties: true
      responses:
        '200':
          description: Successful proxy request
          content:
            application/json:
              schema:
                type: object
                description: Response from the target API
                additionalProperties: true
        '400':
          description: Missing target URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: App account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Proxy request failed
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Proxy request failed
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
          example: Resource not found
        status:
          type: integer
          example: 404
        message:
          type: string
          example: The requested resource could not be found
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key required for all endpoints

````