Click to Interaction

This API helps to initiates a customer interaction (e.g., call, WhatsApp, SMS) using the provided phone number.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

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",
"agent_id": "05xxxx"
}'

📘Important

Before we begin, note that the * sign denotes the mandatory variables in each table.

Mandatory Headers

Variable NameDescriptionExample
AuthorizationBearer token from Acefone Console)Bearer <ACCESS_TOKEN>
x-trace-idUnique identifier for each request (e.g., UUID)131xxxx9-1853-xxxc2-xx483-572xxxd70ee7
Content-TypeRequest content typeapplication/json

Request Variables (Body Params)

Variable NameDescriptionData Type
contact_numberCustomer number in E.164 format (e.g., +1234xxxx95)String
agent_idID of the Acefone agent who will chat on the interactions.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",
agent_id: "050xxxx"
  }),
})
  .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"
}

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": {
            "agent_id": "Agent id is required"
        }
    },
    "trace_id": "8afb0fc5-e598-4779-8273-bbd27ef306ae"
}

Internal Server Error Example

  1. 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.

  1. HTTP Status: 403
{
    "success": false,
    "status": 403,
    "errors": {
        "code": "IH-AP-040002",
        "message": "Your role does not allow you to perform this operation. Please contact your administrator for access."
    },
    "trace_id": "d9595283-2617-44f6-8411-3d2491b3e73f"
}
  • This is happening because the token you’re using belongs to an agent/team_member role—please replace it with an API Connect token.

📘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:
    1. Implement a backend wrapper/API on your side to call Acefone’s API.
    2. Share your domain with Acefone to enable CORS for that specific domain.
Body Params
string
required

Customer number in E.164 format

string
required

ID of the Acefone agent who will chat on the interactions

Headers
string
required

Bearer token obtained from the Acefone Console

string

A unique identifier for each request

Response
200
Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!