Integrations API
List All Integrations
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
The ID of the integration
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
integration[technical_id]
Technical identifier
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
The ID of the integration
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
The ID of the integration
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
The ID of the integration
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