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

# Add Meta agent connector

> Connect an HTTP API or a remote MCP server the agent can call through its tools. Credentials go straight to Meta and are not stored here.



## OpenAPI

````yaml https://api.useinvent.com/openapi.json post /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/connectors
openapi: 3.1.0
info:
  version: 1.0.0
  title: Invent API
servers:
  - url: https://api.useinvent.com
security:
  - bearerAuth: []
tags:
  - name: Inbox
  - name: Chats
  - name: Messages
  - name: Contacts
  - name: Custom channels
  - name: Segments
  - name: Suppressions
  - name: Assistants
  - name: Agents
  - name: Skills
  - name: Knowledge
  - name: AI
  - name: Broadcasts
  - name: Email sending
  - name: WhatsApp
  - name: WhatsApp Meta agent
  - name: Tables
  - name: Records
  - name: Views
  - name: Pages
  - name: Connections
  - name: Workspace
  - name: Sub-organizations
  - name: Analytics and logs
  - name: Workflows
paths:
  /orgs/{org_id}/connections/{connection_id}/whatsapp/phone-numbers/{phone_number_id}/meta-agent/connectors:
    post:
      tags:
        - WhatsApp Meta agent
      summary: Add Meta agent connector
      description: >-
        Connect an HTTP API or a remote MCP server the agent can call through
        its tools. Credentials go straight to Meta and are not stored here.
      parameters:
        - schema:
            type: string
          required: true
          description: The ID of the org
          name: org_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the connection
          name: connection_id
          in: path
        - schema:
            type: string
          required: true
          description: The ID of the WhatsApp phone number the Meta agent runs on
          name: phone_number_id
          in: path
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SaveWhatsAppMetaAgentConnectorSchema'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/SaveWhatsAppMetaAgentConnectorSchema'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppMetaAgentConnectorSchema'
components:
  schemas:
    SaveWhatsAppMetaAgentConnectorSchema:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 256
          description: Unique per phone number.
        description:
          type: string
          minLength: 1
          maxLength: 1024
          description: What the system does. The agent reads it.
        base_url:
          type: string
          format: uri
          description: A public HTTPS address; private and localhost addresses are refused.
        connector_protocol:
          $ref: '#/components/schemas/WhatsAppMetaAgentConnectorProtocolSchema'
        auth_type:
          $ref: '#/components/schemas/WhatsAppMetaAgentConnectorAuthTypeSchema'
        auth_config:
          type: object
          properties:
            oauth2_client_credentials:
              $ref: '#/components/schemas/WhatsAppMetaAgentOAuthConfigSchema'
            api_key:
              $ref: '#/components/schemas/WhatsAppMetaAgentApiKeyConfigSchema'
        user_auth_injection_config:
          $ref: '#/components/schemas/WhatsAppMetaAgentUserAuthInjectionSchema'
        requires_certificate:
          type: boolean
      required:
        - name
        - description
        - base_url
        - auth_type
    WhatsAppMetaAgentConnectorSchema:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        description:
          type: string
        base_url:
          type: string
        connector_protocol:
          $ref: '#/components/schemas/WhatsAppMetaAgentConnectorProtocolSchema'
        auth_type:
          type: string
        auth_config:
          type: object
          additionalProperties: {}
        user_auth_injection_config:
          $ref: '#/components/schemas/WhatsAppMetaAgentUserAuthInjectionSchema'
        mcp_tool_sync:
          type: object
          properties:
            status:
              type: string
              enum:
                - ERROR
                - PENDING
                - READY
            last_attempted_at:
              type: string
            last_successful_at:
              type: string
            fingerprint:
              type: string
            tool_count:
              type: number
          required:
            - status
        mtls_config:
          type: object
          properties:
            has_certificate:
              type: boolean
            fingerprint:
              type: string
            expires_at:
              type: string
            subject:
              type: string
            client_certificate:
              type: string
            ca_certificate:
              type: string
        connection_status:
          type: object
          properties:
            status:
              type: string
              enum:
                - PENDING_OAUTH
                - ACTIVE
                - EXPIRED
                - ERROR
            error_message:
              type: string
          required:
            - status
      required:
        - id
        - name
        - base_url
        - auth_type
    WhatsAppMetaAgentConnectorProtocolSchema:
      type: string
      enum:
        - HTTP
        - MCP
      description: An HTTP API, or a remote MCP server. Fixed once created.
    WhatsAppMetaAgentConnectorAuthTypeSchema:
      type: string
      enum:
        - OAUTH2_CLIENT_CREDENTIALS
        - API_KEY
        - NONE
    WhatsAppMetaAgentOAuthConfigSchema:
      type: object
      properties:
        token_url:
          type: string
          format: uri
        scopes_to_request:
          type: array
          items:
            type: string
            maxLength: 256
          maxItems: 50
        token_request_content_type:
          type: string
          enum:
            - form
            - json
        client_id:
          type: string
          minLength: 1
          maxLength: 512
        client_secret:
          type: string
          minLength: 1
          maxLength: 4096
      required:
        - token_url
        - scopes_to_request
        - client_id
        - client_secret
    WhatsAppMetaAgentApiKeyConfigSchema:
      type: object
      properties:
        headers:
          type: array
          items:
            $ref: '#/components/schemas/WhatsAppMetaAgentApiKeyFieldSchema'
          maxItems: 20
        query_params:
          type: array
          items:
            $ref: '#/components/schemas/WhatsAppMetaAgentApiKeyFieldSchema'
          maxItems: 20
        body_params:
          type: array
          items:
            $ref: '#/components/schemas/WhatsAppMetaAgentApiKeyFieldSchema'
          maxItems: 20
    WhatsAppMetaAgentUserAuthInjectionSchema:
      type: object
      properties:
        location:
          type: string
          enum:
            - body
            - headers
            - path
            - query
        field_name:
          type: string
          minLength: 1
          maxLength: 256
        prefix:
          type: string
          maxLength: 64
      required:
        - location
        - field_name
      description: >-
        Where the customer's own sign-in token goes on each call, for tools that
        act as the customer.
    WhatsAppMetaAgentApiKeyFieldSchema:
      type: object
      properties:
        field_name:
          type: string
          minLength: 1
          maxLength: 256
        value:
          type: string
          minLength: 1
          maxLength: 4096
        prefix:
          type: string
          maxLength: 64
      required:
        - field_name
        - value
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication using your API key

````