post
https://api.acefone.in/v1/interactions-hub/click-to-interaction
This API helps to initiates a customer interaction (e.g., call, WhatsApp, SMS) using the provided phone number.
Sample Request
This API allows you to create a new schedule call.
curl --location 'https://api.acefone.in/v1/interactions-hub/click-to-interaction' \
--header 'x-trace-id: 1311d909-1853-4ac2-b483-572849d70ee7' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <ACCESS_TOKEN>' \
--data '{
"contact_number": "911XXXXX93"
}'📘Important
Before we begin, note that the * sign denotes the mandatory variables in each table.
Mandatory Headers
| Variable Name | Description | Example |
|---|---|---|
| Authorization | Bearer token from Acefone Console) | Bearer <ACCESS_TOKEN> |
| x-trace-id | Unique identifier for each request (e.g., UUID) | 131xxxx9-1853-xxxc2-xx483-572xxxd70ee7 |
| Content-Type | Request content type | application/json |
Request Variables (Body Params)
| Variable Name | Description | Data Type |
|---|---|---|
| contact_number | Customer number in E.164 format (e.g., +1234xxxx95) | String |
Example Request (JavaScript / fetch):
fetch("https://your-api-domain.com/api/v1/click-to-interaction", {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <your_access_token>",
},
body: JSON.stringify({
contact_number: "+9198765xxxx10",
}),
})
.then((res) => res.json())
.then((data) => console.log(data))
.catch((err) => console.error(err));Success Response
HTTP Status: 201
{
"success": true,
"status": 201,
"data": {
"url": "https://example.com/conversations/6XXX33cXXX1b642ca3f74c66"
},
"trace_id": "1753431XXXX06"
}Validation Error Example
HTTP Status: 422
{
"success": false,
"status": 422,
"errors": {
"code": "IH-VA-110001",
"message": "The request contains invalid data. Please review your input and try again.",
"details": {
"contact_number": "Contact number must be a valid E.164 format (e.g., +1234567890)"
}
},
"trace_id": "175343XXX6170"
}Internal Server Error Example
HTTP Status: 500
{
"success": false,
"status": 500,
"errors": {
"success": false,
"message": "Unable to process this request. Please try again later"
},
"trace_id": "17534XXX76170"
}- This error can occur if Interactions Hub v3 or New Channel Hub is not enabled for the account.
- Ensure the account has the necessary feature toggles enabled.
📘Important
Feature Toggles
- Ensure that Interactions Hub v3 and the New Channel Hub are enabled for the account.
- If a user does not have Interactions Hub enabled, the API will return:
HTTP 500 – Unable to process the request.
Mandatory Headers
x-trace-id: A unique identifier for each request (e.g., a UUID).Authorization: Bearer token obtained from the Acefone Console.- Token generation reference: Generate a Token
CORS Considerations
- If the API is called directly from the frontend, CORS restrictions may occur.
- Recommended approaches:
- Implement a backend wrapper/API on your side to call Acefone’s API.
- Share your domain with Acefone to enable CORS for that specific domain.
