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

# Get function logs

> Get logs from the data endpoint function.



## OpenAPI

````yaml /api/platform/v1/openapi-platform.yaml get /whatsapp/flows/{flow_id}/function_logs
openapi: 3.1.0
info:
  title: Kapso Platform API
  version: 0.2.0
  description: >
    Build WhatsApp messaging into your product. Manage customers, connect phone
    numbers, send broadcasts, and handle conversations.
servers:
  - url: https://api.kapso.ai/platform/v1
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Customers
    description: Manage customer accounts
  - name: Setup Links
    description: WhatsApp onboarding via embedded signup
  - name: Phone Numbers
    description: Connect and manage WhatsApp numbers
  - name: Webhooks
    description: Subscribe to WhatsApp events
  - name: Display Names
    description: Update WhatsApp business display names
  - name: Broadcasts
    description: |
      Send template messages at scale

      **Alpha**: This API is in alpha and subject to change
  - name: Conversations
    description: Manage conversation state
  - name: Media
    description: Upload media files for WhatsApp messaging
  - name: Users
    description: Manage project team members
  - name: Inbox Embeds
    description: Create and manage embeddable inbox access links
  - name: Webhook Deliveries
    description: View webhook delivery attempts and their status
  - name: External API Logs
    description: View logs of external API calls made by the project
  - name: Log Search
    description: Search log events across API, Meta, workflow, and webhook sources
  - name: Events
    description: Emit and query project-scoped events
  - name: Provider Models
    description: List available AI provider models
  - name: WhatsApp Flows
    description: Build interactive WhatsApp Flows for surveys and forms
  - name: Contacts
    description: Manage WhatsApp contacts
paths:
  /whatsapp/flows/{flow_id}/function_logs:
    parameters:
      - name: flow_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
    get:
      tags:
        - WhatsApp Flows
      summary: Get function logs
      description: Get logs from the data endpoint function.
      operationId: getWhatsappFlowFunctionLogs
      parameters:
        - name: limit
          in: query
          description: Max logs to return (default 20, max 50)
          schema:
            type: integer
            minimum: 1
            maximum: 50
            default: 20
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsappFlowFunctionLogsResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
        '422':
          description: No data endpoint configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    WhatsappFlowFunctionLogsResponse:
      type: object
      required:
        - data
      properties:
        data:
          type: object
          required:
            - function_id
            - function_name
            - logs
          properties:
            function_id:
              type: string
              format: uuid
            function_name:
              type: string
            logs:
              type: array
              items:
                $ref: '#/components/schemas/WhatsappFlowFunctionLog'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    WhatsappFlowFunctionLog:
      type: object
      properties:
        level:
          type: string
        message:
          type: string
        logged_at:
          type: string
          format: date-time
        stack:
          type:
            - string
            - 'null'
        cf_ray:
          type:
            - string
            - 'null'
        outcome:
          type:
            - string
            - 'null'
  responses:
    UnauthorizedError:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFoundError:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````