3CX Integration Documentation
Version: 1.0
Description: API for integrating 3CX with the Egards platform to handle case creation when calls are received by
agents.
Summary
The Egards 3CX Integration API provides two endpoints that enable seamless calls creation in the Egards platform. Authentication is handled via an API key.
Base URL
The API is available in different environments for testing and production:
-
Staging Environment:
https://staging.egards.nl -
Production Environment:
https://app.egards.nl
Swagger UI
Interactive API documentation is available at:
Authentication
All API calls require an API key. Include it in the request header as shown below:
- Header Name:
X-Api-Key - Value: (To be shared separately for each env)
API Endpoints
1. Connect API
This API is called when an agent receives a call.
-
Endpoint:
POST /3cx/connect -
Description:
Sends details of the call to the Egards platform when a call is received. -
Sample Request Body (Full):
{
"agentId": "12345",
"phoneNumber": "+1234567890",
"callId": "call-67890",
"email": "agent@example.com",
"extensionNumber": "1001",
"type": "Incoming",
"holdDuration": 12,
"callStartedAt": "2024-11-25T09:35:36.946Z",
"callAnsweredAt": "2024-11-25T09:35:36.946Z",
"details": {
"city": "Haarlem",
"country": "Nederlands"
}
} -
Sample Request Body (Minimal):
{
"phoneNumber": "+1234567890",
"callId": "call-67890",
"email": "agent@example.com",
"extensionNumber": "1001",
"type": "Incoming",
"holdDuration": 12,
"callStartedAt": "2024-11-25T09:35:36.946Z"
} -
Compulsory Fields:
phoneNumber: Phone number where the call is received.callId: Unique identifier for the call.email: Email address of the agent (used as an identifier).extensionNumber: Extension number where the call is received.type: Indicates whether the call isIncomingorOutgoing.holdDuration: Total hold duration of the customer (in seconds).callStartedAt: Timestamp for when the call started (UTC).
-
Optional Fields:
agentId: Unique identifier of the agent.callAnsweredAt: Timestamp for when the call was answered (UTC).details: Additional details such as city and country.
-
Response:
- Status:
202 Accepted - Body: Empty
- Status:
2. Disconnect API
This API is called when the call ends between the agent and the customer.
-
Endpoint:
POST /3cx/disconnect -
Description:
Sends details of the call disconnection to the Egards platform. -
Sample Request Body (Full):
{
"agentId": "12345",
"phoneNumber": "+1234567890",
"callId": "call-67890",
"email": "agent@example.com",
"extensionNumber": "1001",
"type": "Incoming",
"holdDuration": 12,
"callStartedAt": "2024-11-25T09:35:36.946Z",
"callAnsweredAt": "2024-11-25T09:35:36.946Z",
"callEndedAt": "2024-11-25T09:55:36.946Z",
"details": {
"city": "Haarlem",
"country": "Nederlands"
}
} -
Sample Request Body (Minimal):
{
"phoneNumber": "+1234567890",
"callId": "call-67890",
"email": "agent@example.com",
"extensionNumber": "1001",
"type": "Incoming",
"holdDuration": 12,
"callStartedAt": "2024-11-25T09:35:36.946Z",
"callEndedAt": "2024-11-25T09:55:36.946Z"
} -
Compulsory Fields:
phoneNumber: Phone number where the call is received.callId: Unique identifier for the call.email: Email address of the agent (used as an identifier).extensionNumber: Extension number where the call is received.type: Indicates whether the call isIncomingorOutgoing.holdDuration: Total hold duration of the customer (in seconds).callStartedAt: Timestamp for when the call started (UTC).callEndedAt: Timestamp for when the call ended (UTC).
-
Optional Fields:
agentId: Unique identifier of the agent.callAnsweredAt: Timestamp for when the call was answered (UTC).details: Additional details such as city and country.
-
Response:
- Status:
202 Accepted - Body: Empty
- Status: