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

# Create/Update Platform Integration

> Create or update a platform integration for a chatbot agent (e.g., Instagram, Facebook)



## OpenAPI

````yaml POST /agent/integration/{agent_id}
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /agent/integration/{agent_id}:
    post:
      summary: Create/Update Platform Integration
      description: >-
        Create or update a platform integration for a chatbot agent (e.g.,
        Instagram, Facebook)
      parameters:
        - name: agent_id
          in: path
          description: The ID of the agent
          required: true
          schema:
            type: string
      requestBody:
        description: Platform integration details
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IntegrationCreate'
      responses:
        '200':
          description: Integration created/updated successfully
        '400':
          description: Bad Request - Missing required fields or GHL integration not found
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 2)
        '404':
          description: Agent not found
      security:
        - CompanyApiKey: []
components:
  schemas:
    IntegrationCreate:
      type: object
      required:
        - platform
        - trigger
        - min_delay
        - max_delay
      properties:
        id:
          type: string
          description: Integration ID (for updating existing integration)
        platform:
          type: string
          description: Platform name (e.g., instagram, facebook)
        trigger:
          type: string
          description: Trigger event
        min_delay:
          type: number
          description: Minimum delay in seconds
        max_delay:
          type: number
          description: Maximum delay in seconds
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````