NAV
Developers
RAW cURL

REST API

API endpoint:

https://app.callpage.io/api/v1/external

This documentation helps you implement the RESTful CallPage API v1. This API uses a JSON format for output and is capable of handling CORS (Cross-Origin Resource Sharing) requests. The API is stateless – all requests are validated against an API key. The API key can be obtained manually from the CallPage app.

Each response sent from the API contains a hasError parameter which is of boolean type, indicating whether the request was carried out or not. Upon success being false, an optional errorCode parameter (string) and message (string) may be given. In case of success being true, the response is always contained within a data parameter, and an additional meta parameter may be carried alongside. You can use pretty_output=1 parameter in the GET-arguments to ask for an indented response – however using the pretty output in an actual integration is strongly discouraged as it is intended for debugging purposes and gets served slower.

Authentication

API Key

Make sure to replace xxxxxxxxxxxx with your API Key.

Every request should have required header for authorization (API Key), which can be obtained from Dashboard.

Authorization: xxxxxxxxxxxx

Examples

GET /api/v1/external HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

You should receive this as a response:

{
  "hasError": false,
  "errorCode": 0,
  "message": "Hello there! I am the CallPage API. To fully grasp my superpowers, head down to https://developers.callpage.io for documentation.",
  "data": []
}

We present some examples of how to make correct request to our endpoints.

Calls

Call Statuses

Status Description
scheduled A visitor picked up a timeslot for a call with manager. System will automatically call the visitor and connect you at the right time. Before a call visitor will receive an SMS notification.
in-progress The call is in progress. Manager is talking with user right now.
completed The call was successfully completed. Feel free to listen for call recording and analyze it.
user-failed Visitor of your website doesn’t answer the call or was busy at that moment.
manager-failed Unfortunately, your managers didn’t answer the call. Contact the visitor ASAP, he is still waiting for call from your company.

Get History

Example request:

GET /api/v1/external/calls/history?widget_id=1&offset=50&limit=5 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/calls/history?widget_id=1&offset=50&limit=5" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "id": 274,
            "to": "+48888888769",
            "widget_id": 1,
            "email": null,
            "note": null,
            "rating": null,
            "to_formatted": "+48 888 888 769",
            "human_status": "ringing",
            "scheduled_at": null,
            "cancelled_at": null,
            "ref_id": null,
            "scheduled_success": false,
            "ref_call_requests_count": 0,
            "department": {
                "id": 1,
                "name": "Sales"
            },
            "request": null,
            "call_attempt": {
                "id": 274,
                "manager": {
                    "id": 1,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [
                        {
                            "id": 1,
                            "name": "Sales"
                        },
                        {
                            "id": 2,
                            "name": "Tech"
                        }
                    ],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                },
                "call": {
                    "id": 274,
                    "duration": 30
                },
                "tags": [
                    {
                        "id": 23,
                        "label": "Lead",
                        "color": "#ff00ff",
                        "updated_at": "2016-10-21 14:32:12"
                    }
                ]
            }
        },
        {
            "id": 273,
            "to": "+48888885732",
            "widget_id": 1,
            "email": null,
            "note": null,
            "rating": null,
            "to_formatted": "+48 888 885 732",
            "human_status": "failed",
            "scheduled_at": null,
            "cancelled_at": null,
            "ref_id": null,
            "scheduled_success": false,
            "ref_call_requests_count": 0,
            "department": {
                "id": 1,
                "name": "Sales"
            },
            "request": null,
            "call_attempt": {
                "id": 273,
                "manager": {
                    "id": 1,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [
                        {
                            "id": 1,
                            "name": "Sales"
                        },
                        {
                            "id": 2,
                            "name": "Tech"
                        }
                    ],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                },
                "call": {
                    "id": 273,
                    "duration": 25
                },
                "tags": null
            }
        },
        {
            "id": 272,
            "to": "+48888880709",
            "widget_id": 1,
            "email": null,
            "note": null,
            "rating": null,
            "to_formatted": "+48 888 880 709",
            "human_status": "ringing",
            "scheduled_at": null,
            "cancelled_at": null,
            "ref_id": null,
            "scheduled_success": false,
            "ref_call_requests_count": 0,
            "department": {
                "id": 2,
                "name": "Tech"
            },
            "request": null,
            "call_attempt": {
                "id": 272,
                "manager": {
                    "id": 1,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [
                        {
                            "id": 1,
                            "name": "Sales"
                        },
                        {
                            "id": 2,
                            "name": "Tech"
                        }
                    ],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                },
                "call": {
                    "id": 272,
                    "duration": 30
                },
                "tags": null
            }
        },
        {
            "id": 271,
            "to": "+48888880981",
            "widget_id": 1,
            "email": null,
            "note": null,
            "rating": null,
            "to_formatted": "+48 888 880 981",
            "human_status": "new",
            "scheduled_at": null,
            "cancelled_at": null,
            "ref_id": null,
            "scheduled_success": false,
            "ref_call_requests_count": 0,
            "department": {
                "id": 2,
                "name": "Tech"
            },
            "request": null,
            "call_attempt": {
                "id": 271,
                "manager": {
                    "id": 1,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [
                        {
                            "id": 1,
                            "name": "Sales"
                        },
                        {
                            "id": 2,
                            "name": "Tech"
                        }
                    ],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                },
                "call": {
                    "id": 271,
                    "duration": 25
                },
                "tags": null
            }
        },
        {
            "id": 270,
            "to": "+48888886397",
            "widget_id": 1,
            "email": null,
            "note": null,
            "rating": null,
            "to_formatted": "+48 888 886 397",
            "human_status": "user-failed",
            "scheduled_at": null,
            "cancelled_at": null,
            "ref_id": null,
            "scheduled_success": false,
            "ref_call_requests_count": 0,
            "department": {
                "id": 1,
                "name": "Sales"
            },
            "request": null,
            "call_attempt": {
                "id": 270,
                "manager": {
                    "id": 1,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [
                        {
                            "id": 1,
                            "name": "Sales"
                        },
                        {
                            "id": 2,
                            "name": "Tech"
                        }
                    ],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                },
                "call": {
                    "id": 270,
                    "duration": 15
                },
                "tags": null
            }
        }
    ],
    "meta": {
        "offset": "50",
        "limit": "5",
        "count": 100
    }
}

Get calls history. By default this endpoint returns all calls for all user’s widgets.

Action

GET https://app.callpage.io/api/v1/external/calls/history

Query Parameters

All the parameters presented below are optional and they do filter returned calls.

Parameter Type Required Description Default
date_from timestamp false Start date as timestamp. e.g. 1473779438.
date_to timestamp false End date as timestamp string. e.g. 1473779438.
tel string false A phone number in E.164 format. e.g. +48123123123.
widget_id int false Widget identifier. You can find it in widgets tab.
url string false Widget installation URL.
statuses string false Call status. Click here to check all available call statutes.
offset int false If set, the result will be offset by this value. 0
limit int false If set, the result will be limited. 100

Users

User Identifier

To retrieve user in /users endpoint one can pass either id or user_id parameter.

User Roles

Role Description
owner Owner is a master user. Owner can create admins and managers and has full access to Callpage Dashboard.
admin Admin has access to everything except billing.
manager Manager has access to his widgets, calls and recordings.

Users with and without email

Every owner can create limitless number of users without email address. It means that these users are not applied to your subscription limit. They can not sign into Callpage Dashboard, but can be used as a call operators instead.

Users with email apply to your subscription limit. These users however have access (limited by their role) to Callpage Dashboard.

Get All Users

Example request:

GET /api/v1/external/users/all?offset=1&limit=2 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/users/all?offset=1&limit=2" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "id": 2,
            "name": "Manager1",
            "email": "manager1@callpage.io",
            "tel": "+48570934649",
            "tel_formatted": "570 934 649",
            "tel_extension": null,
            "last_online": null,
            "parent_id": 1,
            "activated_at": "2016-09-08 13:32:54",
            "role": {
                "slug": "manager"
            },
            "avatar": null,
            "caller_id": {
                "id": 1,
                "activated_at": null,
                "updated_at": "2016-09-08 13:32:54"
            }
        },
        {
            "id": 3,
            "name": "Manager2",
            "email": "manager2@callpage.io",
            "tel": "+48570934649",
            "tel_formatted": "570 934 649",
            "tel_extension": null,
            "last_online": null,
            "parent_id": 1,
            "activated_at": "2016-09-08 13:32:54",
            "role": {
                "slug": "manager"
            },
            "avatar": null,
            "caller_id": {
                "id": 1,
                "activated_at": null,
                "updated_at": "2016-09-08 13:32:54"
            }
        }
    ],
    "meta": {
        "offset": "1",
        "limit": "2",
        "count": 4
    }
}

Get users.

Action

GET https://app.callpage.io/api/v1/external/users/all

Query Parameters

Parameter Type Required Description Default
offset int false If set, the result will be offset by this value. 0
limit int false If set, the result will be limited. 100

Get User

Example request:

GET /api/v1/external/users/get?id=3 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/users/get?id=3" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 3,
        "name": "Manager2",
        "email": "manager2@callpage.io",
        "tel": "+48570934649",
        "tel_formatted": "570 934 649",
        "tel_extension": null,
        "last_online": null,
        "parent_id": 1,
        "activated_at": "2016-08-26 10:44:21",
        "role": {
            "slug": "manager"
        },
        "avatar": null,
        "caller_id": {
            "id": 1,
            "activated_at": null,
            "updated_at": "2016-08-26 10:44:21"
        }
    },
    "meta": []
}

Get user by id.

Action

GET https://app.callpage.io/api/v1/external/users/get

Query Parameters

Parameter Type Required Description
id int true User identifier. You can find it in users tab.

Create User

Example request:

POST /api/v1/external/users/create HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "name": "Test Manager",
    "tel": "+48 888 888 888",
    "email": "test@test.com",
    "role": "manager"
}
curl -X POST "https://app.callpage.io/api/v1/external/users/create" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "name": "Test Manager",
             "tel": "+48 888 888 888",
             "email": "test@test.com",
             "role": "manager"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 1380
    }
}

Create user.

Action

POST https://app.callpage.io/api/v1/external/users/create

Query Parameters

Parameter Type Required Description Default
name string true User name.
tel string true A phone number which you would like to call in E.164 format. e.g. +48123123123.
email email false Valid email address.
role string false User role, can be either admin or manager. manager

Update User

Example request:

POST /api/v1/external/users/update HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 1380,
    "name": "Test Manager",
    "tel": "+48 888 888 888",
    "email": "test@test.com",
    "role": "admin"
}
curl -X POST "https://app.callpage.io/api/v1/external/users/update" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 1380,
             "name": "Test Manager",
             "tel": "+48 888 888 888",
             "email": "test@test.com",
             "role": "admin"
         }'

JSON Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 1380
    }
}

Update user by id. This operation can override parent user, depending on who makes the request!

Action

POST https://app.callpage.io/api/v1/external/users/update

Query Parameters

Parameter Type Required Description Default
id int true User identifier. You can find it in users tab.
name string true User name.
tel string true A phone number which you would like to call in E.164 format. e.g. +48123123123.
email email false Valid email address.
role string false User role, can be either admin or manager. manager

Delete User

Example request:

POST /api/v1/external/users/delete HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 1380
}
curl -X POST "https://app.callpage.io/api/v1/external/users/delete" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 1380
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": null
}

Delete user by id.

Action

POST https://app.callpage.io/api/v1/external/users/delete

Query Parameters

Parameter Type Required Description
id int true User identifier. You can find it in users tab.

Widgets

Widget Identifier

To retrieve widget in /widgets endpoint one can pass either id or widget_id parameter. It is also possible to use encrypted_id.

Widget Languages

Locale Code Language
cn Chinese
cz Czech
de German
ee Estonian
en English
es Spanish
fr French
hu Hungarian
it Italian
lt Latvian
pl Polish
pt Portuguese
ru Russian
se Swedish
tr Turkish

Widget Settings

Setting Available options Description Default
callerId 0 , 1 , 2 0 – Callpage number 0
1 – Every managers number
2 – Single number
countdown Integers from 28 to 59 Widget countdown value. 28
call.algorithm simulring, findme simulring – Simultaneously simulring
findme – In sequence
call.recording boolean Indicates whether Callpage should record calls. true
call.direction ab, ba ab – first call manager then call client ab
ba – first call client then call manager
call.from boolean Indicates whether to show caller’s number. true
widget.showMobile boolean Indicates whether to show widget on mobile devices. true
widget.hideAfterHourss boolean Indicates whether widget will be disabled after working hours. false
widget.enableSmsName boolean Your company name which will appear as SMS Sender ID for your customers. true
widget.playSound boolean Indicates whether the widget should play the sounds. true
widget.showScheduled boolean Indicates whether the number of scheduled calls today should be displayed. May have influence on conversion rate. true
widget.showCallStats boolean Indicates whether to show texts with stats on widget. May have influence on conversion rate. true
widget.showHint boolean Indicates whether to show a tooltip. The tooltip with call back offer will be shown near the button. true
widget.showFlags boolean Indicates whether to show dropdown with countries codes. Easy to select appropriate country code. Useful for multilingual websites. false
widget.style.position top-left, top-right, bottom-left, bottom-right Widget position on the website. bottom-right
widget.style.scheme blue, green, red, yellow, grey, custom Widget scheme color. blue
widget.style.color RGB value in hex Custom color. “”
widget.button.autoShow boolean Indicates whether the widget should open automatically. true
widget.button.showTimeout milliseconds Specify timeout after which button is automatically showed. 3000
widget.button.showManagersCount boolean Indicates whether to show operators count on widget. May have influence on conversion rate. true
etc.allowRecording boolean Agreement to share call recordings with CallPage’s employees to help improve service quality. true

Get All Widgets

Example request:

GET /api/v1/external/widgets/all?offset=1&limit=2 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/widgets/all?offset=1&limit=2" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "id": 2,
            "description": "Callpage.io DIALOG",
            "url": "http:\/\/callpage.io",
            "enabled": true,
            "locale_code": "en",
            "installation_status": 0,
            "installed_at": null,
            "company_sms_name": null,
            "call_requests_count": 0,
            "managers": [
                {
                    "id": 2,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe\/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe\/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                }
            ]
        },
        {
            "id": 3,
            "description": "Callpage.io DIALOG",
            "url": "http:\/\/callpage.io",
            "enabled": true,
            "locale_code": "en",
            "installation_status": 0,
            "installed_at": null,
            "company_sms_name": null,
            "call_requests_count": 0,
            "managers": [
                {
                    "id": 3,
                    "enabled": true,
                    "user": {
                        "id": 1,
                        "name": "Owner",
                        "tel": "+48570934649",
                        "email": "admin@admin.com",
                        "avatar": null
                    },
                    "departments": [],
                    "business_times": [
                        {
                            "day_of_week": 0,
                            "enabled": false,
                            "timezone": "Europe\/Warsaw",
                            "start_time": null,
                            "end_time": null
                        },
                        {
                            "day_of_week": 1,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 2,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 3,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 4,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 5,
                            "enabled": true,
                            "timezone": "Europe\/Warsaw",
                            "start_time": "09:00:00",
                            "end_time": "17:00:00"
                        },
                        {
                            "day_of_week": 6,
                            "enabled": false,
                            "timezone": "Europe\/Warsaw",
                            "start_time": null,
                            "end_time": null
                        }
                    ]
                }
            ]
        }
    ],
    "meta": {
        "offset": "1",
        "limit": "2",
        "count": 21
    }
}

Get widgets for given user.

Action

GET https://app.callpage.io/api/v1/external/widgets/all

Query Parameters

Parameter Type Required Description Default
offset int false If set, the result will be offset by this value. 0
limit int false If set, the result will be limited. 100

Get Widget

Example request:

GET /api/v1/external/widgets/get?id=1 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/widgets/get?id=1" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 1,
        "description": "Callpage.io MINIMAL",
        "url": "http:\/\/callpage.io",
        "enabled": true,
        "locale_code": "en",
        "installation_status": 1,
        "installed_at": null,
        "company_sms_name": null,
        "call_requests_count": 0,
        "managers": [
            {
                "id": 1,
                "enabled": true,
                "user": {
                    "id": 1,
                    "name": "Owner",
                    "tel": "+48570934649",
                    "email": "admin@admin.com",
                    "avatar": null
                },
                "departments": [
                    {
                        "id": 1,
                        "name": "Sales"
                    },
                    {
                        "id": 2,
                        "name": "Tech"
                    }
                ],
                "business_times": [
                    {
                        "day_of_week": 0,
                        "enabled": false,
                        "timezone": "Europe\/Warsaw",
                        "start_time": null,
                        "end_time": null
                    },
                    {
                        "day_of_week": 1,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 2,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 3,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 4,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 5,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 6,
                        "enabled": false,
                        "timezone": "Europe\/Warsaw",
                        "start_time": null,
                        "end_time": null
                    }
                ]
            },
            {
                "id": 22,
                "enabled": true,
                "user": {
                    "id": 4,
                    "name": "Admin",
                    "tel": "+48570934649",
                    "email": "admin@callpage.io",
                    "avatar": null
                },
                "departments": [],
                "business_times": [
                    {
                        "day_of_week": 0,
                        "enabled": false,
                        "timezone": "Europe\/Warsaw",
                        "start_time": null,
                        "end_time": null
                    },
                    {
                        "day_of_week": 1,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 2,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 3,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 4,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 5,
                        "enabled": true,
                        "timezone": "Europe\/Warsaw",
                        "start_time": "09:00:00",
                        "end_time": "17:00:00"
                    },
                    {
                        "day_of_week": 6,
                        "enabled": false,
                        "timezone": "Europe\/Warsaw",
                        "start_time": null,
                        "end_time": null
                    }
                ]
            }
        ]
    },
    "meta": []
}

Get widget by id.

Action

GET https://app.callpage.io/api/v1/external/widgets/get

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.

Simple Call

Example request:

POST /api/v1/external/widgets/call HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 1,
    "tel": "+48 888 888 888"
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/call" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 1,
             "tel": "+48 888 888 888"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 6
    }
}

Make a call to all available managers in the system. If no managers are available at the moment a scheduled call will be made. You will be able to see the call information in dashboard.

Action

POST https://app.callpage.io/api/v1/external/widgets/call

Query Parameters

Parameter Type Required Description
id int true Widget identifier. You can find it in widgets tab.
tel string true A phone number which you would like to call in E.164 format. e.g. +48123123123.

Call or Schedule

Example request:

POST /api/v1/external/widgets/call-or-schedule HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 1,
    "tel": "+48 888 888 888"
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/call-or-schedule" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 1,
             "tel": "+48 888 888 888"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 7
    }
}

Make a call to all available managers in the system. If no managers are available at the moment a scheduled call on the first available slot will be made. You will be able to see the call information in dashboard.

Action

POST https://app.callpage.io/api/v1/external/widgets/call-or-schedule

Query Parameters

Parameter Type Required Description
id int true Widget identifier. You can find it in widgets tab.
tel string true A phone number which you would like to call in E.164 format. e.g. +48123123123.

Create Widget

Example request:

POST /api/v1/external/widgets/create HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "url": "http://test.com",
    "description": "Test Widget",
    "locale_code": "pl"
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/create" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "url": "http://test.com",
             "description": "Test Widget",
             "locale_code": "pl"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 3409
    }
}

Create a widget, add manager and return new widget’s id.

Action

POST https://app.callpage.io/api/v1/external/widgets/create

Query Parameters

Parameter Type Required Description Default
url string true Website URL where widget will be installed e.g.: https://callpage.io
description string false Description for widget. Created from REST API. Timestamp: {timestamp}
locale_code string false Widget language. en

Update Widget

Example request:

POST /api/v1/external/widgets/update HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 3409,
    "url": "http://test.com",
    "description": "Test Widget",
    "locale_code": "en"
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/update" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 3409,
             "url": "http://test.com",
             "description": "Test Widget",
             "locale_code": "en"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 3409
    }
}

Update a widget. This method allows to edit widget’s settings as well.

Action

POST https://app.callpage.io/api/v1/external/widgets/update

Query Parameters

Parameter Type Required Description Default
id int true Widget identifier. You can find it in widgets tab.
url string true Website URL where widget will be installed e.g.: https://callpage.io
description string false Description for widget. Created from REST API. Timestamp: {timestamp}
settings array false Widget settings.
locale_code string false Widget language. en

Delete Widget

Example request:

POST /api/v1/external/widgets/delete HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 3409
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/delete" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 3409
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": null
}

Delete widget by id.

Action

POST https://app.callpage.io/api/v1/external/widgets/delete

Query Parameters

Parameter Type Required Description
id int true Widget identifier. You can find it in widgets tab.

Add Users

Example request:

POST /api/v1/external/widgets/add-users HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "id": 3,
    "user_id": [2, 3],
    "business_times": [
        [
             {
                 "day_of_week": 0,
                 "enabled": false,
                 "start_time": null,
                 "end_time": null
             },
             {
                 "day_of_week": 1,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 2,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 3,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 4,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 5,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 6,
                 "enabled": false,
                 "start_time": null,
                 "end_time": null
             }
        ],
        [
             {
                 "day_of_week": 0,
                 "enabled": false,
                 "start_time": null,
                 "end_time": null
             },
             {
                 "day_of_week": 1,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 2,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 3,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 4,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 5,
                 "enabled": true,
                 "start_time": "09:00",
                 "end_time": "17:00"
             },
             {
                 "day_of_week": 6,
                 "enabled": false,
                 "start_time": null,
                 "end_time": null
             }
        ]
    ]
}
curl -X POST "https://app.callpage.io/api/v1/external/widgets/add-users" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "id": 3,
             "user_id": [2, 3],
             "business_times": [
                 [
                     {
                         "day_of_week": 0,
                         "enabled": false,
                         "start_time": null,
                         "end_time": null
                     },
                     {
                         "day_of_week": 1,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 2,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 3,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 4,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 5,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 6,
                         "enabled": false,
                         "start_time": null,
                         "end_time": null
                     }
                 ],
                 [
                     {
                         "day_of_week": 0,
                         "enabled": false,
                         "start_time": null,
                         "end_time": null
                     },
                     {
                         "day_of_week": 1,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 2,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 3,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 4,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 5,
                         "enabled": true,
                         "start_time": "09:00",
                         "end_time": "17:00"
                     },
                     {
                         "day_of_week": 6,
                         "enabled": false,
                         "start_time": null,
                         "end_time": null
                     }
                 ]
             ]
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "user_id" : 2,
            "manager_id": 3
        },
        {
            "user_id" : 4,
            "manager_id": 4
        }
    ]
}

Add users to widget. This method will create a manager for each provided user_id. For user_id array there should be business_times array equal in size (in case when there is no business_times parameter provided, default value will be used instead). If the pair of user_id and widget_id returns existing manager, this manager will be updated instead.

Action

POST https://app.callpage.io/api/v1/external/widgets/add-users

Query Parameters

Parameter Type Required Description Default
id int true Widget identifier. You can find it in widgets tab.
user_id int/array true User identifier. You can find it in users tab. If only one user_id is passed this parameter can be integer, otherwise array is expected.
business_times array false Working hours of manager. Click here to retrieve more information about business_times array format. 9:00AM-5:00PM Monday-Friday

Managers

Default Business Times array:

[
  // Sunday
  [
    "day_of_week": 0,
    "enabled": 0,
    "start_time": null,
    "end_time": null,
    "timezone": "Europe/Warsaw"
  ],
  // Monday
  [
    "day_of_week": 1,
    "enabled": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "timezone": "Europe/Warsaw"
  ],
  // Tuesday
  [
    "day_of_week": 2,
    "enabled": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "timezone": "Europe/Warsaw"
  ],
  // Wednesday
  [
    "day_of_week": 3,
    "enabled": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "timezone": "Europe/Warsaw"
  ],
  // Thursday
  [
    "day_of_week": 4,
    "enabled": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "timezone": "Europe/Warsaw"
  ],
  // Friday
  [
    "day_of_week": 5,
    "enabled": 1,
    "start_time": "09:00:00",
    "end_time": "17:00:00",
    "timezone": "Europe/Warsaw"
  ],
  // Saturday
  [
    "day_of_week": 6,
    "enabled": 0,
    "start_time": null,
    "end_time": null,
    "timezone": "Europe/Warsaw"
  ]
];

To retrieve manager use combination of user_id and widget_id.

Business Times

Business Times determine the availability of your manager.

Sunday is considered to be the first day of the week.

By default timezone Europe/Warsaw is being used. To check all supported timezones click here.

Get All Managers

Example request:

GET /api/v1/external/managers/all?widget_id=1 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/managers/all?widget_id=1" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "id": 1,
            "enabled": true,
            "user": {
                "id": 1,
                "name": "Owner",
                "tel": "+48570934649",
                "email": "admin@admin.com",
                "avatar": null
            },
            "departments": [
                {
                    "id": 1,
                    "name": "Sales"
                },
                {
                    "id": 2,
                    "name": "Tech"
                }
            ],
            "business_times": [
                {
                    "day_of_week": 0,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                },
                {
                    "day_of_week": 1,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 2,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 3,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 4,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 5,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 6,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                }
            ]
        },
        {
            "id": 22,
            "enabled": true,
            "user": {
                "id": 4,
                "name": "Admin",
                "tel": "+48570934649",
                "email": "admin@callpage.io",
                "avatar": null
            },
            "departments": [],
            "business_times": [
                {
                    "day_of_week": 0,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                },
                {
                    "day_of_week": 1,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 2,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 3,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 4,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 5,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 6,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                }
            ]
        },
        {
            "id": 24,
            "enabled": true,
            "user": {
                "id": 3,
                "name": "Manager2",
                "tel": "+48570934649",
                "email": "manager2@callpage.io",
                "avatar": null
            },
            "departments": [],
            "business_times": [
                {
                    "day_of_week": 0,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                },
                {
                    "day_of_week": 1,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 2,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 3,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 4,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 5,
                    "enabled": true,
                    "timezone": "Europe\/Warsaw",
                    "start_time": "09:00:00",
                    "end_time": "17:00:00"
                },
                {
                    "day_of_week": 6,
                    "enabled": false,
                    "timezone": "Europe\/Warsaw",
                    "start_time": null,
                    "end_time": null
                }
            ]
        }
    ],
    "meta": {
        "offset": 0,
        "limit": 100,
        "count": 3
    }
}

Get managers for widget.

Action

GET https://app.callpage.io/api/v1/external/managers/all

Query Parameters

Parameter Type Required Description Default
widget_id int true Widget identifier. You can find it in widgets tab.
offset int false If set, the result will be offset by this value. 0
limit int false If set, the result will be limited. 100

Get Manager

Example request:

GET /api/v1/external/managers/get?widget_id=1&user_id=2 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/managers/get?widget_id=1&user_id=2" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 23,
        "enabled": true,
        "user": {
            "id": 2,
            "name": "Manager1",
            "tel": "+48570934649",
            "email": "manager1@callpage.io",
            "avatar": null
        },
        "departments": [],
        "business_times": [
            {
                "day_of_week": 0,
                "enabled": false,
                "timezone": "Europe\/Warsaw",
                "start_time": null,
                "end_time": null
            },
            {
                "day_of_week": 1,
                "enabled": true,
                "timezone": "Europe\/Warsaw",
                "start_time": "09:00:00",
                "end_time": "17:00:00"
            },
            {
                "day_of_week": 2,
                "enabled": true,
                "timezone": "Europe\/Warsaw",
                "start_time": "09:00:00",
                "end_time": "17:00:00"
            },
            {
                "day_of_week": 3,
                "enabled": true,
                "timezone": "Europe\/Warsaw",
                "start_time": "09:00:00",
                "end_time": "17:00:00"
            },
            {
                "day_of_week": 4,
                "enabled": true,
                "timezone": "Europe\/Warsaw",
                "start_time": "09:00:00",
                "end_time": "17:00:00"
            },
            {
                "day_of_week": 5,
                "enabled": true,
                "timezone": "Europe\/Warsaw",
                "start_time": "09:00:00",
                "end_time": "17:00:00"
            },
            {
                "day_of_week": 6,
                "enabled": false,
                "timezone": "Europe\/Warsaw",
                "start_time": null,
                "end_time": null
            }
        ]
    },
    "meta": []
}

Get manager by user_id and widget_id.

Action

GET https://app.callpage.io/api/v1/external/managers/get

Query Parameters

Parameter Type Required Description
user_id int true User identifier. You can find it in users tab.
widget_id int true Widget identifier. You can find it in widgets tab.

Create Manager

Example request:

POST /api/v1/external/managers/create HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "user_id": 3,
    "widget_id": 3,
    "enabled": true,
    "business_times": [
        {
            "day_of_week": 0,
            "enabled": false,
            "start_time": null,
            "end_time": null
        },
        {
            "day_of_week": 1,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 2,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 3,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 4,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 5,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 6,
            "enabled": false,
            "start_time": null,
            "end_time": null
        }
    ]
}
curl -X POST "https://app.callpage.io/api/v1/external/managers/create" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "user_id": 3,
             "widget_id": 3,
             "enabled": true,
             "business_times": [
                 {
                     "day_of_week": 0,
                     "enabled": false,
                     "start_time": null,
                     "end_time": null
                 },
                 {
                     "day_of_week": 1,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 2,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 3,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 4,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 5,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 6,
                     "enabled": false,
                     "start_time": null,
                     "end_time": null
                 }
             ]
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 21
    }
}

Create manager.

Action

POST https://app.callpage.io/api/v1/external/managers/create

Query Parameters

Parameter Type Required Description Default
user_id int true User identifier. You can find it in users tab.
widget_id int true Widget identifier. You can find it in widgets tab.
enabled boolean true Indicates whether to call to the manager or not. true
business_times array false Manager’s working hours. Click here to retrieve more information about business_times array format. 9:00AM-5:00PM Monday-Friday

Update Manager

Example request:

POST /api/v1/external/managers/update HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "user_id": 3,
    "widget_id": 3,
    "enabled": true,
    "business_times": [
        {
            "day_of_week": 0,
            "enabled": false,
            "start_time": null,
            "end_time": null
        },
        {
            "day_of_week": 1,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 2,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 3,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 4,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 5,
            "enabled": true,
            "start_time": "09:00",
            "end_time": "17:00"
        },
        {
            "day_of_week": 6,
            "enabled": false,
            "start_time": null,
            "end_time": null
        }
    ]
}
curl -X POST "https://app.callpage.io/api/v1/external/managers/update" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "user_id": 3,
             "widget_id": 3,
             "enabled": true,
             "business_times": [
                 {
                     "day_of_week": 0,
                     "enabled": false,
                     "start_time": null,
                     "end_time": null
                 },
                 {
                     "day_of_week": 1,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 2,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 3,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 4,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 5,
                     "enabled": true,
                     "start_time": "09:00",
                     "end_time": "17:00"
                 },
                 {
                     "day_of_week": 6,
                     "enabled": false,
                     "start_time": null,
                     "end_time": null
                 }
             ]
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 21
    }
}

Update manager.

Action

POST https://app.callpage.io/api/v1/external/managers/update

Query Parameters

Parameter Type Required Description Default
user_id int true User identifier. You can find it in users tab.
widget_id int true Widget identifier. You can find it in widgets tab.
enabled boolean true Indicates whether to call to the manager or not. true
business_times array false Manager’s working hours. Click here to retrieve more information about business_times array format. 9:00AM-5:00PM Monday-Friday

Delete Manager

Example request:

POST /api/v1/external/managers/delete HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "user_id": 3,
    "widget_id": 3,
}
curl -X POST "https://app.callpage.io/api/v1/external/managers/delete" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "user_id": 3,
             "widget_id": 3
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": null
}

Delete manager.

Action

POST https://app.callpage.io/api/v1/external/managers/delete

Query Parameters

Parameter Type Required Description
user_id int true User identifier. You can find it in users tab.
widget_id int true Widget identifier. You can find it in widgets tab.

Voice Messages

Default voice messages:

manager.call


visitor.call

Voice message is a message that is played in certain situations during a call. Currently there are two messages that are allowed to be customized by the user: manager.call and visitor.call.

Voice Message Identifiers

Message Identifier Description
manager.call A greeting message for manager when one pick ups a phone.
visitor.call A greeting message for visitor.

Language Support

If there are no custom messages set, Callpage provides default ones in both Polish and English. Because the voice messages are attached to the widget, the language of voice message is determined by locale of the widget.

Get All Voice Messages

Example request:

GET /api/v1/external/voice/all?widget_id=1 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/voice/all?widget_id=1" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "enabled": true,
            "message_id": "manager.call",
            "updated_at": null,
            "recording": {
                "full_url": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/manager.call.mp3"
            }
        },
        {
            "enabled": false,
            "message_id": "visitor.call",
            "updated_at": null,
            "recording": {
                "full_url": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/visitor.call.mp3"
            }
        }
    ]
}

Get voice messages. If no custom voice messages are created this method will return the default ones.

Action

GET https://app.callpage.io/api/v1/external/voice/all

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.

Create Voice Message

Example request:

POST /api/v1/external/voice/create HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "manager.call",
    "enabled": true,
    "file": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/manager.call.mp3"
}
curl -X POST "https://app.callpage.io/api/v1/external/voice/create" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "manager.call",
             "enabled": true,
             "file": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/manager.call.mp3"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 37
    }
}

Create custom voice message.

The file parameter should contain the valid URL with file. This file should meet the following conditions:

Action

POST https://app.callpage.io/api/v1/external/voice/create

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string true Allowed message identifiers are listed here.
enabled boolean true Indicates whether the message should be enabled or not.
file url false File with audio recording.

Update Voice Message

Example request:

POST /api/v1/external/voice/update HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "manager.call",
    "enabled": true,
    "file": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/manager.call.mp3"
}
curl -X POST "https://app.callpage.io/api/v1/external/voice/update" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "manager.call",
             "enabled": true,
             "file": "https://app.callpage.io/plugins/thbsolutions/voip/assets/sounds/en/manager.call.mp3"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 37
    }
}

Update existing custom voice message. It is impossible to update default message – if you did not create custom message yet use this endpoint.

The file parameter should contain the valid URL with file. This file should meet the following conditions:

Action

POST https://app.callpage.io/api/v1/external/voice/update

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string true Allowed message identifiers are listed here.
enabled boolean true Indicates whether the message should be enabled or not.
file url false File with audio recording.

Reset Voice Message

Example request:

POST /api/v1/external/voice/reset HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "manager.call"
}
curl -X POST "https://app.callpage.io/api/v1/external/voice/reset" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "manager.call"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": null
}

Reset custom voice message. If no message_id is provided this method will reset all voice messages to default ones.

Action

POST https://app.callpage.io/api/v1/external/voice/reset

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string false Allowed message identifiers are listed here.

SMSs

Default SMS messages:

visitor.dial-completed

Thank you for contacting us on website :url

Your manager: :name
Tel.: :tel

Have a nice day, :company_name team

visitor.call-scheduled

Hi, dear customer!

Recently, you ordered a call from website :url. You will receive a call from a representative in 5 minutes.

Have a nice day, :company_name team

manager.call-completed

Hi, :name!

Thank you for conversation with a potential customer.
For further contact:
Tel.: :tel

Have a nice day, :company_name team

user.missed-call-complaint

Hi, :name!

Your managers missed a call from visitor on :url.
It will be great if you could solve this issue ASAP.
Tel.: :tel

Have a nice day, :company_name team

Custom SMS is a message that is sent in certain situations. Currently there are few messages that are allowed to be customized by the user: visitor.dial-completed, visitor.call-scheduled, manager.call-completed and user.missed-call-complaint.

Message Identifiers

Message Identifier Description
visitor.dial-completed A message with manager’s contact details is sent to the visitor after the conversation is successfully completed.
visitor.call-scheduled A message is sent to the visitor several minutes before a scheduled call to remind user about conversation.
manager.call-completed A message with visitor’s contact details is sent to the manager after the successful conversation.
user.missed-call-complaint A message with visitor’s contact details is sent to the report number when the call is missed.

Message Variables

Message variables can be use to provide more information and for further personalization of your SMS. These variables will be substituted with proper values depending on the message that is being sent.

Variable Description
:company_name Company name.
:name Manager’s name.
:tel Manager’s/visitor’s phone number.
:url Widget’s website URL.

Language Support

If there are no custom messages set, Callpage provides default ones in the following languages:

Get All SMSs

Example request:

GET /api/v1/external/sms/all?widget_id=1 HTTP/1.1

Accept: application/json
Authorization: xxxxxxxxxxxx
curl -X GET "https://app.callpage.io/api/v1/external/sms/all?widget_id=1" \
     -H "Accept: application/json" \
     -H "Authorization: xxxxxxxxxxxx"

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": [
        {
            "enabled": 1,
            "message_id": "visitor.dial-completed",
            "text": "Thank you for contacting us on website :url\n\nYour manager: :name\nTel.: :tel\n\nHave a nice day, :company_name team",
            "updated_at": null
        },
        {
            "enabled": 1,
            "message_id": "visitor.call-scheduled",
            "text": "Hi, dear customer!\n\nRecently, you ordered a call from website :url. You will receive a call from a representative in 5 minutes.\n\nHave a nice day, :company_name team",
            "updated_at": null
        },
        {
            "enabled": 1,
            "message_id": "manager.call-completed",
            "text": "Hi, :name!\n\nThank you for conversation with a potential customer.\nFor further contact:\nTel.: :tel\n\nHave a nice day, :company_name team",
            "updated_at": null
        },
        {
            "enabled": 1,
            "message_id": "user.missed-call-complaint",
            "text": "Hi, :name!\n\nYour managers missed a call from visitor on :url.\nIt will be great if you could solve this issue ASAP.\nTel.: :tel\n\nHave a nice day, :company_name team",
            "updated_at": null
        }
    ]
}

Action

GET https://app.callpage.io/api/v1/external/sms/all

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.

Create SMS

Example request:

POST /api/v1/external/sms/create HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "user.missed-call-complaint",
    "enabled": true,
    "text": "Hi, :name!\n\nYour managers missed a call from visitor on :url.\nIt will be great if you could solve this issue ASAP.\nTel.: :tel\n\nHave a nice day, :company_name team"
}
curl -X POST "https://app.callpage.io/api/v1/external/sms/create" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "user.missed-call-complaint",
             "enabled": true,
             "text": "Hi, :name!\n\nYour managers missed a call from visitor on :url.\nIt will be great if you could solve this issue ASAP.\nTel.: :tel\n\nHave a nice day, :company_name team"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 49
    }
}

Create custom SMS.

Action

POST https://app.callpage.io/api/v1/external/sms/create

Query Parameters

Parameter Type Required Description Default
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string true Allowed message identifiers are listed here.
enabled boolean false Indicates whether the message should be enabled or not. true
text url true SMS text. It can not be longer than 240 characters. You are allowed to use message variables.

Update SMS

Example request:

POST /api/v1/external/sms/update HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "user.missed-call-complaint",
    "enabled": true,
    "text": "Hi, :name!\n\nYour managers missed a call from visitor on :url.\nIt will be great if you could solve this issue ASAP.\nTel.: :tel\n\nHave a nice day, :company_name team"
}
curl -X POST "https://app.callpage.io/api/v1/external/sms/update" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "user.missed-call-complaint",
             "enabled": true,
             "text": "Hi, :name!\n\nYour managers missed a call from visitor on :url.\nIt will be great if you could solve this issue ASAP.\nTel.: :tel\n\nHave a nice day, :company_name team"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": {
        "id": 49
    }
}

Update custom SMS. It is impossible to update default SMS – if you did not create custom SMS yet use this endpoint.

Action

POST https://app.callpage.io/api/v1/external/sms/update

Query Parameters

Parameter Type Required Description Default
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string true Allowed message identifiers are listed here.
enabled boolean false Indicates whether the message should be enabled or not. true
text url true SMS text. It can not be longer than 240 characters. You are allowed to use message variables.

Reset SMS

Example request:

POST /api/v1/external/sms/reset HTTP/1.1

Accept: application/json
Content-Type: application/json
Authorization: xxxxxxxxxxxx

{
    "widget_id": 3,
    "message_id": "user.missed-call-complaint"
}
curl -X POST "https://app.callpage.io/api/v1/external/sms/reset" \
     -H "Accept: application/json" \
     -H "Content-Type: application/json" \
     -H "Authorization: xxxxxxxxxxxx" \
     -d '{
             "widget_id": 3,
             "message_id": "user.missed-call-complaint"
         }'

Response:

{
    "hasError": false,
    "errorCode": 0,
    "message": "",
    "data": null
}

Reset SMS. If no message_id is provided this method will reset all SMSs to default ones.

Action

POST https://app.callpage.io/api/v1/external/sms/reset

Query Parameters

Parameter Type Required Description
widget_id int true Widget identifier. You can find it in widgets tab.
message_id string false Allowed message identifiers are listed here.

HTTP Status Codes

The Callpage API uses the following HTTP status codes:

Code Meaning
200 OK – Your request was processed sucessfully.
401 Unauthorized – Your API key is incorrect.
403 Forbidden – You do not have access to this resource.
404 Not Found – The specified kitten could not be found.
422 Unprocessable entity – Check errorCode and message fields in response data for more information.
500 Internal Server Error – We had a problem with our server or an application error occured. Try again later.
503 Service Unavailable – We’re temporarially offline for maintanance. Please try again later.

Webhooks

Usage

Every time an event occurs in our system, we could notify you about this using outgoing webhooks. All you need is a simple web server that allows to receive incoming POST requests and is able to parse JSON in order to read data.

Example of SSH tunnel using ngrok:

ngrok http 80

Example of simple web server in NodeJS:

var http = require('http');

var server = http.createServer(function (req, res) {
  res.end('ok');
});

server.listen(80);

Outgoing webhook is one of many available integrations. Integrations at Callpage are tied to specific widget.

Creating Outgoing Webhook

In order to create new outgoing webhook head over to widgets tab in Callpage Dashboard. Next, you have to select widget. Select Edit widget, after that you should have Integrations tab in options where you can create new integrations.

Events

Here is the complete list of events which are available using webhooks.

Key Description
call.scheduled Call was scheduled by your customer.
call.new Call was ordered immediately.
call.missed Call from your customer was missed, because there were no available managers.
call.completed Call was successfully completed.
data.added Your customer left you some additional feedback and information about the call.

Events lifetime

The events lifetime looks more or less like this:

call.scheduled/call.new -> call.missed/call.completed -> data.added

First of all the call.scheduled or call.new may be fired depends of what visitor requested. In case of call.new, after that, depending on the circumstances, either call.missed or call.completed is fired. If fired event is call.completed you may expect additional feedback from your customer (data.added event fired).

call.scheduled

Payload:

{
    "data": {
        "event": "call.scheduled",
        "id": 3419,
        "status": "scheduled",
        "ref_id": null,
        "to": "+48888888769",
        "widget_id": 3,
        "created_at": "2016-09-08 13:32:54",
        "scheduled_at": "2016-09-08 14:30:00",
        "request": null,
        "fields": null
    }
}

This event is fired when a call was scheduled by your customer.

Possible statuses:

call.new

Payload:

{
    "data": {
        "event": "call.new",
        "id": 3419,
        "status": "new",
        "ref_id": null,
        "to": "+48888888769",
        "widget_id": 3,
        "created_at": "2016-09-08 13:32:54",
        "scheduled_at": null,
        "request": null,
        "fields": null
    }
}

This event is fired when a call was requested by your customer.

call.missed

Payload:

{
    "data": {
        "event": "call.missed",
        "id": 3419,
        "status": "manager-failed",
        "ref_id": null,
        "to": "+48888888769",
        "widget_id": 3,
        "created_at": "2016-09-08 13:32:54",
        "scheduled_at": null,
        "request": null,
        "call_attempts_count": 3,
        "fields": null
    }
}

This event is fired when a call was missed by your customer or your managers.

Possible statuses:

call.completed

Payload:

{
    "data": {
        "event": "call.completed",
        "id": 3419,
        "status": "completed",
        "ref_id": null,
        "to": "+48888888769",
        "widget_id": 3,
        "created_at": "2016-09-08 13:32:54",
        "scheduled_at": null,
        "request": null,
        "call": {
            "direction": "ab",
            "queued_at": "2016-09-08 13:33:03",
            "started_at": "2016-09-08 13:33:25",
            "dialed_at_a": "2016-09-08 13:33:17",
            "dialed_at_b": "2016-09-08 13:33:21",
            "answered_at_a": "2016-09-08 13:33:22",
            "answered_at_b": "2016-09-08 13:33:25",
            "ended_at_a": "2016-09-08 13:37:33",
            "ended_at_b": "2016-09-08 13:37:25",
            "dialed_time_a": "14",
            "answered_time_a": "5",
            "dialed_time_b": "18",
            "answered_time_b": "4",
            "billing_time": "248",
            "recording": null
        },
        "call_attempt": {
            "manager": {
                "id": 4,
                "name": "Admin",
                "tel": "+48570934649",
                "email": "admin@callpage.io"
            }
        },
        "call_attempts_count": 1,
        "fields": null
    }
}

This event is fired when a call was successfully completed.

data.added

Payload:

{
    "data": {
        "event": "data.added",
        "id": 3419,
        "status": "completed",
        "ref_id": null,
        "to": "+48888888769",
        "email": "happy@customer.com",
        "widget_id": 3,
        "created_at": "2016-09-08 13:32:54",
        "scheduled_at": null,
        "request": null,
        "call": {
            "direction": "ab",
            "queued_at": "2016-09-08 13:33:03",
            "started_at": "2016-09-08 13:33:25",
            "dialed_at_a": "2016-09-08 13:33:17",
            "dialed_at_b": "2016-09-08 13:33:21",
            "answered_at_a": "2016-09-08 13:33:22",
            "answered_at_b": "2016-09-08 13:33:25",
            "ended_at_a": "2016-09-08 13:37:33",
            "ended_at_b": "2016-09-08 13:37:25",
            "dialed_time_a": "14",
            "answered_time_a": "5",
            "dialed_time_b": "18",
            "answered_time_b": "4",
            "billing_time": "248",
            "recording": null
        },
        "call_attempt": {
            "manager": {
                "id": 4,
                "name": "Admin",
                "tel": "+48570934649",
                "email": "admin@callpage.io"
            }
        },
        "call_attempts_count": 1,
        "fields": [
            {
                "id": 3,
                "label": "E-mail",
                "placeholder": null,
                "hint": null,
                "value": null,
                "slug": "email",
                "field_value": "customer@example.com"
            },
            {
                "id": 4,
                "label": "Your name",
                "placeholder": null,
                "hint": null,
                "value": null,
                "slug": "name",
                "field_value": "Happy Customer"
            }
        ]
    }
}

This event is fired when customer leaves additional data (such as email address and feedback) after a call.