Integrations API
The Integrations API allows you to connect your AI agents with external services and platforms. Integrations enable agents to access third-party data, perform actions, and communicate through various channels.
Base URL
https://api.aloochat.ai/api/publicAuthentication
All requests require an API key in the x-api-key header:
x-api-key: your_api_key_hereEndpoints Overview
| Method | Endpoint | Description |
|---|---|---|
GET | /integrations | List all integrations |
POST | /integrations | Create a new integration |
GET | /integrations/{id} | Get integration by ID |
PUT | /integrations/{id} | Update an integration |
DELETE | /integrations/{id} | Delete an integration |
GET | /integrations/types | Get available integration types |
Integration Properties
| Property | Type | Description |
|---|---|---|
id | string | Unique integration identifier (UUID) |
name | string | Integration name |
type | string | Integration type (e.g., “shopify”, “zendesk”) |
config | object | Integration configuration |
is_active | boolean | Whether the integration is active |
visibility | string | Visibility: “private” or “public” |
company_id | string | Associated company ID |
agent_id | string | Linked agent ID (optional) |
Supported Integration Types
| Type | Description |
|---|---|
shopify | Shopify e-commerce platform |
zendesk | Zendesk customer support |
hubspot | HubSpot CRM |
slack | Slack messaging |
whatsapp | WhatsApp Business |
notion | Notion workspace |
odoo | Odoo ERP |
google_calendar | Google Calendar |
gmail | Gmail email |
custom_api | Custom REST API |
List Integrations
Retrieve all integrations for your company.
Endpoint: GET /integrations
curl -X GET "https://api.aloochat.ai/api/public/integrations" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json"Response
[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "My Shopify Store",
"type": "shopify",
"config": {
"shop_domain": "mystore.myshopify.com",
"api_version": "2024-01"
},
"is_active": true,
"visibility": "private",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_id": "456e7890-e89b-12d3-a456-426614174001"
},
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"name": "Support Zendesk",
"type": "zendesk",
"config": {
"subdomain": "mycompany",
"email": "support@mycompany.com"
},
"is_active": true,
"visibility": "private",
"company_id": "123e4567-e89b-12d3-a456-426614174000",
"agent_id": null
}
]Create Integration
Create a new integration for your company.
Endpoint: POST /integrations
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Integration name |
type | string | Yes | Integration type |
config | object | No | Configuration object |
is_active | boolean | No | Active status (default: true) |
visibility | string | No | Visibility (default: “private”) |
agent_id | string | No | Link to specific agent |
Shopify Integration Example
curl -X POST "https://api.aloochat.ai/api/public/integrations" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "My Shopify Store",
"type": "shopify",
"config": {
"shop_domain": "mystore.myshopify.com",
"access_token": "shpat_xxxxxxxxxxxxx",
"api_version": "2024-01"
},
"is_active": true,
"visibility": "private"
}'Zendesk Integration Example
curl -X POST "https://api.aloochat.ai/api/public/integrations" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Zendesk",
"type": "zendesk",
"config": {
"subdomain": "mycompany",
"email": "support@mycompany.com",
"api_token": "your_zendesk_api_token"
},
"is_active": true
}'Google Calendar Integration Example
curl -X POST "https://api.aloochat.ai/api/public/integrations" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Company Calendar",
"type": "google_calendar",
"config": {
"calendar_id": "meetings@mycompany.com",
"timezone": "Asia/Kuwait"
},
"is_active": true
}'Get Integration
Retrieve a specific integration by ID.
Endpoint: GET /integrations/{id}
curl -X GET "https://api.aloochat.ai/api/public/integrations/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: your_api_key_here"Update Integration
Update an existing integration.
Endpoint: PUT /integrations/{id}
curl -X PUT "https://api.aloochat.ai/api/public/integrations/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Integration Name",
"is_active": false,
"config": {
"shop_domain": "newstore.myshopify.com"
}
}'Delete Integration
Delete an integration.
Endpoint: DELETE /integrations/{id}
curl -X DELETE "https://api.aloochat.ai/api/public/integrations/550e8400-e29b-41d4-a716-446655440000" \
-H "x-api-key: your_api_key_here"Get Integration Types
Retrieve all available integration types.
Endpoint: GET /integrations/types
curl -X GET "https://api.aloochat.ai/api/public/integrations/types" \
-H "x-api-key: your_api_key_here"Response
[
{
"type": "shopify",
"name": "Shopify",
"description": "E-commerce platform integration for product catalog, orders, and inventory"
},
{
"type": "zendesk",
"name": "Zendesk",
"description": "Customer support platform for ticket management and help desk"
},
{
"type": "hubspot",
"name": "HubSpot",
"description": "CRM platform for contacts, deals, and marketing automation"
},
{
"type": "google_calendar",
"name": "Google Calendar",
"description": "Calendar integration for scheduling meetings and events"
},
{
"type": "gmail",
"name": "Gmail",
"description": "Email integration for sending and receiving emails"
},
{
"type": "slack",
"name": "Slack",
"description": "Team messaging platform integration"
},
{
"type": "notion",
"name": "Notion",
"description": "Workspace integration for documents and databases"
},
{
"type": "custom_api",
"name": "Custom API",
"description": "Connect to any REST API with custom configuration"
}
]Integration Configuration Examples
Shopify Configuration
{
"shop_domain": "mystore.myshopify.com",
"access_token": "shpat_xxxxxxxxxxxxx",
"api_version": "2024-01"
}Zendesk Configuration
{
"subdomain": "mycompany",
"email": "support@mycompany.com",
"api_token": "your_zendesk_api_token"
}HubSpot Configuration
{
"access_token": "your_hubspot_access_token",
"portal_id": "12345678"
}Google Calendar Configuration
{
"calendar_id": "meetings@mycompany.com",
"timezone": "Asia/Kuwait",
"credentials": {}
}Custom API Configuration
{
"base_url": "https://api.example.com",
"auth_type": "bearer",
"auth_token": "your_api_token",
"headers": {
"X-Custom-Header": "value"
}
}Error Responses
| Status Code | Description |
|---|---|
400 | Bad Request - Invalid input data |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Integration not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error |
Error Response Format
{
"detail": "Integration not found"
}