Skip to main content

Integrations API

List All Integrations

tenant_id
string
required
The ID of the tenant
curl -X GET \
  'https://a.messageflow.ai/api/v1/integrations?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN'
[
  {
    "id": 1,
    "name": "Example Integration",
    "system": "openai",
    "technical_id": "gpt-4",
    "mode": "activated"
  }
]

Get Integration Details

id
string
required
The ID of the integration
tenant_id
string
required
The ID of the tenant
curl -X GET \
  'https://a.messageflow.ai/api/v1/integrations/1?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN'
{
  "id": 1,
  "name": "Example Integration",
  "system": "openai",
  "technical_id": "gpt-4",
  "mode": "activated",
  "url": "https://api.openai.com/v1",
  "tec_params": {
    "api_key": "your-api-key",
    "model": "gpt-4"
  },
  "tenant_id": 123
}

Create New Integration

tenant_id
string
required
The ID of the tenant
integration[name]
string
required
Name of the integration
integration[system]
string
required
System type
integration[technical_id]
string
required
Technical identifier
integration[mode]
string
Integration mode
integration[url]
string
Integration URL
integration[tec_params]
object
Technical parameters
curl -X POST \
  'https://a.messageflow.ai/api/v1/integrations?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "integration": {
      "name": "New Integration",
      "system": "openai",
      "technical_id": "gpt-4",
      "mode": "activated",
      "url": "https://api.openai.com/v1",
      "tec_params": {
        "api_key": "your-api-key",
        "model": "gpt-4"
      }
    }
  }'
{
  "id": 2,
  "name": "New Integration",
  "system": "openai",
  "technical_id": "gpt-4",
  "mode": "activated",
  "url": "https://api.openai.com/v1",
  "tec_params": {
    "api_key": "your-api-key",
    "model": "gpt-4"
  },
  "tenant_id": 123
}

Update Integration

id
string
required
The ID of the integration
tenant_id
string
required
The ID of the tenant
curl -X PUT \
  'https://a.messageflow.ai/api/v1/integrations/1?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "integration": {
      "name": "Updated Integration",
      "system": "openai",
      "technical_id": "gpt-4",
      "mode": "activated",
      "url": "https://api.openai.com/v1",
      "tec_params": {
        "api_key": "updated-api-key",
        "model": "gpt-4"
      }
    }
  }'
{
  "id": 1,
  "name": "Updated Integration",
  "system": "openai",
  "technical_id": "gpt-4",
  "mode": "activated",
  "url": "https://api.openai.com/v1",
  "tec_params": {
    "api_key": "updated-api-key",
    "model": "gpt-4"
  },
  "tenant_id": 123
}

Delete Integration

id
string
required
The ID of the integration
tenant_id
string
required
The ID of the tenant
curl -X DELETE \
  'https://a.messageflow.ai/api/v1/integrations/1?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN'
{
  "status": "Integration 1 deleted"
}

Execute Integration Action

id
string
required
The ID of the integration
tenant_id
string
required
The ID of the tenant
action
string
required
The action to execute
params
object
Parameters for the action
curl -X POST \
  'https://a.messageflow.ai/api/v1/integrations/1/execute_action?tenant_id=123' \
  -H 'Authorization: Bearer YOUR_AUTH_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "action": "generate_text",
    "params": {
      "prompt": "Hello, how are you?",
      "max_tokens": 100
    }
  }'
{
  "result": "I am doing well, thank you for asking! How can I help you today?",
  "status": "success"
}

HTTP Status Codes

  • 200: Success
  • 201: Created
  • 400: Bad Request
  • 401: Unauthorized
  • 404: Not Found
  • 422: Unprocessable Entity

Integration Configuration

The integration configuration includes:
  • Name and system type
  • Technical identifier
  • Integration mode
  • Integration URL
  • Technical parameters
  • API keys and credentials

Integration Types

  • LLM Integrations (e.g., OpenAI, Anthropic)
  • Communication Endpoints
  • Datasources
  • Speech-to-Text Services