OmniDim Logo

    Integrations

    The Integrations module allows you to create and manage integrations with external services that your agents can use during conversations. This enables your agents to access external data and perform actions in third-party systems.

    Overview

    Integrations allow your agents to connect with external services and APIs. The platform currently supports two types of integrations:

    • Custom API Integrations: Connect to any REST API endpoint with customizable headers, query parameters, and body content
    • Cal.com Integrations: Connect to Cal.com calendaring service for scheduling capabilities

    Get User Integrations

    Get all integrations available for the authenticated user.

    Example

    1 2 3 # Get all integrations for the authenticated user response = client.integrations.get_user_integrations() print(response)

    Create Custom API Integration

    Create a new custom API integration that can connect to external REST APIs.

    Parameters

    name
    string
    Required

    Name for the integration

    url
    string
    Required

    URL for the API endpoint

    method
    string
    Required

    HTTP method (GET, POST, PUT, DELETE, PATCH)

    description
    string
    Optional

    Description of the integration

    headers
    list
    Optional

    Headers for the API request in the format: [{"key": "header_name", "value": "header_value"}]

    body_type
    string
    Optional

    Body type (none, json, form)

    body_content
    string
    Optional

    Body content for the request

    body_params
    list
    Optional

    Body parameters for the request

    query_params
    list
    Optional

    Query parameters for the request

    Example

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 # Create a custom API integration response = client.integrations.create_custom_api_integration( name="My API Integration", description="Integration with external service", url="http://api.example.com/endpoint", method="GET", headers=[ {"key": "Authorization", "value": "Bearer token123"}, {"key": "Content-Type", "value": "application/json"} ], query_params=[ { "key": "user_id", "description": "User identifier", "type": "string", "required": True, "isLLMGenerated": False } ] ) print(response)

    Create Cal Integration

    Create a new Cal.com integration for calendar scheduling capabilities.

    Parameters

    name
    string
    Required

    Name for the integration

    cal_api_key
    string
    Required

    Cal.com API key

    cal_id
    string
    Required

    Cal.com ID

    cal_timezone
    string
    Required

    Cal.com timezone

    description
    string
    Optional

    Description of the integration

    Example

    1 2 3 4 5 6 7 8 9 # Create a Cal.com integration response = client.integrations.create_cal_integration( name="My Calendar Integration", description="Integration with Cal.com calendar", cal_api_key="cal_api_key_12345", cal_id="cal_user_id", cal_timezone="America/New_York" ) print(response)

    Create Integration From JSON

    Create an integration directly from a complete JSON object.

    Parameters

    integration_data
    dict
    Required

    Complete integration data in the expected format

    Example

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 # Create an integration from a JSON configuration integration_data = { "name": "My API Integration", "description": "Integration with external service", "url": "http://api.example.com/endpoint", "method": "GET", "headers": [ {"key": "Authorization", "value": "Bearer token123"} ], "integration_type": "custom_api", "query_params": [ { "key": "user_id", "description": "User identifier", "type": "string", "required": True, "isLLMGenerated": False } ] } response = client.integrations.create_integration_from_json(integration_data) print(response)

    Get Agent Integrations

    Get all integrations for a specific agent.

    Parameters

    agent_id
    int
    Required

    ID of the agent to get integrations for

    Example

    1 2 3 4 # Get all integrations for a specific agent agent_id = 123 # Replace with your agent ID response = client.integrations.get_agent_integrations(agent_id) print(response)

    Add Integration To Agent

    Add an existing integration to an agent.

    Parameters

    agent_id
    int
    Required

    ID of the agent

    integration_id
    int
    Required

    ID of the integration to add

    Example

    1 2 3 4 5 # Add an integration to an agent agent_id = 123 # Replace with your agent ID integration_id = 456 # Replace with your integration ID response = client.integrations.add_integration_to_agent(agent_id, integration_id) print(response)

    Remove Integration From Agent

    Remove an integration from an agent.

    Parameters

    agent_id
    int
    Required

    ID of the agent

    integration_id
    int
    Required

    ID of the integration to remove

    Example

    1 2 3 4 5 # Remove an integration from an agent agent_id = 123 # Replace with your agent ID integration_id = 456 # Replace with your integration ID response = client.integrations.remove_integration_from_agent(agent_id, integration_id) print(response)