Click to Call API

This API is designed o integrate the "Click to Call" feature into their applications, where users can make an outgoing call without visiting Alohaa portal.

Endpoint Description

POST https://outgoing-call.alohaa.ai/v1/external/click-2-call

Parameters

Request Headers

FieldValueDescriptionMandatory

Content-type

application/json

Specifies the content type of the request

Yes

x-metro-api-key

*************************

Your API key for authentication purposes.

Yes

Request Body

FieldData TypeDescriptionMandatory

caller_number

String

Phone number of the caller registered as an agent.

Yes

receiver_number

String

Phone number of the call recipient.

Yes

did_number

String

Direct inward dialing number to use, prefixed with country code "91".

Yes

Good to know:

  • Before placing a call, caller_number should be onboarded as an agent in the aloha dashboard, which is a one-time process.

  • The prefix "91" is mandatory for did_number and should not be included for caller_number and receiver_number.

Sample Request

{
    x-metro-api-key: ****************,
}

Responses

Success Response

{
  "success": true,
  "response": {
    "reference_id": "642532c24fdbab96d0abe061"
  }
}

Failure Response

{
  "success": false,
  "error": {
    "code": 1043,
    "reason": "Outgoing calls are not allowed for this organisation"
  }
}

Error Codes

Code

1041

CRM is not integrated

1042

Organisation is not linked with CRM

1043

Outgoing calls are not allowed for this organisation

Last updated