components:
  schemas:
    knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoRequest:
      description: Create or fully replace the business information for an entity
      properties:
        business_description:
          type: string
        contact_info:
          $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeContactInfo'
        delivery_and_shipping:
          type: string
        payment_method:
          type: string
        purchase_info:
          type: string
        return_policy:
          type: string
      type: object
    knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoResponse:
      description: The business information configured for an entity
      properties:
        business_description:
          type: string
        contact_info:
          $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeContactInfo'
        delivery_and_shipping:
          type: string
        payment_method:
          type: string
        purchase_info:
          type: string
        return_policy:
          type: string
      type: object
    knowledge_bi.BizAIOmniChannelKnowledgeContactInfo:
      description: Contact and location details for the business. Null if not configured
      properties:
        address:
          type: string
        email:
          type: string
        hours_of_operation:
          type: string
      type: object
    knowledge_bi.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested resource does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolBodyNode:
      description: Schema for a request body field or container
      properties:
        binding:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterBinding'
        description:
          type: string
        items:
          type: string
        properties:
          additionalProperties:
            type: string
          type: object
        required:
          items:
            type: string
          type: array
          uniqueItems: false
        type:
          enum:
          - object
          - array
          - string
          - integer
          - number
          - boolean
          type: string
      required:
      - type
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterBinding:
      description: Meta Business Agent-owned binding for this node; omitted means
        agent/runtime input. Cannot be provided for an "object" or "array" type node.
      properties:
        kind:
          enum:
          - default
          - macro
          type: string
        macro:
          enum:
          - WHATSAPP_PHONE_NUMBER
          - WHATSAPP_IDENTITY_HASH
          - WHATSAPP_CURRENT_STATUS_ID
          type: string
        value:
          type: string
      required:
      - kind
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterNode:
      description: Schema for a single path, query, or header parameter
      properties:
        binding:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterBinding'
        description:
          type: string
        required:
          type: boolean
        type:
          enum:
          - string
          - integer
          - number
          - boolean
          type: string
      required:
      - type
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolRequest:
      description: Create or update a connector tool
      properties:
        description:
          type: string
        name:
          type: string
        request_definition:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRequestDefinition'
        user_auth_action_config:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolUserAuthToolConfig'
        user_auth_required:
          type: boolean
      required:
      - description
      - name
      - request_definition
      - user_auth_required
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolRequestBodyDefinition:
      description: Request body definition; omit or set to null when the request has
        no body
      properties:
        content_type:
          enum:
          - application/json
          type: string
        params:
          additionalProperties:
            $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolBodyNode'
          type: object
        required:
          items:
            type: string
          type: array
          uniqueItems: false
      required:
      - content_type
      - params
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolRequestDefinition:
      description: Roundtripped outbound HTTP request definition
      properties:
        body:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRequestBodyDefinition'
        headers:
          additionalProperties:
            $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterNode'
          type: object
        method:
          enum:
          - GET
          - POST
          - PUT
          - DELETE
          - PATCH
          type: string
        path:
          type: string
        path_parameters:
          additionalProperties:
            $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterNode'
          type: object
        query_parameters:
          additionalProperties:
            $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolParameterNode'
          type: object
      required:
      - method
      - path
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolResponse:
      description: A single connector tool
      properties:
        description:
          type: string
        id:
          example: '1234567890'
          type: string
        name:
          type: string
        request_definition:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRequestDefinition'
        user_auth_action_config:
          $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolUserAuthActionConfig'
        user_auth_required:
          type: boolean
      required:
      - description
      - id
      - name
      - request_definition
      - user_auth_required
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolRunRequest:
      description: Execute a tool action
      properties:
        input:
          type: string
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolRunResponse:
      description: The result of executing a tool action
      properties:
        output:
          type: string
        status:
          type: string
      required:
      - output
      - status
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolUserAuthActionConfig:
      description: Response extraction config for login/refresh user-auth actions
      properties:
        expires_at_path:
          type: string
        expires_at_type:
          enum:
          - absolute
          - relative_seconds
          type: string
        refresh_token_path:
          type: string
        user_action_tool_type:
          enum:
          - auth
          - refresh
          type: string
        user_auth_token_path:
          type: string
      required:
      - user_action_tool_type
      - user_auth_token_path
      type: object
    knowledge_connector_tools.BizAIOmniChannelConnectorToolUserAuthToolConfig:
      description: Response extraction config for login/refresh user-auth actions
      properties:
        expires_at_path:
          type: string
        expires_at_type:
          enum:
          - absolute
          - relative_seconds
          type: string
        refresh_token_path:
          type: string
        user_action_tool_type:
          enum:
          - auth
          - refresh
          type: string
        user_auth_token_path:
          type: string
      required:
      - user_action_tool_type
      - user_auth_token_path
      type: object
    knowledge_connector_tools.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested tool does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorApiKeyAuthConfig:
      description: API key configuration. Provide only when auth_type is API_KEY.
      properties:
        body_params:
          items:
            $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam'
          type: array
          uniqueItems: false
        headers:
          items:
            $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam'
          type: array
          uniqueItems: false
        query_params:
          items:
            $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam'
          type: array
          uniqueItems: false
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorApiKeyParam:
      description: A single API key field
      properties:
        field_name:
          type: string
        prefix:
          type: string
        value:
          type: string
      required:
      - field_name
      - value
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorAuthConfig:
      description: Authentication configuration for this connector
      properties:
        api_key:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyAuthConfig'
        oauth2_client_credentials:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorOAuth2ClientCredentialsAuthConfig'
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorCertificateRequest:
      description: Upload or rotate the mTLS client certificate for a connector
      properties:
        ca_certificate:
          type: string
        client_certificate:
          type: string
        client_key:
          type: string
      required:
      - client_certificate
      - client_key
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorConnectionStatus:
      description: Connection status information
      properties:
        error_message:
          type: string
        status:
          enum:
          - PENDING_OAUTH
          - ACTIVE
          - EXPIRED
          - ERROR
          type: string
      required:
      - status
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorLogEntry:
      description: A log entry (individual mode) or failure pattern (summary_only
        mode)
      properties:
        error_message:
          type: string
        event_time:
          type: string
        failure_code_name:
          type: string
        last_seen:
          type: string
        occurrences:
          type: integer
        tool_name:
          type: string
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorLogStats:
      description: Aggregate statistics for the queried time window, present when
        include_stats is true
      properties:
        avg_latency_s:
          type: number
        exception_count:
          type: integer
        p95_latency_s:
          type: number
        p99_latency_s:
          type: number
        start_count:
          type: integer
        success_count:
          type: integer
        success_rate:
          type: number
        time_window_seconds:
          type: integer
      required:
      - avg_latency_s
      - exception_count
      - p95_latency_s
      - p99_latency_s
      - start_count
      - success_count
      - success_rate
      - time_window_seconds
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorLogStatsResponse:
      description: Log entries or failure patterns, with optional statistics
      properties:
        data:
          items:
            $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorLogEntry'
          type: array
          uniqueItems: false
        stats:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorLogStats'
      required:
      - data
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorMtlsConfig:
      description: mTLS certificate metadata and PEM content (private key is never
        exposed)
      properties:
        ca_certificate:
          type: string
        client_certificate:
          type: string
        expires_at:
          type: integer
        fingerprint:
          type: string
        has_certificate:
          type: boolean
        subject:
          type: string
      required:
      - has_certificate
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorOAuth2ClientCredentialsAuthConfig:
      description: OAuth 2.0 client credentials configuration. Provide only when auth_type
        is OAUTH2_CLIENT_CREDENTIALS.
      properties:
        client_id:
          type: string
        client_secret:
          type: string
        scopes_to_request:
          items:
            type: string
          type: array
          uniqueItems: false
        token_request_content_type:
          type: string
        token_url:
          type: string
      required:
      - client_id
      - client_secret
      - scopes_to_request
      - token_url
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorRequest:
      description: Create or update a connector
      properties:
        auth_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorAuthConfig'
        auth_type:
          enum:
          - OAUTH2
          - OAUTH2_CLIENT_CREDENTIALS
          - API_KEY
          - BASIC
          - CUSTOM
          - NONE
          type: string
        base_url:
          type: string
        description:
          type: string
        name:
          type: string
        requires_certificate:
          type: boolean
        user_auth_injection_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig'
      required:
      - auth_type
      - base_url
      - description
      - name
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorResponse:
      description: A single connector
      properties:
        auth_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorAuthConfig'
        auth_type:
          enum:
          - OAUTH2
          - OAUTH2_CLIENT_CREDENTIALS
          - API_KEY
          - BASIC
          - CUSTOM
          - NONE
          type: string
        base_url:
          type: string
        connection_status:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorConnectionStatus'
        description:
          type: string
        id:
          example: '1234567890'
          type: string
        mtls_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorMtlsConfig'
        name:
          type: string
        user_auth_injection_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig'
      required:
      - auth_type
      - base_url
      - connection_status
      - description
      - id
      - name
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorUpsertApiKeyRequest:
      description: Set or rotate the API key credentials for a connector
      properties:
        api_key_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorApiKeyAuthConfig'
      required:
      - api_key_config
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorUpsertOAuthRequest:
      description: Set or rotate the OAuth 2.0 client credentials for a connector
      properties:
        oauth_config:
          $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorOAuth2ClientCredentialsAuthConfig'
      required:
      - oauth_config
      type: object
    knowledge_connectors.BizAIOmniChannelConnectorUserAuthInjectionConfig:
      description: Configuration for injecting user auth tokens into tool requests
      properties:
        field_name:
          type: string
        location:
          enum:
          - body
          - headers
          - path
          - query
          type: string
        prefix:
          type: string
      required:
      - field_name
      - location
      - prefix
      type: object
    knowledge_connectors.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested connector does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_faq.BizAIOmniChannelKnowledgeFAQRequest:
      description: Create or update an FAQ entry
      properties:
        answer:
          type: string
        metadata:
          additionalProperties:
            type: string
          type: object
        question:
          type: string
      required:
      - answer
      - question
      type: object
    knowledge_faq.BizAIOmniChannelKnowledgeFAQResponse:
      description: A single FAQ entry
      properties:
        answer:
          type: string
        created_at:
          type: integer
        id:
          example: '1234567890'
          type: string
        metadata:
          additionalProperties:
            type: string
          type: object
        question:
          type: string
      required:
      - answer
      - id
      - question
      type: object
    knowledge_faq.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested FAQ entry does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_files.BizAIOmniChannelKnowledgeFileResponse:
      description: Metadata of a knowledge base file
      properties:
        file_name:
          type: string
        id:
          example: '1234567890'
          type: string
      required:
      - file_name
      - id
      type: object
    knowledge_files.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested file does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_skills.BizAIOmniChannelSkillsRequest:
      description: Create or update an AI skill
      properties:
        description:
          type: string
        skill:
          type: string
        title:
          type: string
      type: object
    knowledge_skills.BizAIOmniChannelSkillsResponse:
      description: A single AI skill
      properties:
        channel:
          enum:
          - email
          - instagram
          - line
          - messenger
          - sms
          - tiktok
          - unknown
          - webchat
          - whatsapp
          type: string
        created_at:
          type: integer
        description:
          type: string
        id:
          example: '1234567890'
          type: string
        metadata:
          additionalProperties:
            type: string
          type: object
        skill:
          type: string
        title:
          type: string
      required:
      - channel
      - id
      - skill
      type: object
    knowledge_skills.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested skill does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    knowledge_websites.BizAIKnowledgeWebsiteRequest:
      description: Add or update a website crawl entry
      properties:
        url:
          example: https://example.com
          type: string
      required:
      - url
      type: object
    knowledge_websites.BizAIKnowledgeWebsiteResponse:
      description: A single website crawl entry
      properties:
        crawl_status:
          type: string
        created_at:
          type: integer
        id:
          example: '1234567890'
          type: string
        last_crawled_at:
          type: integer
        pages_crawled:
          type: integer
        url:
          example: https://example.com
          type: string
      required:
      - id
      - url
      type: object
    knowledge_websites.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested website crawl entry does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    onboard.BizAIOmniChannelAllowlistRequest:
      description: Request payload to add a consumer WhatsApp phone number to the
        allowlist
      properties:
        consumer_phone_number:
          example: '+15551234567'
          type: string
      required:
      - consumer_phone_number
      type: object
    onboard.BizAIOmniChannelAllowlistResponse:
      description: A single allowlist entry
      properties:
        consumer_phone_number:
          example: '+15551234567'
          type: string
        id:
          example: '1234567890'
          type: string
      type: object
    onboard.BizAIOmniChannelDeleteAgentResponse:
      description: Result of removing the Meta Business agent from the phone number
      properties:
        deleted_agent_id:
          example: '1234567890'
          type: string
      type: object
    onboard.BizAIOmniChannelEligibilityResponse:
      description: Eligibility result for the entity
      properties:
        is_eligible:
          example: true
          type: boolean
      type: object
    onboard.BizAIOmniChannelOnboardingResponse:
      description: Result of triggering AI agent onboarding
      properties:
        agent_id:
          example: '1234567890'
          type: string
      type: object
    onboard.BizAIOmniChannelSettingsFollowup:
      description: Settings for following up with an inactive user. Null if not configured
      properties:
        enabled:
          example: true
          type: boolean
        followup_interval_in_seconds:
          enum:
          - 0
          - 300
          - 900
          - 1800
          - 3600
          - 7200
          - 28800
          - 86400
          type: integer
        message:
          type: string
      required:
      - enabled
      type: object
    onboard.BizAIOmniChannelSettingsHandoff:
      description: Settings for handing over the conversation to a human agent. Null
        if not configured
      properties:
        enabled:
          example: true
          type: boolean
        message:
          type: string
      required:
      - enabled
      type: object
    onboard.BizAIOmniChannelSettingsRequest:
      description: Create or fully replace the AI agent settings for an entity
      properties:
        ai_audience:
          enum:
          - ALLOWLISTED_ONLY
          - EVERYONE
          type: string
        followup:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsFollowup'
        handoff:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsHandoff'
        rollout:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsRollout'
      type: object
    onboard.BizAIOmniChannelSettingsResponse:
      description: The AI agent settings for an entity
      properties:
        agent_id:
          example: '1234567890'
          type: string
        ai_audience:
          enum:
          - ALLOWLISTED_ONLY
          - EVERYONE
          type: string
        channel:
          enum:
          - email
          - instagram
          - line
          - messenger
          - sms
          - tiktok
          - unknown
          - webchat
          - whatsapp
          type: string
        followup:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsFollowup'
        handoff:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsHandoff'
        rollout:
          $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsRollout'
      required:
      - agent_id
      - channel
      - rollout
      type: object
    onboard.BizAIOmniChannelSettingsRollout:
      description: Rollout configuration for the AI agent, containing the enabled
        flag and future gradual rollout fields
      properties:
        enabled:
          example: true
          type: boolean
      required:
      - enabled
      type: object
    onboard.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested allowlist entry does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    operate.BizAIComboJobError:
      description: Error details when status is FAILED
      properties:
        code:
          type: string
        failed_case_ids:
          items:
            type: string
          type: array
          uniqueItems: false
        message:
          type: string
      required:
      - code
      - message
      type: object
    operate.BizAIComboJobProgress:
      description: Progress information while the job is running
      properties:
        completed:
          type: integer
        current_stage:
          enum:
          - simulation
          - evaluation
          - insights
          - done
          type: string
        total:
          type: integer
      required:
      - completed
      - current_stage
      - total
      type: object
    operate.BizAIComboJobResult:
      description: Full result payload when status is COMPLETED
      properties:
        avg_conversation_score:
          type: number
        avg_turn_score:
          type: number
        creation_time:
          type: integer
        eval_ids_by_score:
          type: string
        highlights:
          type: string
        summary:
          type: string
        summary_id:
          type: string
        top_failure_categories:
          type: string
        update_time:
          type: integer
      required:
      - creation_time
      - summary
      - summary_id
      - update_time
      type: object
    operate.BizAIComboJobStatusResponse:
      description: Current job status and results (if completed)
      properties:
        error:
          $ref: '#/components/schemas/operate.BizAIComboJobError'
        progress:
          $ref: '#/components/schemas/operate.BizAIComboJobProgress'
        result:
          $ref: '#/components/schemas/operate.BizAIComboJobResult'
        status:
          enum:
          - QUEUED
          - RUNNING
          - COMPLETED
          - FAILED
          type: string
      required:
      - status
      type: object
    operate.BizAIComboRunRequest:
      description: Combo evaluation job request body
      type: object
    operate.BizAIComboRunResponse:
      description: Acknowledgment that the job was accepted for processing
      properties:
        job_id:
          type: string
        status:
          type: string
      required:
      - job_id
      - status
      type: object
    operate.BizAIEvalCaseResponse:
      description: A single evaluation scenario configuration
      properties:
        categories:
          items:
            type: string
          type: array
          uniqueItems: false
        id:
          type: string
        max_turns:
          type: integer
        scenario:
          type: string
        success_criteria:
          items:
            type: string
          type: array
          uniqueItems: false
      required:
      - id
      - scenario
      type: object
    operate.BizAIEvalDetailResponse:
      description: A per-conversation evaluation result
      properties:
        creation_time:
          type: integer
        custom_success_criteria:
          type: string
        eval_case_id:
          type: string
        id:
          type: string
        per_turn_labels:
          type: string
        reasons:
          type: string
        score:
          type: integer
        transcript:
          type: string
        update_time:
          type: integer
      required:
      - creation_time
      - id
      - per_turn_labels
      - reasons
      - update_time
      type: object
    operate.BizAIEvalSummaryResponse:
      description: An aggregated insight report
      properties:
        avg_conversation_score:
          type: number
        avg_turn_score:
          type: number
        creation_time:
          type: integer
        eval_ids_by_score:
          type: string
        highlights:
          type: string
        id:
          type: string
        summary:
          type: string
        top_failure_categories:
          type: string
        update_time:
          type: integer
      required:
      - creation_time
      - id
      - summary
      - update_time
      type: object
    operate.BizAIOmniChannelAgentEvent:
      description: Event-specific fields
      properties:
        description:
          type: string
        payload:
          type: string
        type:
          type: string
      required:
      - description
      - payload
      - type
      type: object
    operate.BizAIOmniChannelAgentEventRequest:
      description: Trigger an agent action asynchronously
      properties:
        event:
          $ref: '#/components/schemas/operate.BizAIOmniChannelAgentEvent'
        to:
          example: '+15551234567'
          type: string
      required:
      - event
      - to
      type: object
    operate.BizAIOmniChannelAgentEventResponse:
      description: Acknowledgment that the event was accepted for processing
      properties:
        agent_event_id:
          type: string
        status:
          type: string
      required:
      - status
      type: object
    operate.BizAIOmniChannelAgentEventStatusResponse:
      description: The current processing status of an agent event
      properties:
        created_at:
          type: string
        error_message:
          type: string
        event_type:
          type: string
        skipped_reason:
          type: string
        status:
          enum:
          - request_received
          - processing
          - sent
          - failed
          - skipped
          - success
          type: string
        updated_at:
          type: string
      required:
      - created_at
      - event_type
      - status
      - updated_at
      type: object
    operate.BizAIOmniChannelAgentTestRequest:
      description: Send a test message to the AI agent
      properties:
        conversation_id:
          type: string
        user_msg:
          type: string
      required:
      - user_msg
      type: object
    operate.BizAIOmniChannelAgentTestResponse:
      description: The AI agent response and test conversation metadata
      properties:
        agent_response:
          type: string
        conversation_id:
          type: string
        handoff_reason:
          type: string
        message_id:
          type: string
        no_response_reason:
          type: string
        product_variant_ids:
          items:
            type: string
          type: array
          uniqueItems: false
        quick_replies:
          items:
            type: string
          type: array
          uniqueItems: false
        timestamp:
          type: integer
      required:
      - agent_response
      - conversation_id
      - message_id
      type: object
    operate.EvalCasesResponse:
      description: List of eval cases for the entity
      properties:
        eval_cases:
          items:
            $ref: '#/components/schemas/operate.BizAIEvalCaseResponse'
          type: array
          uniqueItems: false
      required:
      - eval_cases
      type: object
    operate.EvalDetailsResponse:
      description: List of evaluation results
      properties:
        evaluations:
          items:
            $ref: '#/components/schemas/operate.BizAIEvalDetailResponse'
          type: array
          uniqueItems: false
      required:
      - evaluations
      type: object
    operate.EvalSummariesResponse:
      description: List of insight reports
      properties:
        insights:
          items:
            $ref: '#/components/schemas/operate.BizAIEvalSummaryResponse'
          type: array
          uniqueItems: false
      required:
      - insights
      type: object
    operate.StandardError:
      description: Standard error response for Meta Business Agent endpoints
      properties:
        detail:
          example: The requested resource does not exist
          type: string
        status:
          example: 404
          type: integer
        title:
          example: Not found
          type: string
        type:
          type: string
      type: object
    operate.ThreadControlRequest:
      description: Thread control action to perform
      properties:
        action:
          enum:
          - pass
          - release
          type: string
        messaging_product:
          enum:
          - whatsapp
          type: string
        recipient:
          type: string
        to:
          type: string
      required:
      - action
      - messaging_product
      type: object
    operate.ThreadControlResponse:
      description: Thread control action result with messaging product identifier
      properties:
        messaging_product:
          enum:
          - whatsapp
          type: string
      required:
      - messaging_product
      type: object
  securitySchemes:
    D360-API-KEY:
      description: API Key for Messaging API authentication. Send your API key in
        the D360-API-KEY header.
      in: header
      name: D360-API-KEY
      type: apiKey
info:
  contact:
    email: support@360dialog.com
    name: 360dialog Support
    url: https://www.360dialog.com/
  description: API for managing and operating a Business Agent via 360dialog
  title: Business Agent API
  version: 1.49.1
paths:
  /agent-eval/cases:
    get:
      description: List all evaluation scenario configurations for the given entity.
      operationId: get-agent-eval-cases
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.EvalCasesResponse'
          description: List of eval cases for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List evaluation cases
      tags:
      - Operate
  /agent-eval/details:
    get:
      description: Retrieve per-conversation evaluation results by evaluation IDs.
      operationId: get-agent-eval-details
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Comma-separated list of evaluation IDs to retrieve
        in: query
        name: eval_ids
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.EvalDetailsResponse'
          description: The requested evaluations
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get evaluation details
      tags:
      - Operate
  /agent-eval/run:
    get:
      description: Poll the status and results of a previously submitted evaluation
        job.
      operationId: get-agent-eval-run
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The job ID returned by the POST /run endpoint
        in: query
        name: job_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.BizAIComboJobStatusResponse'
          description: Current job status and results (if completed)
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get evaluation job status
      tags:
      - Operate
    post:
      description: Submit a combo evaluation job that runs simulation, evaluation,
        and optionally insights across multiple cases. Returns a job_id for polling.
      operationId: post-agent-eval-run
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Comma-separated list of eval case IDs (pfbid format)
        in: query
        name: eval_case_ids
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/operate.BizAIComboRunRequest'
              summary: requestBody
              description: Combo evaluation job request body
        description: Combo evaluation job request body
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.BizAIComboRunResponse'
          description: Acknowledgment that the job was accepted for processing
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Run an evaluation job
      tags:
      - Operate
  /agent-eval/summary:
    get:
      description: Retrieve aggregated insight reports for agent evaluations by insight
        IDs.
      operationId: get-agent-eval-summary
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Comma-separated list of summary IDs to retrieve
        in: query
        name: summary_ids
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.EvalSummariesResponse'
          description: List of insight reports
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get evaluation summary
      tags:
      - Operate
  /agent_config/allowlist:
    get:
      description: Retrieve a list of all allowlisted consumer phone numbers for the
        specified entity.
      operationId: get-agent-config-allowlist
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/onboard.BizAIOmniChannelAllowlistResponse'
                type: array
          description: A list of all allowlist entries
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List allowlist entries
      tags:
      - Onboarding
    post:
      description: Add a consumer phone number to the allowlist for the specified
        entity.
      operationId: post-agent-config-allowlist
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/onboard.BizAIOmniChannelAllowlistRequest'
              summary: requestBody
              description: Consumer phone number to allowlist
        description: Consumer phone number to allowlist
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.BizAIOmniChannelAllowlistResponse'
          description: The newly created allowlist entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Add to allowlist
      tags:
      - Onboarding
  /agent_config/allowlist/{entry_id}:
    delete:
      description: Remove a specific allowlist entry by its ID.
      operationId: delete-agent-config-allowlist-entry
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the allowlist entry
        in: path
        name: entry_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Allowlist entry successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Remove from allowlist
      tags:
      - Onboarding
  /agent_config/business_info:
    delete:
      description: Reset the business information for the specified entity to default
        values. Returns the default (empty) business info object.
      operationId: delete-agent-config-business-info
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoResponse'
          description: The default business information after reset
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Reset business information to defaults
      tags:
      - Knowledge - Business Info
    get:
      description: Retrieve the current business information for the specified entity.
        Returns empty/default values if none has been configured.
      operationId: get-agent-config-business-info
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoResponse'
          description: The current business information for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get business information
      tags:
      - Knowledge - Business Info
    put:
      description: Create or fully replace the business information for the specified
        entity. All provided fields will overwrite existing values.
      operationId: put-agent-config-business-info
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoRequest'
              summary: requestBody
              description: Business information to create or replace
        description: Business information to create or replace
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.BizAIOmniChannelKnowledgeBusinessInfoResponse'
          description: The updated business information for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_bi.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create or replace business information
      tags:
      - Knowledge - Business Info
  /agent_config/faq:
    get:
      description: Retrieve a list of all FAQ entries for the specified entity.
      operationId: get-agent-config-faq
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQResponse'
                type: array
          description: A list of all FAQ entries
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List FAQs
      tags:
      - Knowledge - FAQ
    post:
      description: Create a new FAQ entry for the specified entity.
      operationId: post-agent-config-faq
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQRequest'
              summary: requestBody
              description: FAQ entry to create
        description: FAQ entry to create
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQResponse'
          description: The newly created FAQ entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create an FAQ
      tags:
      - Knowledge - FAQ
  /agent_config/faq/{faq_id}:
    delete:
      description: Delete a specific FAQ entry by its ID.
      operationId: delete-agent-config-faq-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the FAQ entry
        in: path
        name: faq_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: FAQ entry successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete an FAQ
      tags:
      - Knowledge - FAQ
    get:
      description: Retrieve a specific FAQ entry by its ID.
      operationId: get-agent-config-faq-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the FAQ entry
        in: path
        name: faq_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQResponse'
          description: The requested FAQ entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get an FAQ
      tags:
      - Knowledge - FAQ
    put:
      description: Update a specific FAQ entry by its ID.
      operationId: put-agent-config-faq-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the FAQ entry
        in: path
        name: faq_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQRequest'
              summary: requestBody
              description: Updated FAQ entry
        description: Updated FAQ entry
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.BizAIOmniChannelKnowledgeFAQResponse'
          description: The updated FAQ entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_faq.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update an FAQ
      tags:
      - Knowledge - FAQ
  /agent_config/files:
    get:
      description: Retrieve a list of all files in the AI agent knowledge base for
        the specified entity.
      operationId: get-agent-config-files
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_files.BizAIOmniChannelKnowledgeFileResponse'
                type: array
          description: A list of all knowledge base files
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List knowledge files
      tags:
      - Knowledge - Files
    post:
      description: Upload a new file to the AI agent knowledge base for the specified
        entity.
      operationId: post-agent-config-files
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              oneOf:
              - title: file_name
                type: string
              - title: file
                type: file
          multipart/form-data:
            schema:
              type: object
        description: 'The name of the file being uploaded | The file to upload. Max
          100000000 bytes. Supported: .pdf, .doc, .docx, .png, .jpg, .jpeg, .csv (if
          CSV extraction enabled), .xlsx (if XLSX extraction enabled)'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.BizAIOmniChannelKnowledgeFileResponse'
          description: The newly uploaded file metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Upload a knowledge file
      tags:
      - Knowledge - Files
  /agent_config/files/{file_id}:
    delete:
      description: Delete a specific file from the knowledge base by its ID.
      operationId: delete-agent-config-files-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the file
        in: path
        name: file_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: File successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete a knowledge file
      tags:
      - Knowledge - Files
    get:
      description: Retrieve a specific file's metadata by its ID.
      operationId: get-agent-config-files-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the file
        in: path
        name: file_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.BizAIOmniChannelKnowledgeFileResponse'
          description: The requested file metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_files.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get a knowledge file
      tags:
      - Knowledge - Files
  /agent_config/settings:
    get:
      description: Retrieve the current AI settings for the specified entity.
      operationId: get-agent-config-settings
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Optional agent ID. When provided, returns the specific agent
          configuration. When absent, returns all settings for the given channel.
        in: query
        name: agent_id
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsResponse'
                type: array
          description: The AI settings for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get AI agent settings
      tags:
      - Onboarding
    put:
      description: Create or fully replace the AI settings for the specified entity.
        All fields must be provided for a complete replacement. Note that disabling
        the agent will make the AI stop responding to all threads. Re-enabling it
        will make the AI start responding to new threads only.
      operationId: put-agent-config-settings
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Optional agent ID. When provided, updates the specific agent
          configuration. When absent, uses create-or-fetch behavior.
        in: query
        name: agent_id
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsRequest'
              summary: requestBody
              description: AI agent settings to create or replace
        description: AI agent settings to create or replace
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.BizAIOmniChannelSettingsResponse'
          description: The updated AI settings for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update AI agent settings
      tags:
      - Onboarding
  /agent_config/skills:
    get:
      description: Retrieve a list of all AI skills for the specified entity.
      operationId: get-agent-config-skills
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Optional settings ID. When provided, returns skills for the specified
          settings. When absent, returns skills for the most recently created settings
          for the given channel.
        in: query
        name: agent_id
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsResponse'
                type: array
          description: A list of all skills
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List skills
      tags:
      - Knowledge - Skills
    post:
      description: Create a new AI skill for the specified entity.
      operationId: post-agent-config-skills
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: Optional settings ID. When provided, creates the skill under
          the specified settings. When absent, uses the most recently created settings
          for the given channel.
        in: query
        name: agent_id
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsRequest'
              summary: requestBody
              description: Skill to create
        description: Skill to create
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsResponse'
          description: The newly created skill
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create a skill
      tags:
      - Knowledge - Skills
  /agent_config/skills/{skill_id}:
    delete:
      description: Delete a specific AI skill by its ID.
      operationId: delete-agent-config-skills-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier (UUID) of the skill
        in: path
        name: skill_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Skill successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete a skill
      tags:
      - Knowledge - Skills
    get:
      description: Retrieve a specific AI skill by its ID.
      operationId: get-agent-config-skills-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier (UUID) of the skill
        in: path
        name: skill_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsResponse'
          description: The requested skill
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get a skill
      tags:
      - Knowledge - Skills
    put:
      description: Update a specific AI skill by its ID.
      operationId: put-agent-config-skills-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier (UUID) of the skill
        in: path
        name: skill_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsRequest'
              summary: requestBody
              description: Updated skill
        description: Updated skill
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.BizAIOmniChannelSkillsResponse'
          description: The updated skill
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_skills.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update a skill
      tags:
      - Knowledge - Skills
  /agent_config/websites:
    get:
      description: Retrieve a list of all website URLs configured for AI agent knowledge
        crawling.
      operationId: get-agent-config-websites
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteResponse'
                type: array
          description: A list of all website crawl entries
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List knowledge websites
      tags:
      - Knowledge - Websites
    post:
      description: Add a new website URL for the AI agent to crawl and ingest into
        its knowledge base.
      operationId: post-agent-config-websites
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteRequest'
              summary: requestBody
              description: Website to add
        description: Website to add
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteResponse'
          description: The newly created website crawl entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Forbidden
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Add a knowledge website
      tags:
      - Knowledge - Websites
  /agent_config/websites/{website_id}:
    delete:
      description: Delete a specific website crawl entry from the knowledge base by
        its ID.
      operationId: delete-agent-config-websites-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the website crawl entry
        in: path
        name: website_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Website crawl entry successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete a knowledge website
      tags:
      - Knowledge - Websites
    get:
      description: Retrieve a specific website crawl entry by its ID.
      operationId: get-agent-config-websites-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the website crawl entry
        in: path
        name: website_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteResponse'
          description: The requested website crawl entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get a knowledge website
      tags:
      - Knowledge - Websites
    put:
      description: Update a specific website crawl entry by its ID.
      operationId: put-agent-config-websites-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the website crawl entry
        in: path
        name: website_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteRequest'
              summary: requestBody
              description: Updated website
        description: Updated website
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.BizAIKnowledgeWebsiteResponse'
          description: The updated website crawl entry
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_websites.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update a knowledge website
      tags:
      - Knowledge - Websites
  /agent_connectors:
    get:
      description: Retrieve a list of all connectors for the specified entity.
      operationId: get-agent-connectors
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
                type: array
          description: A list of all connectors
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List connectors
      tags:
      - Knowledge - Connectors
    post:
      description: Create a new connector for the specified entity.
      operationId: post-agent-connectors
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorRequest'
              summary: requestBody
              description: Connector to create
        description: Connector to create
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The newly created connector
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create a connector
      tags:
      - Knowledge - Connectors
  /agent_connectors/{connector_id}:
    delete:
      description: Delete a specific connector by its ID.
      operationId: delete-agent-connectors-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Connector successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete a connector
      tags:
      - Knowledge - Connectors
    get:
      description: Retrieve a specific connector by its ID.
      operationId: get-agent-connectors-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The requested connector
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get a connector
      tags:
      - Knowledge - Connectors
    put:
      description: Update a specific connector by its ID.
      operationId: put-agent-connectors-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorRequest'
              summary: requestBody
              description: Updated connector
        description: Updated connector
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The updated connector
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update a connector
      tags:
      - Knowledge - Connectors
  /agent_connectors/{connector_id}/logs:
    get:
      description: Retrieve error logs for the connector. Returns individual log entries
        by default, or aggregated failure patterns when summary_only is true. Optionally
        includes aggregate statistics. Only third-party errors are included. The time
        range must not exceed 7 days and logs are available for the last 7 days only.
      operationId: get-agent-connectors-logs
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      - description: Start of the time range (Unix seconds). Defaults to 24 hours
          ago. Must be within the last 7 days.
        in: query
        name: start_time
        schema:
          type: integer
      - description: End of the time range (Unix seconds). Defaults to now.
        in: query
        name: end_time
        schema:
          type: integer
      - description: Maximum number of log entries to return (1-1000). Defaults to
          100.
        in: query
        name: limit
        schema:
          type: integer
      - description: Optional tool ID to filter logs to a specific operation.
        in: query
        name: tool_id
        schema:
          type: string
      - description: When true, include aggregate statistics in the response. Defaults
          to false.
        in: query
        name: include_stats
        schema:
          type: boolean
      - description: When true, return aggregated failure patterns instead of individual
          log entries. Defaults to false.
        in: query
        name: summary_only
        schema:
          type: boolean
      - description: Number of top failure patterns to return when summary_only is
          true (1-50). Defaults to 10.
        in: query
        name: top_n
        schema:
          type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorLogStatsResponse'
          description: Log entries or failure patterns, with optional statistics
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List connector error logs
      tags:
      - Knowledge - Connectors
  /agent_connectors/{connector_id}/tools:
    get:
      description: Retrieve a list of all tools for the specified connector.
      operationId: get-agent-connector-tools
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolResponse'
                type: array
          description: A list of all tools
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: List connector tools
      tags:
      - Knowledge - Connector Tools
    post:
      description: Create a new tool for the specified connector.
      operationId: post-agent-connector-tools
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRequest'
              summary: requestBody
              description: Tool to create
        description: Tool to create
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolResponse'
          description: The newly created tool
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create a connector tool
      tags:
      - Knowledge - Connector Tools
  /agent_connectors/{connector_id}/tools/{tool_id}:
    delete:
      description: Delete a specific tool by its ID.
      operationId: delete-agent-connector-tools-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      - description: The unique identifier of the tool
        in: path
        name: tool_id
        required: true
        schema:
          type: string
      responses:
        '204':
          description: Tool successfully deleted
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete a connector tool
      tags:
      - Knowledge - Connector Tools
    get:
      description: Retrieve a specific tool by its ID.
      operationId: get-agent-connector-tools-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      - description: The unique identifier of the tool
        in: path
        name: tool_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolResponse'
          description: The requested tool
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get a connector tool
      tags:
      - Knowledge - Connector Tools
    put:
      description: Update a specific tool by its ID.
      operationId: put-agent-connector-tools-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      - description: The unique identifier of the tool
        in: path
        name: tool_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRequest'
              summary: requestBody
              description: Updated tool
        description: Updated tool
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolResponse'
          description: The updated tool
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Update a connector tool
      tags:
      - Knowledge - Connector Tools
  /agent_connectors/{connector_id}/tools/{tool_id}/run:
    post:
      description: Execute a tool action. Returns the raw response from the upstream
        API endpoint.
      operationId: post-agent-connector-tools-run-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the parent connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      - description: The unique identifier of the tool
        in: path
        name: tool_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRunRequest'
              summary: requestBody
              description: Tool execution input
        description: Tool execution input
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.BizAIOmniChannelConnectorToolRunResponse'
          description: The tool execution result
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connector_tools.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Run a connector tool
      tags:
      - Knowledge - Connector Tools
  /agent_connectors/{connector_id}/upsertApiKey:
    post:
      description: Set or rotate the API key credentials for this connector. If credentials
        already exist, they are replaced and the connection is re-established. The
        credential payload is required; this endpoint will not delete credentials.
      operationId: post-agent-connectors-upsert-apikey
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUpsertApiKeyRequest'
              summary: requestBody
              description: API key credentials to upsert
        description: API key credentials to upsert
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The updated connector with API key metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Upsert API key credentials for a connector
      tags:
      - Knowledge - Connectors
  /agent_connectors/{connector_id}/upsertCertificate:
    post:
      description: Upload or rotate the mTLS client certificate for this connector.
        If a certificate already exists, it is replaced and the connection is re-established.
      operationId: post-agent-connectors-upsert-certificate
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorCertificateRequest'
              summary: requestBody
              description: mTLS certificate to upsert
        description: mTLS certificate to upsert
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The updated connector with mTLS certificate metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Upsert mTLS certificate for a connector
      tags:
      - Knowledge - Connectors
  /agent_connectors/{connector_id}/upsertOAuth:
    post:
      description: Set or rotate the OAuth 2.0 client credentials for this connector.
        If credentials already exist, they are replaced and the connection is re-established.
        The credential payload is required; this endpoint will not delete credentials.
      operationId: post-agent-connectors-upsert-oauth
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The unique identifier of the connector
        in: path
        name: connector_id
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorUpsertOAuthRequest'
              summary: requestBody
              description: OAuth 2.0 credentials to upsert
        description: OAuth 2.0 credentials to upsert
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.BizAIOmniChannelConnectorResponse'
          description: The updated connector with OAuth credential metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/knowledge_connectors.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Upsert OAuth 2.0 credentials for a connector
      tags:
      - Knowledge - Connectors
  /agent_eligibility:
    get:
      description: Check whether the business AI agent is eligible for the specified
        entity.
      operationId: get-agent-eligibility
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.BizAIOmniChannelEligibilityResponse'
          description: Eligibility result for the entity
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get agent eligibility
      tags:
      - Onboarding
  /agent_event:
    post:
      description: Trigger an agent action asynchronously. The event is enqueued for
        processing and the endpoint returns immediately with status "accepted".
      operationId: post-agent-event
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/operate.BizAIOmniChannelAgentEventRequest'
              summary: requestBody
              description: Agent event to send
        description: Agent event to send
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.BizAIOmniChannelAgentEventResponse'
          description: Acknowledgment that the event was accepted for processing
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Send an agent event
      tags:
      - Operate
  /agent_event/{agent_event_id}:
    get:
      description: Retrieve the current processing status of a previously submitted
        agent event, identified by its ID.
      operationId: get-agent-event-by-id
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The ID of the agent event, as returned by POST /agent_event
        in: path
        name: agent_event_id
        required: true
        schema:
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.BizAIOmniChannelAgentEventStatusResponse'
          description: The current status of the agent event
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Not found
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Get an agent event status
      tags:
      - Operate
  /agent_onboarding:
    post:
      description: Trigger AI agent onboarding for the specified entity and channel.
        Creates the necessary entities and schedules async jobs for data preparation.
      operationId: post-agent-onboarding
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      - description: The channel to onboard the AI agent for
        in: query
        name: channel
        required: true
        schema:
          enum:
          - email
          - instagram
          - line
          - messenger
          - sms
          - tiktok
          - unknown
          - webchat
          - whatsapp
          type: string
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.BizAIOmniChannelOnboardingResponse'
          description: Onboarding triggered successfully
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Create an onboarding session
      tags:
      - Onboarding
  /agent_test:
    post:
      description: Send a test message to the AI agent and receive a response. Messages
        are processed through the full agent pipeline without requiring a consumer
        phone number.
      operationId: post-agent-test
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/operate.BizAIOmniChannelAgentTestRequest'
              summary: requestBody
              description: Test message to send
        description: Test message to send
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.BizAIOmniChannelAgentTestResponse'
          description: Response containing the AI agent response and test conversation
            metadata
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Run an agent test
      tags:
      - Operate
  /agent_thread_control:
    post:
      description: Release thread control for a consumer conversation, handing it
        back to Meta Business Agent as the automatic responder.
      operationId: post-agent-thread-control
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 1.0.0
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/operate.ThreadControlRequest'
              summary: requestBody
              description: Thread control action to perform
        description: Thread control action to perform
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.ThreadControlResponse'
          description: Thread control action result with messaging product identifier
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/operate.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Release thread control
      tags:
      - Operate
  /delete_agent:
    delete:
      description: Remove the Meta Business agent from the WhatsApp phone number.
        Deletes the agent configuration and, when the last agent on the account is
        removed, disconnects the integration.
      operationId: delete-agent
      parameters:
      - description: Meta Business Agent API version
        in: header
        name: X-API-Version
        schema:
          enum:
          - 2.0.0
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.BizAIOmniChannelDeleteAgentResponse'
          description: The agent was removed, or there was nothing to remove
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Bad request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Forbidden
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Too many requests
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/onboard.StandardError'
          description: Server error
      security:
      - D360-API-KEY: []
      summary: Delete the agent
      tags:
      - Onboarding
openapi: 3.1.0
servers:
- description: Production server
  url: https://waba-v2.360dialog.io
tags:
- name: Onboarding
  description: Endpoints for onboarding a Business Agent and managing its allowlist
    and settings
- name: Knowledge - Business Info
  description: Endpoints for managing the agent's business information
- name: Knowledge - FAQ
  description: Endpoints for managing the agent's FAQ entries
- name: Knowledge - Files
  description: Endpoints for managing the agent's knowledge base files
- name: Knowledge - Websites
  description: Endpoints for managing the agent's crawled knowledge websites
- name: Knowledge - Skills
  description: Endpoints for managing the agent's AI skills
- name: Knowledge - Connectors
  description: Endpoints for managing the agent's external API connectors
- name: Knowledge - Connector Tools
  description: Endpoints for managing tools on an agent connector
- name: Operate
  description: Endpoints for evaluating and operating the agent (eval jobs, events,
    and tests)
