Back to top

MightyCall API Documentation (version v3)

REST API Overview

API Capabilities

MightyCall API (Application Programming Interface) exposes platform features to be used within 3rd party apps.

Current API version can be used to:

  • Get list of calls in the account;

  • Get information about a particular call;

  • Get list of voicemails in the account;

  • Get information about a particular voicemail;

  • Get list of business phone numbers in the account;

  • Get user status;

  • Change user status;

  • Get user info;

  • Make an outgoing call via REST method.

Tell us how you use the API and which additional methods you need to build integrations with a 3rd party apps. Send us you comments and feedback at support@mightycall.com

How do I get access to the API methods?

API methods are available at the following endpoint: https://api.mightycall.com

To access an API method you need to provide:

  • {api_key} - can be obtained in the MightyCall web app

  • {secret_key} - can be obtained in the MightyCall web app or user extension can be used

  • {auth_token} - authorization token which is generated based on {api_key} and {secret_key}

  • {version} - API version. Lastet version is “v3”

  • {prefix} - environment prefix:

    • to test API methods or verify your integration use “sandbox”
    • to access API with your production account use “api”

{api_key}, {secret_key} and {auth_token} lifetime

  • {api_key} lifetime is not limited, it works until you either delete it or re-generate in the MightyCall web app;

  • {secret_key} lifetime is not limited, it works until you either disable it or re-generate in the MightyCall web app

  • {auth_token} lifetime is 24 hours and then it required re-generation.

All API methods except Ping require both {api_key} and {auth_token} to be provided and give you account-level access. Ping method can be called without {api_key} and {auth_token} to verify that API is up and running.

Integration principles and error handling

API should be accessed via secured SSL connection (HTTPS) using HTTP methods.

Each API method can return one of the following result codes:

  • 200 - operation executed successfully

  • 400 - wrong request or response is empty

  • 403 - no access to the method

  • 500 - operation execution failed

How do I get a “test” API Key?

You can use a shared test {api_key} to test API methods or verify your integration.

"x-api-key": "52fc2799-42f2-4e9d-863e-9b2a697e0ffe"

How do I get a “production” API Key?

To use API with your production account you need to get a production {api_key}. You can get it in the MightyCall web app at https://panel.mightycall.com/mightycall/api

Note, that API access is limited to certain subscription plan. Check https://mightycall.com/pricing/ for more details.

Are there any API usage limitations?

Each {api_key} is granted with 2500 API requests per 24 hours period. When you reach this limit your API access is blocked and you need to wait till the next 24 hours to begin.

What should I do if I have questions?

If case of any questions about the API you can contact us at support@mightycall.com

REST API Methods

Ping

Ping
GET/{prefix}/{version}/auth/ping

This method returns current API status.

Example URI

GET https://api.mightycall.com/prefix/version/auth/ping
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

Response  200
HideShow
Headers
Content-Type: application/json

Auth

Auth
POST/{prefix}/{version}/auth/token

This method returns authorization token which is further used to access other API methods.

You can request authentication token in on of the following ways:

  • pass {api_key} as a client_id and {secret_key} as a client_secret, where {secret_key} is the user extension number (if sign-in by key switched off);

  • pass {api_key} as a client_id and {secret_key} as a client_secret, where {secret_key} is the key obtained in the MightyCall web app (if sign-in by key switched on);

  • pass {refresh_token} as refresh_token to re-generate existing token and reset the 24 hours lifetime timer.

Response example:

{
  "access_token": "TKnTuR83Ea63HZmhO63epxySZ8WC5fyz-_dQyLugHEO5516sQmMmMGMaBKgKs7Rau1Cz-r94NjntxEhkUPOrsMiml5p76DeYkXgSQSfhHsCi1cbg0wmQ5Ve-tHO56x--e-5R-YCiu3HJU76y_IQXOmZKF7_VU9srSNbN8m1gk7V0pU6ByrVUH4yrooDAN33vDY1IHga6fVR7yoLdC-QE_ejA1uYsk8yu5-6VAuRaJHF_3APWrvj18mIp8SdzvDozQcaqoZpLz5xs9AI9pPE2gimY4PeRc7bqLnzoT86lYkwqvsZvE1DePzav24PWUrhLm2YC0bxgRhcBXBstXCf2BivloFsvPH7BQ-4gEN08_bUFR0Vjq-zQysuu8hXDPRmmsqlgshHuodGuJeE-iKs0xxAKPPfFgy1pUxjKX_CG4XTjdcvIkzz_Ot6DJ8OHGhiGcQoeeHPaJohJEJbWc4lBMVur7NmznsiAcI64s-WsGJVkWV85EJWzuH1ghEdhWx98PCSg8hoTzOdI7G8ttR68l-Ow25B8Kyw5xnI1_EdggR3MHH8VyAKXp2WSJxsLUPIZ6Hk34sryKNrXmLgU6YuipO8-tiemdQa5fJSAxrFjTRnM1fTY82Raug11HPNj0oUJng-Uxx",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "fAutwPT6336x5PgI43z7xulpgDo+AbhoWtUg3XS2xyz="
}

Example URI

POST https://api.mightycall.com/prefix/version/auth/token
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

Request  by api_key & secret key/extension number
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
x-api-key: {api_key}
Body
grant_type=client_credentials&
client_id={api_key}&
client_secret={secret_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "dQyLugHEO5516sQmMmMGMaBKgKs7Rau1Cz-r94NjntxEhkUPOrsMiml5p76DeYkXgSQSfhHsCi1cbg0wmQ5Ve-tHO56x--e-5R-YCiu3HJU76y_IQXOmZKF7_VU9srSNbN8m1gk7V0pU6ByrVUH4yrooDAN33vDY1IHga6fVR7yoLdC-QE_ejA1uYsk8yu5-6VAuRaJHF_3APWrvj18mIp8SdzvDozQcaqoZpLz5xs9AI9pPE2gimY4PeRc7bqLnzoT86lYkwqvsZvE1DePzav24PWUrhLm2YC0bxgRhcBXBstXCf2BivloFsvPH7BQ-4gEN08_bUFR0Vjq-zQysuu8hXDPRmmsqlgshHuodGuJeE-iKs0xxAKPPfFgy1pUxjKX_CG4XTjdcvIkzz_Ot6DJ8OHGhiGcQoeeHPaJohJEJbWc4lBMVur7NmznsiAcI64s-WsGJVkWV85EJWzuH1ghEdhWx98PCSg8hoTzOdI7G8ttR68l-Ow25B8Kyw5xnI1_EdggR3MHH8VyAKXp2WSJxsLUPIZ6Hk34sryKNrXmLgU6YuipO8-tiemdQa5fJSAxrFjTRnM1fTY82Raug11HPNj0oUJng-Uww",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "fAutwPT123456x5PgI43z7xulpgDo+AbhoWtUg3XS2jBE="
}
Request  by refresh_token
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
x-api-key: {api_key}
Body
grant_type=refresh_token&
refresh_token={refresh_token}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "access_token": "ev123vo%lk456ves789evev0-dQyLugHEO5516sQmMmMGMaBKgKs7Rau1Cz-r94NjntxEhkUPOrsMiml5p76DeYkXgSQSfhHsCi1cbg0wmQ5Ve-tHO56x--e-5R-YCiu3HJU76y_IQXOmZKF7_VU9srSNbN8m1gk7V0pU6ByrVUH4yrooDAN33vDY1IHga6fVR7yoLdC-QE_ejA1uYsk8yu5-6VAuRaJHF_3APWrvj18mIp8SdzvDozQcaqoZpLz5xs9AI9pPE2gimY4PeRc7bqLnzoT86lYkwqvsZvE1DePzav24PWUrhLm2YC0bxgRhcBXBstXCf2BivloFsvPH7BQ-4gEN08_bUFR0Vjq-zQysuu8hXDPRmmsqlgshHuodGuJeE-iKs0xxAKPPfFgy1pUxjKX_CG4XTjdcvIkzz_Ot6DJ8OHGhiGcQoeeHPaJohJEJbWc4lBMVur7NmznsiAcI64s-WsGJVkWV85EJWzuH1ghEdhWx98PCSg8hoTzOdI7G8ttR68l-Ow25B8Kyw5xnI1_EdggR3MHH8VyAKXp2WSJxsLUPIZ6Hk34sryKNrXmLgU6YuipO8-tiemdQa5fJSAxrFjTRnM1fTY82Raug11HPNj0oUJng-Uww",
  "token_type": "bearer",
  "expires_in": 86399,
  "refresh_token": "fAutwPT123456x5%PgI43z7xulpgDo+AbhoWtUg3XS2jBE="
}

Calls

Calls
GET/{prefix}/{version}/calls/{id}{?pageSize,skip,startUtc,endUtc,callFilter,customFilter}

This method can return:

  • list of calls based on parameters {?pageSize,skip,startUtc,endUtc,callFilter,customFilter}

  • information about a particular call based on it’s ID {id}

Response example:

{
    "id": "7e734dc1-544d-4f04-8ccc-8bd5b197a88c",
    "caller": 
    {
        "name": "u2 u2",
        "extension": "101"
    },
    "called": 
    [
        {
            "isConnected": true,
            "name": "akmightycall4 akmightycall4",
            "extension": "100"
        },
        {
            "isConnected": false,
            "name": "u3 u3",
            "extension": "102",
            "phone": "+75551112235"
        }
    ],
    "businessNumber": "+74950152729",
    "dateTimeUtc": "2018-06-05T13:38:29.522Z",
    "duration": "23066",
    "direction": "Outgoing",
    "callStatus": "Connected",
    "callRecord": 
    {
        "fileName": "records/T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20/7e734dc1-544d-4f04-8ccc-8bd5b197a88c.wav",
           "uri": "http://localhost/Mightycall/Files/callrecord_20180605_1338_u2 u2.wav?recordid=fdaqSwNP4TGQT_1Zq-j8_AY2uKfTk-D3Vn2JFYdw4gogE54biOue4TYCdKL7EZvD8QXPeTwAiElxZqfOQ5Hw1fP1TFfYwR-FgODHtICfFOz7qSMTUPBoMekix2oE3aNUggIiYfsISKwzgtE-bgbpmczJf-cPLqWm4_V8WckFEMUBLIqQqI0g3XqIvVw_1EGmzp5hi7hPs-GqDneQwcGNg2LA7qGbl-eQ07LqeDW_qtEeTrWDDzv-G_FrjboX6U52ivtDdsJJnp7785rSvIp17gfjBMely9UI1B2M2Y8AsgTpgAmY7PhCfg2&id=T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20"
    }
}

caller:

  • name - caller’s name (if exists)

  • extension - internal extension number (if exists)

  • phone - business number (field does not exist if internal call/webphone/sip)

called field contains array of contacts called:

  • name - contact’s name(if exists)

  • phone - business number (field does not exist if internal call/webphone/sip)

  • isConnected - contact answered

  • extension - internal extension number(if exists)

Direction field values:

  • Incoming - incoming call

  • Outgoing - outgoing call

CallStatus field values:

  • Missed - missed call

  • Connected - connected call

  • VoiceMail - voicemail

  • Dropped - dropped call

Example URI

GET https://api.mightycall.com/prefix/version/calls/id?pageSize=&skip=&startUtc=&endUtc=&callFilter=&customFilter=
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

pageSize
number (optional) Default: 10 

number of calls to return

skip
number (optional) Default: 0 

number of calls to skip

startUtc
datetime (optional) Default: UtcNow.AddDays(-1) 

start of the date/time calls interval at yyyy-MM-ddThh:mm:ss format

endUtc
datetime (optional) Default: UtcNow 

end of the date/time calls interval at yyyy-MM-ddThh:mm:ss format

customFilter
string (optional) Default: Empty 

calls search string

callFilter
enum (optional) Default: InOutgoing 

calls filter (multiple values supported)

  • Incoming - incoming call

  • Outgoing - outgoing call

  • InOutgoing - incoming or outgoing call

  • Connected - connected call

  • Missed - missed call

  • Canceled - cancelled call

  • Dropped - dropped call

  • Voicemail - voicemail

  • InternalOnly - internal call

id
guid (optional) 

call ID

Request  /{prefix}/{version}/calls?pageSize=1
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "7e734dc1-544d-4f04-8ccc-8bd5b197a88c",
  "caller": {
    "name": "u2 u2",
    "extension": "101"
  },
  "called": [
    {
      "isConnected": true,
      "name": "akmightycall4 akmightycall4",
      "extension": "100"
    },
    {
      "isConnected": false,
      "name": "u3 u3",
      "extension": "102",
      "phone": "+75551112235"
    }
  ],
  "businessNumber": "+74950152729",
  "dateTimeUtc": "2018-06-05T13:38:29.522Z",
  "duration": "23066",
  "direction": "Outgoing",
  "callStatus": "Connected",
  "callRecord": {
    "fileName": "records/T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20/7e734dc1-544d-4f04-8ccc-8bd5b197a88c.wav",
    "uri": "http://localhost/Mightycall/Files/callrecord_20180605_1338_u2 u2.wav?recordid=fdaqSwNP4TGQT_1Zq-j8_AY2uKfTk-D3Vn2JFYdw4gogE54biOue4TYCdKL7EZvD8QXPeTwAiElxZqfOQ5Hw1fP1TFfYwR-FgODHtICfFOz7qSMTUPBoMekix2oE3aNUggIiYfsISKwzgtE-bgbpmczJf-cPLqWm4_V8WckFEMUBLIqQqI0g3XqIvVw_1EGmzp5hi7hPs-GqDneQwcGNg2LA7qGbl-eQ07LqeDW_qtEeTrWDDzv-G_FrjboX6U52ivtDdsJJnp7785rSvIp17gfjBMely9UI1B2M2Y8AsgTpgAmY7PhCfg2&id=T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20"
  }
}
Request  /{prefix}/{version}/calls/a123b456-78bc-4976-8075-b2941d553b7b
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "id": "7e734dc1-544d-4f04-8ccc-8bd5b197a88c",
  "caller": {
    "name": "u2 u2",
    "extension": "101"
  },
  "called": [
    {
      "isConnected": true,
      "name": "akmightycall4 akmightycall4",
      "extension": "100"
    },
    {
      "isConnected": false,
      "name": "u3 u3",
      "extension": "102",
      "phone": "+75551112235"
    }
  ],
  "businessNumber": "+74950152729",
  "dateTimeUtc": "2018-06-05T13:38:29.522Z",
  "duration": "23066",
  "direction": "Outgoing",
  "callStatus": "Connected",
  "callRecord": {
    "fileName": "records/T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20/7e734dc1-544d-4f04-8ccc-8bd5b197a88c.wav",
    "uri": "http://localhost/Mightycall/Files/callrecord_20180605_1338_u2 u2.wav?recordid=fdaqSwNP4TGQT_1Zq-j8_AY2uKfTk-D3Vn2JFYdw4gogE54biOue4TYCdKL7EZvD8QXPeTwAiElxZqfOQ5Hw1fP1TFfYwR-FgODHtICfFOz7qSMTUPBoMekix2oE3aNUggIiYfsISKwzgtE-bgbpmczJf-cPLqWm4_V8WckFEMUBLIqQqI0g3XqIvVw_1EGmzp5hi7hPs-GqDneQwcGNg2LA7qGbl-eQ07LqeDW_qtEeTrWDDzv-G_FrjboX6U52ivtDdsJJnp7785rSvIp17gfjBMely9UI1B2M2Y8AsgTpgAmY7PhCfg2&id=T1U9YWttaWdodHljYWxfRjk1MjJFM0RFQjJGNDJBM0JDRDk2MjdCNTFBNDM0QTksT1U9WWFuZGV4LE9VPUluZnJhdGVsLERDPXJ1LERDPW1pZ2h0eWNhbGwsREM9ZGV20"
  }
}

Calls

Calls
POST/{prefix}/{version}/calls/makecall

This method allows you to initiate a call on behalf of a user who previously received an authorization token. Initially, the service calls to the user, then the specified number in the to parameter. The call is made by the system on behalf of the business number specified in the from parameter. The call identifier id is returned in response. It can be used to get the result of the call. You can use both local/toll free/cell phone numbers or an extension in the to parameter. Local/toll free/cell phone number must include “+”, for instance +18881231234 or +12061231234.

This method can return:

  • information about a particular call based on it’s ID {id}

Response example:

{
    "data": {
        "id": "7dcc5377-7b27-4e12-9f8e-7972a4ef7c32",
        "caller": {
            "name": "akmightycall4 akmightycall4"
        },
        "called": [
            {
                "isConnected": false,
                "phone": "+74950152729"
            }
        ],
        "businessNumber": "+75551112233",
        "dateTimeUtc": "2018-06-06T12:07:33.1436388Z",
        "duration": null,
        "direction": "Outgoing",
        "callStatus": null,
        "callRecord": null
    },
    "isSuccess": true
}

Example URI

POST https://api.mightycall.com/prefix/version/calls/makecall
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

Request  /{prefix}/{version}/calls/makecall
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Body
{
    from: {business_number},
    to: {external_number}
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "id": "7dcc5377-7b27-4e12-9f8e-7972a4ef7c32",
    "caller": {
      "name": "akmightycall4 akmightycall4"
    },
    "called": [
      {
        "isConnected": false,
        "phone": "+74950152729"
      }
    ],
    "businessNumber": "+75551112233",
    "dateTimeUtc": "2018-06-06T12:07:33.1436388Z",
    "duration": null,
    "direction": "Outgoing",
    "callStatus": null,
    "callRecord": null
  },
  "isSuccess": true
}

PhoneNumbers

PhoneNumbers
GET/{prefix}/{version}/phonenumbers/{phoneNumber}

This method returns list of business phone numbers linked to the account.

Response example:

{
    Number: "+71234567890",
    IsEnabled: true,
    IsPrimary: true,
    IsTollFree: true,
    IsInternational: true,
    SmsMode: "Enabled",
    CallRecordingMode: "Both",
    Description: ""
}

SmsMode field values:

  • NotCapable - texting is not supported

  • Capable - texting is supported

  • Disabled - texting support is disabled

  • Enabled - texting support is enabled

CallRecordingMode field values:

  • Disabled - recording is disabled

  • Incoming - recording is enabled for incoming calls

  • Outgoing - recording is enabled for outgoing calls

  • Both - recording is enabled for incoming and outgoing calls

  • OutgoingBeepDisabled - disabled periodic tone notifications about call recording

  • IncomingCallManagerPromptDisabled - disabled initial call recording promt notification

Example URI

GET https://api.mightycall.com/prefix/version/phonenumbers/phoneNumber
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

phoneNumber
string (optional) 

phone number

Request  /{version}/phonenumbers
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    data: {
        Total: 1,
        PhoneNumbers:
        [
                {
                        Number: "+71234567890",
                        IsEnabled: true,
                        IsPrimary: true,
                        IsTollFree: true,
                        IsInternational: true,
                        SmsMode: "Enabled",
                        CallRecordingMode: "Both",
                        Description: ""
                }
        ]
    }
    isSuccess: true
}
Request  /{prefix}/{version}/phonenumbers/71234567890
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    data: {
        Number: "+71234567890",
        IsEnabled: true,
        IsPrimary: true,
        IsTollFree: true,
        IsInternational: true,
        SmsMode: "Enabled",
        CallRecordingMode: "Both",
        Description: ""
    }
    isSuccess: true
}

Voicemails

Voicemails
GET/{prefix}/{version}/voicemails/{id}{?pageSize,skip,startUtc,endUtc,voicemailFilter,customFilter}

This method can return:

  • list of voicemails based on parameters {?pageSize,skip,startUtc,endUtc,voicemailFilter,customFilter}

  • information about a particular voicemail based on it’s ID {id}

Response example:

{
    Id: "a892b940-33bc-4976-8075-b2941d553b7b",
    From: "+71234567890",
    To: : "+71234567891",
    AssignedTo: "full name",
    DateTimeUtc: "2017-01-14T08:40:51.620Z",
    Duration: "185",
    VoicemailStatus: "UnRead",
    VoicemailRecord: {
        FileName: "voicemail/T1U9U0lQ12UEN1c3RvbWVyLE9VPVNJUFBS23ZXNlbGxlcixPVT1Jb12mZyYXRlbCxEQz1zdWI3545sREM9bWlnaHR5bG967hZCxEQz1zaXBw0/T1U9U0lQUHYgVXNlclY1123456/20170124_083933_073_0009.wav",
        Uri: "https://panel.mightycall.com/Mightycall/Files/voicemail.wav?vmrecordid=RhoFSAWRZx1xqjDN8Vqzy0WWyX7s8c23NcHcJpUQ2JFdYNEeq5ptn7Tv1GJIpubmFKuLbw4YOW6Ac-UE1-v3gPfxh7XJYeUPaIiYsoy4QDLno1XCLhWkkXj3GtWU24P41KVIbX-SWx6-XKeeD1Oz4P5W7nM9vEO5j1LJmJrCLYkVEQ-jCW6yGNqZI6jURdBumHty7NqOm-ydvlxJMC418bAvcC5yxKTTi3vZk0umGEOs60q3kEij-4H6G4kf9-RVP0TUCNQdjNmPALIE6YAJmOz4Qn901&id=T1U8U0lQUEN1c3RvbWVyLE9VPVNJUFBSZXNlbGxlcixPVT1JbmZyYXRlbCxEQz2zdWIsREM9bWlnaHR5bG9hZCxEQz1zaXBw0"
    }
}

VoicemailStatus field values:

  • UnRead - voicemail not read

  • Read - voicemail read

Example URI

GET https://api.mightycall.com/prefix/version/voicemails/id?pageSize=&skip=&startUtc=&endUtc=&voicemailFilter=&customFilter=
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

pageSize
number (optional) Default: 10 

number of voicemails to return

skip
number (optional) Default: 0 

number of voicemails to skip

startUtc
datetime (optional) Default: UtcNow.AddDays(-1) 

start of the date/time voicemails interval at yyyy-MM-ddThh:mm:ss format

endUtc
datetime (optional) Default: UtcNow 

end of date/time voicemails interval at yyyy-MM-ddThh:mm:ss format

voicemailFilter
string (optional) Default: UnRead 

voicemails search string

customFilter
enum (optional) Default: Empty 

voicemails filter (multiple values supported)

  • Read - read voicemails

  • UnRead - not read voicemails

  • ReadAndUnRead - read and not read voicemails

  • CallerName - use CustomFilter to search based on caller name

  • CallerAddress - use CustomFilter to search based on caller phone number

  • CalledName - use CustomFilter to search based on called name

  • CalledAddress - use CustomFilter to search based on called phone number

  • StartTime - start of the date/time voicemails interval

  • StartDate - end of the date/time voicemails interval

  • Duration - voicemail duration

  • TextFields - use CustomFilter to search based on all text fields

id
guid (optional) 

voicemail ID

Request  /{prefix}/{version}/voicemails?pageSize=1
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    data: {
        Total: 15,
        Voicemails:
        [
                {
                        Id: "a123b456-78bc-4976-8075-b2941d553b7b",
                        From: "+71234567890",
                        To: : "+71234567891",
                        AssignedTo: "full name",
                        DateTimeUtc: "2017-01-14T08:40:51.620Z",
                        Duration: "185",
                        VoicemailStatus: "UnRead",
                        VoicemailRecord: {
                            FileName: "voicemail/T1U9U0lQ12UEN1c3RvbWVyLE9VPVNJUFBS23ZXNlbGxlcixPVT1Jb12mZyYXRlbCxEQz1zdWI3545sREM9bWlnaHR5bG967hZCxEQz1zaXBw0/T1U9U0lQUHYgVXNlclY1123456/20170124_083933_073_0009.wav",
                            Uri: "https://panel.mightycall.com/Mightycall/Files/voicemail.wav?vmrecordid=RhoFSAWRZx1xqjDN8Vqzy0WWyX7s8c23NcHcJpUQ2JFdYNEeq5ptn7Tv1GJIpubmFKuLbw4YOW6Ac-UE1-v3gPfxh7XJYeUPaIiYsoy4QDLno1XCLhWkkXj3GtWU24P41KVIbX-SWx6-XKeeD1Oz4P5W7nM9vEO5j1LJmJrCLYkVEQ-jCW6yGNqZI6jURdBumHty7NqOm-ydvlxJMC418bAvcC5yxKTTi3vZk0umGEOs60q3kEij-4H6G4kf9-RVP0TUCNQdjNmPALIE6YAJmOz4Qn901&id=T1U8U0lQUEN1c3RvbWVyLE9VPVNJUFBSZXNlbGxlcixPVT1JbmZyYXRlbCxEQz2zdWIsREM9bWlnaHR5bG9hZCxEQz1zaXBw0"
                        }
                }
        ]
    }
    isSuccess: true
}
Request  /{prefix}/{version}/voicemails/a123b456-78bc-4976-8075-b2941d553b7b
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    data: {
        Id: "a123b456-78bc-4976-8075-b2941d553b7b",
        From: "+71234567890",
        To: : "+71234567891",
        AssignedTo: "full name",
        DateTimeUtc: "2017-01-14T08:40:51.620Z",
        Duration: "185",
        VoicemailStatus: "UnRead",
        VoicemailRecord: {
            FileName: "voicemail/T1U9U0lQ12UEN1c3RvbWVyLE9VPVNJUFBS23ZXNlbGxlcixPVT1Jb12mZyYXRlbCxEQz1zdWI3545sREM9bWlnaHR5bG967hZCxEQz1zaXBw0/T1U9U0lQUHYgVXNlclY1123456/20170124_083933_073_0009.wav",
            Uri: "https://panel.mightycall.com/Mightycall/Files/voicemail.wav?vmrecordid=RhoFSAWRZx1xqjDN8Vqzy0WWyX7s8c23NcHcJpUQ2JFdYNEeq5ptn7Tv1GJIpubmFKuLbw4YOW6Ac-UE1-v3gPfxh7XJYeUPaIiYsoy4QDLno1XCLhWkkXj3GtWU24P41KVIbX-SWx6-XKeeD1Oz4P5W7nM9vEO5j1LJmJrCLYkVEQ-jCW6yGNqZI6jURdBumHty7NqOm-ydvlxJMC418bAvcC5yxKTTi3vZk0umGEOs60q3kEij-4H6G4kf9-RVP0TUCNQdjNmPALIE6YAJmOz4Qn901&id=T1U8U0lQUEN1c3RvbWVyLE9VPVNJUFBSZXNlbGxlcixPVT1JbmZyYXRlbCxEQz2zdWIsREM9bWlnaHR5bG9hZCxEQz1zaXBw0"
        }
    }
    isSuccess: true
}

Profile

Profile
GET/{prefix}/{version}/profile/{extension}

This method returns current user info or assigned with {extension}

Response example:

{
    "data": {
        "firstName": "first name",
        "lastName": "last name",
        "email": "email@email.com",
        "extension": "100",
        "role": "admin"
    },
    "isSuccess": true
}

Example URI

GET https://api.mightycall.com/prefix/version/profile/extension
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

extension
string (optional) 

user extension number (for ex.: 110)

Request  /{prefix}/{version}/profile
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "firstName": "first name",
    "lastName": "last name",
    "email": "email@email.com",
    "extension": "100",
    "role": "admin"
  },
  "isSuccess": true
}
Request  /{prefix}/{version}/profile/101
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "firstName": "first name",
    "lastName": "last name",
    "email": "email@email.com",
    "extension": "101",
    "role": "user"
  },
  "isSuccess": true
}

Status

Status
GET/{prefix}/{version}/profile/status

This method returns current user availability status

Response example:

{
    "data": {
        "status": "Available"
    },
    "isSuccess": true
}

Status field values:

  • Available - user is available

  • DoNotDisturb - user is in status DND(don’t disturb)

Example URI

GET https://api.mightycall.com/prefix/version/profile/status
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

Request  /{prefix}/{version}/profile/status
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "status": "Available"
  },
  "isSuccess": true
}

Status

Status
PUT/{prefix}/{version}/profile/status/{status}

This method allows to set user availability status

RESPONSE EXAMPLE:

{
    "data": {
        "status": "Available"
    },
    "isSuccess": true
}

Status field values:

  • Available - user is available

  • DoNotDisturb - user is in status DND(don’t disturb)

Example URI

PUT https://api.mightycall.com/prefix/version/profile/status/status
URI Parameters
HideShow
prefix
string (required) 

environment prefix (sandbox or api)

version
string (required) 

API version (current is v3)

status
string (required) 

Available or DoNotDisturb

Request  /{prefix}/{version}/profile/status/Available
HideShow
Headers
Content-Type: application/json
Authorization: bearer {auth_token}
x-api-key: {api_key}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "data": {
    "status": "Available"
  },
  "isSuccess": true
}

WebPhone SDK Overview

WebPhone SDK Capabilities

WebPhone SDK can be used to integrate calling capabilities into a web app (ex. CRM system).

Current WebPhone SDK version can be used to:

  • Use as inline script at external systems

  • Accept and make calls via the MightyCall account

  • Enable basic call control (ex: call hold)

  • Receive call-related events (ex: call started)

Tell us how you use the SDK and which additional methods and events you need to build an integration with a 3rd party app. Send us you comments and feedback at support@mightycall.com

How do I connect WebPhone SDK to my web app?

WebPhone SDK is a JavaScript library which should be included into your web app code.

Choose one of the following way to integrate SDK:

  • inline mode;

  • modal form mode;

Inline mode

Use the following html snippet:

<script src="https://api.mightycall.com/{prefix}/{version}/sdk/mightycall.webphone.sdk.js">
</script>
<script type="text/javascript">
    var mcConfig = {login: "{api_key}", password: "{secret_key}"};
    MightyCallWebPhone.ApplyConfig(mcConfig);
    MightyCallWebPhone.Phone.Init("myContainerId"); //container id to insert web app
</script>

Modal form mode

Use the following html snippet:

<script src="https://api.mightycall.com/{prefix}/{version}/sdk/mightycall.webphone.sdk.js">
</script>
<script type="text/javascript">
    var mcConfig = {login: "{api_key}", password: "{secret_key}"};
    MightyCallWebPhone.ApplyConfig(mcConfig);
    MightyCallWebPhone.Phone.Init();
</script>

To confiure the JS library you need to specify your api_key associated with the account and secret_key. By default, secret_key is an internal user phone number (ex: 100). Aslo obtained in the MightyCall web app key could be used as the secret_key if sign-in by key switched on

If you did everything correctly you should be able to start using all SDK methods and events in your web app.

SDK usage example:

<script type="text/javascript">
    MightyCallWebPhone.Phone.Call('+71231234567'); //replace with your phone number
</script>

WebPhone Statuses

Before you start working with WebPhone you need to check it’s status. List of all available statuses is provided in the table below. To get the current WebPhone status use the following SDK method:

<script type="text/javascript">
    var status = MightyCallWebPhone.Phone.Status();
    console.log(status);
</script>
Status Description
inactive WebPhone is not activated
ready WebPhone is activated
call_incoming WebPhone received an incoming call, however it is not answered yet
call_outgoing WebPhone makes an outgoing call, however is it not answered yet
call_started WebPhone processing a call
offline WebPhone is offline (not connected to MightyCall servers)

How do I work with WebPhone SDK methods?

Example of a SDK method call:

<script type="text/javascript">
    var status = MightyCallWebPhone.Phone.Status();
    console.log(status);
</script>

How do I work with WebPhone SDK events?

Each event has 2 methods:

  • subscribe - subscribe to an event

  • unsubscribe - unsubscribe from an event

Event subscription example:

<script type="text/javascript">
    function webPhoneOnCallStarted(callInfo) {
        console.log('Call from:' + callInfo.From);
        console.log('Call to:' + callInfo.To);
    }
    MightyCallWebPhone.Phone.OnCallStarted.subscribe(webPhoneOnCallStarted);
</script>

Event unsubscription example:

<script type="text/javascript">
    MightyCallWebPhone.Phone.OnCallStarted.unsubscribe(webPhoneOnCallStarted);
</script>

WebPhone SDK Methods

Phone.Init

This method is called to initialize WebPhone SDK. However it is already included into the html snippet used to add SDK library to you web app code so explicit initialization is not required.

Phone.Focus

This method is used to focus on WebPhone window.

<script type="text/javascript">
    MightyCallWebPhone.Phone.Focus();
</script>

Phone.Call

This method is used to place an outbound call.

<script type="text/javascript">
    MightyCallWebPhone.Phone.Call('+71231234567'); //Replace with your phone number
    MightyCallWebPhone.Phone.Focus(); //Focus on WebPhone window in case it is hidden by other windows
</script>

Phone.Status

This method returns current WebPhone status.

<script type="text/javascript">
    var status = MightyCallWebPhone.Phone.Status();
    console.log(status);
</script>

Possbible WebPhone statuses:

  • inactive | WebPhone is not activated

  • ready | WebPhone is activated

  • call_incoming | WebPhone received an incoming call, however it is not answered yet

  • call_outgoing | WebPhone makes an outgoing call, however is it not answered yet

  • call_started | WebPhone processing a call

  • offline | WebPhone is offline (not connected to MightyCall servers)

Phone.HangUp

This method is used to end the current call.

<script type="text/javascript">
    MightyCallWebPhone.Phone.HangUp();
</script>

Phone.Mute

This method is used to mute the microphone during the call.

<script type="text/javascript">
    MightyCallWebPhone.Phone.Mute();
</script>

Phone.UnMute

This method is used to unmute the microphone during the call.

<script type="text/javascript">
    MightyCallWebPhone.Phone.UnMute();
</script>

Call.Accept

This method is used to accept an incoming call.

<script type="text/javascript">
    MightyCallWebPhone.Call.Accept();
</script>

Call.Reject

This method is used to decline an incoming call.

<script type="text/javascript">
    MightyCallWebPhone.Call.Reject();
</script>

Call.Hold

This method is used to place the current call on hold.

<script type="text/javascript">
    MightyCallWebPhone.Call.Hold();
</script>

Call.UnHold

This method is used to place the current call off hold.

<script type="text/javascript">
    MightyCallWebPhone.Call.UnHold();
</script>

Profile.GetUserStatus

This method is used to get current user status. Should be used like a promise:

<script type="text/javascript">
    MightyCallWebPhone.Profile.GetUserStatus().then(function(statusString) {
                console.log(statusString);
    })
</script>

statusString could get the following values:

  • dnd (not available)

  • available

Profile.SetUserStatus

This method is used to set current user status. Method accepts desirable status as string and returns JS Promise. See available values below the code snippet:

<script type="text/javascript">
    MightyCallWebPhone.Profile.SetUserStatus(statusString).then(
    function(result) {
        console.log(result);
    },
    function(rejectReason) {
        console.log(rejectReason);
    });
    </script>

statusString could get the following values:

  • dnd (not available)

  • available

In success callback you will get result message with new status. In the error case, error callback will be fired with rejection message as provided above.

WebPhone SDK Events

Phone.OnReady

This event is generated when WebPhone status is changed to “ready”.

<script type="text/javascript">
    function webPhoneOnReady() {
        console.log('WebPhone is ready.');
    }
    MightyCallWebPhone.Phone.OnReady.subscribe(webPhoneOnReady);
</script>

Phone.OnError [obsolete]

This event is generated when WebPhone gets an unexpected error.

<script type="text/javascript">
    function webPhoneOnError(errorMessage) {
        console.log('WebPhone error: ' + errorMessage);
    }
    MightyCallWebPhone.Phone.OnError.subscribe(webPhoneOnError);
</script>

Phone.OnOffline

This even is generated when WebPhone status is changed to “offline”.

<script type="text/javascript">
    function webPhoneOnOffline() {
        console.log('WebPhone is offline.');
    }
    MightyCallWebPhone.Phone.OnOffline.subscribe(webPhoneOnOffline);
</script>

Phone.OnStatusChange

This event is generated when WebPhone status is changed.

<script type="text/javascript">
    function webPhoneOnStatusChange(status) {
        console.log('WebPhone status:' + status);
    }
    MightyCallWebPhone.Phone.OnStatusChange.subscribe(webPhoneOnStatusChange);
</script>

Phone.OnCallIncoming

This event is generated when WebPhone receives an incoming call.

<script type="text/javascript">
    function webPhoneOnCallIncoming(callInfo) {
        console.log('Call from:' + callInfo.From);
        console.log('Call to:' + callInfo.To);
    }
    MightyCallWebPhone.Phone.OnCallIncoming.subscribe(webPhoneOnCallIncoming);
</script>

callInfo object has the following structure:

{
    From: '+71234567890', // Caller phone number (client)
    To: '+71234567890' // Called phone number (operator)
}

Phone.OnCallOutgoing

This event is generated when WebPhone places an outbound call.

<script type="text/javascript">
    function webPhoneOnCallOutgoing(callInfo) {
        console.log('Call from:' + callInfo.From);
        console.log('Call to:' + callInfo.To);
    }
    MightyCallWebPhone.Phone.OnCallOutgoing.subscribe(webPhoneOnCallOutgoing);
</script>

callInfo object has the following structure:

{
    From: '+71234567890', // Caller phone number (operator)
    To: '+71234567890' // Called phone number (client)
}

Phone.OnCallStarted

This event is generated when WebPhone call starts.

<script type="text/javascript">
    function webPhoneOnCallStarted(callInfo) {
        console.log('Call from:' + callInfo.From);
        console.log('Call to:' + callInfo.To);
    }
    MightyCallWebPhone.Phone.OnCallStarted.subscribe(webPhoneOnCallStarted);
</script>

callInfo object has the following structure:

{
    From: '+71234567890', // Caller phone number (client)
    To: '+71234567890', // Called phone number (operator)
    Id: "7539cb10-bbf3-49c1-8381-3823dbf3e410", // Call identifier in history
    DateTimeUtc: "2017-09-07T14:23:27.4211222Z",
    Direction: "Incoming"
}

Phone.OnCallCompleted

This event is generated when WebPhone call ends.

<script type="text/javascript">
    function webPhoneOnCallCompleted(callInfo) {
        console.log('Call from:' + callInfo.From);
        console.log('Call to:' + callInfo.To);
    }
    MightyCallWebPhone.Phone.OnCallCompleted.subscribe(webPhoneOnCallCompleted);
</script>

callInfo object has the following structure:

{
    From: '+71234567890', // Caller phone number (client)
    To: '+71234567890', // Called phone number (operator)
    Id: "7539cb10-bbf3-49c1-8381-3823dbf3e410", // Call identifier in history
    DateTimeUtc: "2017-09-07T14:23:27.4211222Z",
    Direction: "Incoming"
}

Phone.OnHangUp

This event is generated when incoming call is ended.

<script type="text/javascript">
    function webPhoneOnHangUp() {
        console.log('Incoming call ended.');
    }
    MightyCallWebPhone.Phone.OnHangUp.subscribe(webPhoneOnHangUp);
</script>

Phone.OnMute

This event is generated when operator mutes the microphone.

<script type="text/javascript">
    function webPhoneOnMute() {
        console.log('Microphone muted.');
    }
    MightyCallWebPhone.Phone.OnMute.subscribe(webPhoneOnMute);
</script>

Phone.OnUnMute

This event is generated when operator unmute the microphone.

<script type="text/javascript">
    function webPhoneOnUnMute() {
        console.log('Microphone unmuted.');
    }
    MightyCallWebPhone.Phone.OnUnMute.subscribe(webPhoneOnUnMute);
</script>

Call.OnAccept

This event is generated when incoming call is accepted by the operator.

<script type="text/javascript">
    function webPhoneOnAccept() {
        console.log('Incoming call accepted.');
    }
    MightyCallWebPhone.Phone.OnAccept.subscribe(webPhoneOnAccept);
</script>

Call.OnReject

This event is generated when incoming call is rejected by the operator.

<script type="text/javascript">
    function webPhoneOnReject() {
        console.log('Incoming call rejected.');
    }
    MightyCallWebPhone.Phone.OnReject.subscribe(webPhoneOnReject);
</script>

Call.OnHold

This event is generated when current call is put on hold.

<script type="text/javascript">
    function webPhoneOnHold() {
        console.log('Current call put on hold.');
    }
    MightyCallWebPhone.Phone.OnHold.subscribe(webPhoneOnHold);
</script>

Call.OnUnHold

This event is generated when current call is put off hold.

<script type="text/javascript">
    function webPhoneOnUnHold() {
        console.log('Current call put off hold.');
    }
    MightyCallWebPhone.Phone.OnUnHold.subscribe(webPhoneOnUnHold);
</script>

Profile.OnStatusChange

This event is generated when WebPhone status is changed.

<script type="text/javascript">
    function profileOnStatusChange(statusString) {
        console.log('status was changed to ' +  statusString);
    }
    MightyCallWebPhone.Profile.OnStatusChange.subscribe(profileOnStatusChange);
</script>

statusString contains one of the following value:

  • dnd (not available)

  • available

WebHook notifications

MightyCall platform allows to manage by notifications (incoming call, outgoing call and callback call) To send notification to external host, HTTP endpoints should be configured at MightyCall web app. Note! Notification messages may deliver to external host in an undefined order. To process incoming messages Timestamp field could be used.

How to manage url adresses for webhook notifications?

WebHook adresses could be defined at the appropriate API page.
You can define up to 10 adresses per mightycall account.

WebHook urls requirements

Once urls saved the system runs a validation routine performing a POST request. The defined webhook url should respond with the status 2XX (200-299).

WebHook script example

  1. Client saves the webhook address https://my-crm.com/some-url/webhook/entry.php

  2. The system performs a POST request

  3. Example of a client script entry.php:

$headers = apache_request_headers();
//parse call-event params and write them into .txt file
$data = grab_params();
file_put_contents("log.txt", $data, FILE_APPEND); 
http_response_code(200);
function grab_params()
{    
    $post = json_decode(file_get_contents('php://input'), true);
    $str .= "From : ".$post["Body"]["From"].PHP_EOL;
    $str .= "To: ".$post["Body"]["To"].PHP_EOL;
    $str .= "Call ID: ".$post["Body"]["Id"].PHP_EOL;
    return $str.PHP_EOL;
}

Script answers with a status 200.

When a call is received by the system, it is assigned a unique identifier which will appear in all notifications as Body.Id.

Here is a typical notification sequence for an incoming call:

  • IncomingCall

  • IncomingCallRinging (Extension 101)

  • IncomingCallStopRinging (Extension 101)

  • IncomingCallRinging (Extension 102)

  • IncomingCallConnected (Extension 102)

  • IncomingCallCompleted

Here a call comes in to the system and there is a sequential dialing of two users with extension numbers 101 and 102. The user with extension 101 misses the call and 102 takes the call. Then the call ends.

Here is an example for the consultation call:

  • CallbackCall

  • CallbackCallRinging (Extension 101)

  • CallbackCallConnected (Extension 101)

  • IncomingCallRinging (Extension 102)

  • IncomingCallConnected (Extension 102)

  • IncomingCallCompleted (Extension 102)

  • CallbackCallCompleted

Here the call comes through a callback form. The user with extension 101 picks up the phone and makes a consultation call to the user with extension 102. Then the consultation and main calls end.

Here is an example for the outgoing call to another user (colleague):

  • OutgoingCall (Extension 101)

  • IncomingCallRinging (Extension 105)

  • IncomingCallConnected (Extension 105)

  • IncomingCallCompleted (Extension 105)

  • OutgoingCallCompleted

It is important to understand that for these and other scenarios, the From, To and Id fields inside the Body will be the same in all notifications related to the processing of the primary call. If an event is associated with a specific user callout (for example, IncomingCallRinging, IncomingCallConnected), its extension number will be contained in Body.Extension. IncomingCallCompleted can have a non-zero value for the Body.Extension field. If the field is filled, it means that the consultation call is completed. Otherwise this is a notification of the completion of the processing of the entire call. As an example, consider a call through a callback form, followed by transfer to another user:

  • CallbackCall

  • CallbackCallRinging (Extension 105)

  • CallbackCallConnected (Extension 105)

  • IncomingCallRinging (Extension 101)

  • CallbackCallCompleted (Extension 105)

  • IncomingCallConnected (Extension 101)

  • IncomingCallCompleted (Extension 101)

  • CallbackCallCompleted

As you can see there is a notification in the middle CallbackCallCompleted (Extension 105). It means that initial user (who answered first) has hanged up the phone. Notification CallbackCallCompleted with no Extension says that the processing of the entire call is finished.

Additional information:

In case of a call from the site, the name of the widget will be displayed in the Body.From field. The business phone number this widget is associated will be displayed in the Body.To field. In case of an outgoing call to a colleague, the Body.From field will contain the business phone number the call is associated, and the extension number of the employee will be contained in the Body.To field.

Message format

IncomingCall

New incoming call from external number {From} to business number {To}:

{
  "Body": {
    "From": "+79119371200",
    "To": "+78120347567",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec8203d822"
  },
  "Guid": "00000000-0000-0000-0000-000000000001",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:10.5140000Z",
  "EventType": "IncomingCall",
}

IncomingCallRinging

Starting of incoming call with extension number {Extension}:

{
  "Body": {
    "From": "+79119371200",
    "To": "+78120347567",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec8203d822",
    "Extension": "103"
  },
  "Guid": "00000000-0000-0000-0000-000000000002",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:15.5140000Z",
  "EventType": "IncomingCallRinging",
}

IncomingCallStopRinging

Incoming call to user with {Extension} is failed:

{
  "Body": {
    "From": "+79119371200",
    "To": "+78120347567",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec8203d822",
    "Extension": "103"
  },
  "Guid": "00000000-0000-0000-0000-000000000003",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:30.5140000Z",
  "EventType": "IncomingCallStopRinging",
}

IncomingCallConnected

Incoming call to user with {Extension} is successfully starting:

{
  "Body": {
    "From": "+79119371200",
    "To": "+78120347567",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec8203d822",
    "Extension": "103"
  },
  "Guid": "00000000-0000-0000-0000-000000000004",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:20.5140000Z",
  "EventType": "IncomingCallConnected",
}

IncomingCallCompleted

Incoming call was completed:

{
  "Body": {
    "From": "+79119371200",
    "To": "+78120347567",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec8203d822",
    "Extension": null
  },
  "Guid": "00000000-0000-0000-0000-000000000005",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:59:10.5140000Z",
  "EventType": "IncomingCallCompleted",
}

OutgoingCall

New outgoing call from business number {From} to external number {To}:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034883",
    "Extension": "101"
  },
  "Guid": "00000000-0000-0000-0000-000000000000",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:10.5140000Z",
  "EventType": "OutgoingCall",
}

OutgoingCallConnected

Outgoing call is successfully starting:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034883",
    "Extension": "101"
  },
  "Guid": "00000000-0000-0000-0000-000000000000",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:20.5140000Z",
  "EventType": "OutgoingCallConnected",
}

OutgoingCallCompleted

Outgoing call was completed:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034883",
    "Extension": "101"
  },
  "Guid": "00000000-0000-0000-0000-000000000000",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:50.5140000Z",
  "EventType": "OutgoingCallCompleted",
}

CallbackCall

New request for callback call from business number {From} to external number {To}:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034885"
  },
  "Guid": "00000000-0000-0000-0000-000000000001",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:10.5140000Z",
  "EventType": "CallbackCall",
}

CallbackCallRinging

Starting of callback call with extension number {Extension} to the client:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034885",
    "Extension": "104"
  },
  "Guid": "00000000-0000-0000-0000-000000000002",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:15.5140000Z",
  "EventType": "CallbackCallRinging",
}

CallbackCallStopRinging

Callback call to user with {Extension} is failed:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034885",
    "Extension": "104"
  },
  "Guid": "00000000-0000-0000-0000-000000000003",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:30.5140000Z",
  "EventType": "CallbackCallStopRinging",
}

CallbackCallConnected

Callback call from user with {Extension} to the client with number {To} is successfully starting:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034885",
    "Extension": "104"
  },
  "Guid": "00000000-0000-0000-0000-000000000004",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:58:20.5140000Z",
  "EventType": "CallbackCallConnected",
}

CallbackCallCompleted

Callback call was completed:

{
  "Body": {
    "From": "+78120347567",
    "To": "+79119371200",
    "Id": "7df52a62-9db2-48cd-9ae4-7dec82034885",
    "Extension": null
  },
  "Guid": "00000000-0000-0000-0000-000000000005",
  "ApiKey": "8a77c828-31c2-492a-b0c1-224cd94e9c3b",
  "Timestamp": "2017-05-25T08:59:10.5140000Z",
  "EventType": "CallbackCallCompleted",
}

Incoming call

Following messages will be generated for successful call:

  • IncomingCall

  • IncomingCallRinging

  • IncomingCallConnected

  • IncomingCallCompleted

Following messages will be generated for unsuccessful call:

  • IncomingCall

  • IncomingCallRinging

  • IncomingCallStopRinging

  • IncomingCallCompleted

Outgoing call

Following messages will be generated for outgoing call:

  • OutgoingCall

  • OutgoingCallConnected

  • OutgoingCallCompleted

Callback call

Following messages will be generated for successful call:

  • CallbackCall

  • CallbackCallRinging

  • CallbackCallConnected

  • CallbackCallCompleted

Following messages will be generated for unsuccessful call:

  • CallbackCall

  • CallbackCallRinging

  • CallbackCallStopRinging

  • CallbackCallCompleted

Consultative call

Following messages will be generated for consultative call:

  • IncomingCallRinging

  • IncomingCallConnected

  • IncomingCallCompleted

Transfered call

Following messages will be generated for transfered call:

  • IncomingCallRinging

  • IncomingCallConnected

  • IncomingCallCompleted

Redirect to Voicemail

Following messages will be generated for call redirected to voicemail:

  • IncomingCall

  • IncomingCallRinging

  • IncomingStopRinging

  • IncomingCallCompleted

Group call

Following messages will be generated for group call:

  • IncomingCall

  • IncomingCallRinging (for each participant)

  • IncomingCallStopRinging (for each participan)

  • IncomingCallConnected

  • IncomingCallCompleted

API changelog

v1

  • method to request of authentication token without client_secret parameter was restricted

  • new method to request of authentication token by special key secret_key was added. (Key can be generated in the MightyCall web app)

  • new REST method status to manage user availability was added

  • WebPhone SDK events was extended

v2

  • configuration of webhook notifications. (Can be configured in the MightyCall web app)

  • new REST method makecall to make outgoing call was added

  • new REST method profile to get common user information was added

  • integrating of WebPhone with inline mode

  • WebPhone SDK events was extended

v3

  • call object has been changed in methods calls and makecall: new objects ‘caller’, ‘called’ was added, ‘participants’ and ‘contacts’ were removed. The fields ‘from’ and ‘to’ were replaced by ‘caller’ and ‘called’ objects.

Generated by aglio on 10 Jul 2019