> ## 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 POST request to connected app account

> Makes a POST 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 post /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:
    post:
      tags:
        - App Accounts Proxy
      summary: Proxy POST request to connected app account
      description: >
        Makes a POST 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: proxyPostRequest
      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
            example: https://slack.com/api/chat.postMessage
          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.
            Example: X-PD-Proxy-Content-Type will be forwarded as Content-Type
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  example: https://slack.com/api/chat.postMessage
                  description: The target API endpoint URL
              additionalProperties: true
              example:
                url: https://slack.com/api/chat.postMessage
                channel: C123
                text: Hello from Kapso!
          application/x-www-form-urlencoded:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  example: https://slack.com/api/chat.postMessage
                  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
                example:
                  ok: true
                  channel: C123
                  ts: '1234567890.123456'
        '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 - addon not enabled or insufficient credits
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: >-
                      Insufficient credits for proxy requests. Please add
                      credits to continue.
        '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

````