NAV Navbar
Logo
http

Overview

This describes the resources that make up the official CrazyCall REST API. If you have any problems or requests please chat with us or send an email at support@crazycall.com - we’re there for you 24/7.

Errors

Example request:

PUT /api/v1/users/1234567/disable HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Content-Length: 20

[ "USER_NOT_EXIST" ]

CrazyCall uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that failed given the information provided (e.g., a required parameter was omitted, a charge failed, etc.), and codes in the 5xx range indicate an error with our servers (these are rare).

Error Code Meaning
400 Bad Request – There was something wrong with your request
401 Unauthorized – Your API key is wrong
403 Forbidden – You don’t have permissions to access this resource
404 Not Found – The specified resource could not be found
405 Method Not Allowed – You tried to access data with an invalid method
406 Not Acceptable – You requested a format that isn’t json
500 Internal Server Error – We had a problem with our server. Try again later.
503 Service Unavailable – We’re temporarily offline for maintenance. Please try again later.


In addition, in response body we send an array of error codes, which describe what went wrong.

Authentication

Example of authenticated request:

GET /api/v1/path/to/resource HTTP/1.1
x-api-token: your-secret-api-key
Account: abcdef.crazycall.com
Host: api.crazycall.com

When using API, you have to authenticate your requests using an API key. You can generate one in the developer’s section of our application. It represents your account, so you should keep it secret!


Also you need to include an Account header in all your requests. You can see your account’s name in developer’s section.


Header Description
x-api-token Your secret api key generated from app.crazycall.com page
Account Your account identifier

Convention

All request parameters (query string) are optional unless stated otherwise.

Users

Every operation in CrazyCall is performed by users or on behalf of users. User can be assigned different roles, and roles can have various permissions.

Retrieve all users

Example request:

GET /api/v1/users HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 333

[ {
  "id" : 18,
  "username" : "dBRMnJybuwnJ@DdwFySQDKdUJ.com",
  "name" : "jcMYwAPwwE",
  "surname" : "WTLeoRfmVu",
  "roleId" : 18,
  "role" : "Admin",
  "enabled" : true,
  "state" : "ACTIVE"
}, {
  "id" : 2545518629370854733,
  "username" : "inviteduser@email.com",
  "roleId" : 18,
  "role" : "Admin",
  "state" : "PENDING"
} ]

You can get all users assigned to your account as list.

Response results
Path Type Description
[] Array All active users
[].id Number User’s id
[].username String User’s username (typically email)
[].name String Name given in registration
[].surname String Surname given in registration
[].roleId Number Id which identify user’s role
[].role String Role name
[].enabled Boolean Detect if user is enabled
[].state String Current user’s state



With this request you will also receive invited users. They will only have username (email to which you sent invitation), roleId, role (name of a given role) and current state (always PENDING).


User states

State Description
ACTIVE User is enabled (can make calls, counts in plan’s limit)
INACTIVE User disabled (cannot login into your account)
PENDING User was invited via email, but hasn’t registered yet

Checking user’s existence

Example request:

GET /api/v1/users/exists?email=YMNAaFywsqeP%40KOfDlXsNHJwU.com HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 21

{
  "exists" : true
}

You can easily check whether user exists by passing email.

Request parameters
Parameter Description
email (required) User’s email to check


Possible errors
Error key Description
PARAMETER.NOT_PRESENT When email was not present

Disable user

Example request:

PUT /api/v1/users/23/disable HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 181

{
  "id" : 23,
  "username" : "sIJDybeeUSQb@XIpBaUqrDdgZ.com",
  "name" : "BzoUGekkNW",
  "surname" : "UuXZHPQiPq",
  "role" : "Agent",
  "enabled" : false,
  "state" : "INACTIVE"
}

You can disable other users - they will be unable to login to your account and to make calls. In addition, they will stop counting towards your plan’s limit.

/api/v1/users/{userId}/disable

Parameter Description
userId User’s id to disable


You cannot disable youreself!


Possible errors
Error key Description
SELF_DISABLE When you try to disable yourself
USER_NOT_EXIST User with given id doesn’t exists

Enable user

Example request:

PUT /api/v1/users/20/enable HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 178

{
  "id" : 20,
  "username" : "oxMomZmXLkrN@LIJmmCxOFlmF.com",
  "name" : "vMwlXlCQVO",
  "surname" : "tzupcfOeFk",
  "role" : "Agent",
  "enabled" : true,
  "state" : "ACTIVE"
}

You can enable disabled users - they will be able to login to your account and to make calls.

/api/v1/users/{userId}/enable

Parameter Description
userId User’s id to enable


Remember that users will be counting towards your plan’s limit. If you reached limit, you will get 400 error with key
USERS.LIMIT_REACHED


Possible errors
Error key Description
USERS.LIMIT_REACHED When your plan doesn’t allow more users
USER_NOT_EXIST User with given id doesn’t exists

Number of users

Example request:

GET /api/v1/users/stats HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 62

{
  "activeCount" : 1,
  "limit" : 100,
  "pendingCount" : 5
}

You can get number of users and current user limit in your plan. Remember - you can always disable and enable them.

Response results
Path Type Description
activeCount Number Number of active users
limit Number All users limit (depends on current plan)
pendingCount Number Number of pending users (invited, but not registered)

Projects

Projects are a way to group your contacts together.

Create new project

When you want to start calling you have to have at least one active project.

Example request:

POST /api/v1/projects HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 172

{
  "name" : "RxKieNLUULa",
  "defaultImportCountry" : "US",
  "mainMsisdnId" : 4,
  "eeaMsisdnId" : 4,
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : true
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 184

{
  "id" : 3,
  "name" : "RxKieNLUULa",
  "defaultImportCountry" : "US",
  "mainMsisdnId" : 4,
  "eeaMsisdnId" : 4,
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : true
}
Request fields
Path Type Description
name String Project name to identify
mainMsisdnId Number Id of main callerid (number to be displayed to customers)
eeaMsisdnId Number Id of number to be displayed when calling EEA numbers
callerRestricted Boolean Show client your number or call anonymously
defaultImportCountry String Project’s default import prefix. This prefix will be appended to your imported numbers if they don’t have any
scriptId Number Id of script assigned to this project
photo String Project’s photo (e.g. 12.jpg)


Possible errors
Error key Description
PROJECT_NAME_EMPTY No name was passed
INVALID_DEFAULT_IMPORT_COUNTRY Country code is invalid
SCRIPT_ID_EMPTY No script was passed
SCRIPT_NAME_EXISTS Script with given name already exists
MSISDN_NOT_FOUND Main caller id was not found in your request body
MSISDN_NOT_EXISTS Cannot find msisdn with given id
PLANS_EXCEEDED Your plan doesn’t allow more projects


In response you will receive project object.

Get all projects

You will receive all your projects sorted alphabetically.

Example request:

GET /api/v1/projects HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 421

[ {
  "id" : 23,
  "name" : "extra label",
  "defaultImportCountry" : "PL",
  "mainMsisdnId" : 24,
  "eeaMsisdnId" : 24,
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : false,
  "status" : "ACTIVE"
}, {
  "id" : 22,
  "name" : "Name",
  "defaultImportCountry" : "PL",
  "mainMsisdnId" : 23,
  "eeaMsisdnId" : 23,
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : false,
  "status" : "ACTIVE"
} ]
Response results
Path Type Description
[].id Number Project’s id
[].name String Label to be displayed
[].scriptId Number Script assigned to this project
[].mainMsisdnId Number Id of main phone number from which project will be calling
[].eeaMsisdnId Number Id of main eea phone number from which project will be calling
[].callerRestricted Boolean If project’s phone number should be invisible for clients
[].defaultImportCountry String Project’s default import country. Imported numbers will be resolved as numbers from this country if they don’t have country code
[].photo String Name of project’s current photo
[].status String Project current status


Project statuses

Status Description
ACTIVE Normal state, everything is possible
INACTIVE Project doesn’t count in limit. Calling is impossible
SUSPENDED Project is suspended when 3 or more network errors occurred

Get specific project

Example request:

GET /api/v1/projects/24 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 204

{
  "id" : 24,
  "name" : "Name",
  "defaultImportCountry" : "PL",
  "mainMsisdnId" : 25,
  "eeaMsisdnId" : 25,
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : false,
  "status" : "ACTIVE"
}

You can also get information about one, specific project

/api/v1/projects/{projectId}

Parameter Description
projectId Id of project to be retrieved
Response results
Path Type Description
id Number Project’s id
name String Label to be displayed
scriptId Number Script assigned to this project
mainMsisdnId Number Id of main phone number from which project will be calling
eeaMsisdnId Number Id of main eea phone number from which project will be calling
callerRestricted Boolean If project’s phone number should be invisible for clients
defaultImportCountry String Project’s default import country. Imported numbers will be resolved as numbers from this country if they don’t have country code
photo String Name of project’s current photo
status String Project current status


Project statuses

Status Description
ACTIVE Normal state, everything is possible
INACTIVE Project doesn’t count in limit. Calling is impossible
SUSPENDED Project is suspended when 3 or more network errors occurred


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id

Delete project

Example request:

DELETE /api/v1/projects/20 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK

There is possibility do delete specific project. There is no way to retrieve deleted project, but you will be able to see basic info about it while listing all account’s projects.

/api/v1/projects/{projectId}

Parameter Description
projectId Id of project to delete


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id

Deactivate project

Example request:

PUT /api/v1/projects/2/deactivate HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 127

{
  "id" : 2,
  "name" : "Name",
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : false,
  "status" : "INACTIVE"
}

You can temporarily deactivate project. You won’t be able to make calls and it won’t count towards your current plan’s limit of projects. You will be able to activate deactivated project whenever you want, as long as it doesn’t violate your plans limits.

/api/v1/projects/{projectId}/deactivate

Parameter Description
projectId Id of project to deactivate
Response results
Path Type Description
id Number Project’s id
name String Label to be displayed
scriptId Number Script assigned to this project
callerRestricted Boolean If project’s phone number should be invisible for clients
photo String Name of project’s current photo
status String Project current status


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id

Activate project

Example request:

PUT /api/v1/projects/4/activate HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 125

{
  "id" : 4,
  "name" : "Name",
  "scriptId" : 1,
  "photo" : "1.jpg",
  "callerRestricted" : false,
  "status" : "ACTIVE"
}

You reactivate your disabled projects. But remember - your current plan must be able to handle more projects

/api/v1/projects/{projectId}/activate

Parameter Description
projectId Id of project to activate
Response results
Path Type Description
id Number Project’s id
name String Label to be displayed
scriptId Number Script assigned to this project
callerRestricted Boolean If project’s phone number should be invisible for clients
photo String Name of project’s current photo
status String Project current status


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id
PROJECTS.LIMIT_REACHED Your plan do not support more projects

Projects statistics

Example request:

GET /api/v1/projects/stats HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 34

{
  "count" : 15,
  "limit" : 30
}

Your current plan and limits. Remember that you can change this by enable / disable specific project or by upgrading your plan.

Response results
Path Type Description
count Number Number of all active projects
limit Number Projects limit (depends on the current plan)

Get contact fields

Example request:

GET /api/v1/projects/21/contact-fields HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 32

[ "UNRWagnXyoT", "hGTKodvVreo" ]

You can get contact fields

/api/v1/projects/{projectId}/contact-fields

Parameter Description
projectId Project’s id to get
Response results
Path Type Description
[] Array List containing contact fields


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id

Add contact field

Example request:

POST /api/v1/projects/25/contact-fields HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 48

{
  "name" : "RtObyCUgAMS",
  "oldName" : null
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 48

{
  "name" : "RtObyCUgAMS",
  "oldName" : null
}

You can add a contact field to project

/api/v1/projects/{projectId}/contact-fields

Parameter Description
projectId Project’s id to add new contact field to
Request fields
Path Type Description
name String (required) Contact field that will be attached to project


Possible errors
Error key Description
RESOURCE_NOT_FOUND Cannot find project with given id
CONTACT_FIELD_EXISTS Contact field with given name already exists

Contacts

Contact is a basic object representing entity that you can call to.

Get all contacts

Example request:

GET /api/v1/contacts?page=2&limit=2&modificationDateFrom=2013-05-03T20%3A30%3A40.100Z&orderModificationDate=asc HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 902

{
  "total" : 6,
  "totalPages" : 3,
  "links" : {
    "first" : "https://api.crazycall.com/api/v1/contacts",
    "prev" : "https://api.crazycall.com/api/v1/contacts?page=1",
    "next" : "https://api.crazycall.com/api/v1/contacts?page=3",
    "last" : "https://api.crazycall.com/api/v1/contacts?page=3"
  },
  "data" : [ {
    "id" : 73,
    "projectId" : 41,
    "msisdn" : "+48717221111",
    "firstName" : null,
    "lastName" : null,
    "company" : null,
    "createdAt" : "2018-06-19T13:15:30.000Z",
    "lastModificationDate" : "2018-06-19T13:15:30.281Z",
    "status" : "Open",
    "email" : null
  }, {
    "id" : 74,
    "projectId" : 41,
    "msisdn" : "+33980091888",
    "firstName" : null,
    "lastName" : null,
    "company" : null,
    "createdAt" : "2018-06-19T13:15:30.000Z",
    "lastModificationDate" : "2018-06-19T13:15:30.333Z",
    "status" : "Open",
    "email" : null
  } ]
}

Returns paginated list of contacts imported to the application.

Request parameters
Parameter Description
page Page number to be returned. Default of 1
limit Returned page will consist of that many elements or default of 100, whichever is lower
orderModificationDate Sorting applied to result, using contact’s last modification date. Either asc or desc, default asc
modificationDateFrom Filter result to only records newer or equal to given date. (e.g. 2013-05-03T20:30:40.100Z)


Response results
Path Type Description
total Number Total elements count returned by the query
totalPages Number Total pages count
links.first String API URL to first page of the data set
links.prev String API URL to prev page of the data set, or null if current is first
links.next String API URL to next page of the data set, or null if current is last
links.last String API URL to last page of the data set, or null if no data
data Array Array of contacts
data.[].id Number ID of the contact
data.[].projectId Number ID of project, that the contact belongs to
data.[].msisdn String Primary msisdn associated with the contact
data.[].firstName String FirstName associated with the contact
data.[].lastName String Last name associated with the contact
data.[].company String Company associated with the contact
data.[].email String Email associated with the contact
data.[].createdAt String Date when contact was created
data.[].lastModificationDate String Contact’s last modification date
data.[].status String Status of contact


Possible errors
Error key Description
PAGE_NUMBER_INVALID When page parameter was invalid
LIMIT_INVALID When limit parameter was invalid
ORDER_MODIFICATION_DATE_INVALID When orderModificationDate parameter was invalid
MODIFICATION_DATE_FROM_INVALID When modificationDateFrom parameter was invalid

Get contact by id

Returns specific contact

Example request:

GET /api/v1/contacts/57 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 265

{
  "id" : 57,
  "projectId" : 38,
  "msisdn" : "+14153661222",
  "firstName" : null,
  "lastName" : null,
  "company" : null,
  "createdAt" : "2018-06-19T13:15:30.000Z",
  "lastModificationDate" : "2018-06-19T13:15:29.729Z",
  "status" : "Open",
  "email" : null
}

/api/v1/contacts/{contactId}

Parameter Description
contactId Contacts’s id to get
Response results
Path Type Description
id Number ID of the contact
projectId Number ID of project, that the contact belongs to
msisdn String Primary msisdn associated with the contact
firstName String FirstName associated with the contact
lastName String Last name associated with the contact
company String Company associated with the contact
email String Email associated with the contact
createdAt String Date when contact was created
lastModificationDate String Contact’s last modification date
status String Status of contact


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Edit contact by id

Edits contact by id.

Example request:

POST /api/v1/contacts/28 HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 239

{
  "id" : null,
  "projectId" : null,
  "msisdn" : null,
  "firstName" : "Jeo",
  "lastName" : "Doe",
  "company" : "email@emai.com",
  "createdAt" : null,
  "lastModificationDate" : null,
  "status" : null,
  "email" : "email@emai.com"
}

/api/v1/contacts/{contactId}

Parameter Description
contactId Contacts’s id which details will be updated
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 265

{
  "id" : 28,
  "projectId" : 31,
  "msisdn" : "+14153661222",
  "firstName" : null,
  "lastName" : null,
  "company" : null,
  "createdAt" : "2018-06-19T13:15:28.000Z",
  "lastModificationDate" : "2018-06-19T13:15:28.362Z",
  "status" : "Open",
  "email" : null
}
Response results
Path Type Description
id Number id of contact
projectId Number projectId of contact
msisdn String Msisdn of contact
createdAt String Creation date of contact
status String status of contact
firstName String Updated first name of contact
lastName String Updated last Name of contact
company String Updated company of contact
email String Updated email of contact
lastModificationDate String date of last modification


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exisit

Delete contact

Deletes contact with given id. Keep in mind that contact state may prevent it from deletion, e.g. when it is in the calling state.

Example request:

DELETE /api/v1/contacts/29 HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

/api/v1/contacts/{contactId}

Parameter Description
contactId Contacts’s id to delete
Example response:

HTTP/1.1 200 OK


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist
CANNOT_DELETE_CONTACT When it is forbidden to delete given contact, e.g. it is in call state

Close contact

Closes contact with given id. Keep in mind that contact state may prevent it from closing, e.g. when it is in the calling state or it’s already closed.

Example request:

POST /api/v1/contacts/77/close HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

/api/v1/contacts/{contactId}/close

Parameter Description
contactId Contacts’s id to close
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 267

{
  "id" : 77,
  "projectId" : 42,
  "msisdn" : "+14153661222",
  "firstName" : null,
  "lastName" : null,
  "company" : null,
  "createdAt" : "2018-06-19T13:15:30.499Z",
  "lastModificationDate" : "2018-06-19T13:15:30.531Z",
  "status" : "Closed",
  "email" : null
}
Response results
Path Type Description
id Number ID of the contact
projectId Number ID of project, that the contact belongs to
msisdn String Primary msisdn associated with the contact
firstName String FirstName associated with the contact
lastName String Last name associated with the contact
company String Company associated with the contact
email String Email associated with the contact
createdAt String Date when contact was created
lastModificationDate String Contact’s last modification date
status String Status of contact


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist
CANNOT_CLOSE_CONTACT When contact is in call state or is closed

Open contact

Opens contact with given id. You can only open contacts that are closed or not verified.

Example request:

POST /api/v1/contacts/55/open HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

/api/v1/contacts/{contactId}/open

Parameter Description
contactId Contacts’s id to open
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 265

{
  "id" : 55,
  "projectId" : 37,
  "msisdn" : "+14153661222",
  "firstName" : null,
  "lastName" : null,
  "company" : null,
  "createdAt" : "2018-06-19T13:15:29.580Z",
  "lastModificationDate" : "2018-06-19T13:15:29.623Z",
  "status" : "Open",
  "email" : null
}
Response results
Path Type Description
id Number ID of the contact
projectId Number ID of project, that the contact belongs to
msisdn String Primary msisdn associated with the contact
firstName String FirstName associated with the contact
lastName String Last name associated with the contact
company String Company associated with the contact
email String Email associated with the contact
createdAt String Date when contact was created
lastModificationDate String Contact’s last modification date
status String Status of contact


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist
CANNOT_OPEN_CONTACT When contact is not in “closed” or “not verified” state

Get contact details

Returns detailed information about contact. Contact details are irregular structure so they are represented as JSON.

Example request:

GET /api/v1/contacts/43/details HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42

{
  "gender": "male",
  "country": "USA"
}


When your contact have detailed information like gender and country then the json will look like this :
{ "gender":"male", "country":"USA" }

/api/v1/contacts/{contactId}/details

Parameter Description
contactId Contacts’s id to get


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Add and update contact details

Example request:

POST /api/v1/contacts/15/details HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 42

{
  "surname" : "doe",
  "name" : "john"
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 82

{
  "gender": "male",
  "country": "USA",
  "surname" : "doe",
  "name" : "john"
}

Method updates additional information in contact. JSON with key and value should be provided in post body to update values. If keys provided in JSON body existed before, they are updated with new values. If they didn’t exist, they are added to the existing document.

/api/v1/contacts/{contactId}/details

Parameter Description
contactId Contacts’s id which details will be edited


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Edit contact details

Example request:

PUT /api/v1/contacts/32/details HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 42

{
  "surname" : "doe",
  "name" : "john"
}

Methods edits information in contact detail. JSON with key and value, which exist in details should be send in post body to edit. If provided elements do not appear in existing element, system won’t include them.

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 82

{
  "gender": "male",
  "country": "USA",
  "surname" : "doe",
  "name" : "john"
}

/api/v1/contacts/{contactId}/details

Parameter Description
contactId Contacts’s id which details will be updated


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Import contact

You can import contact to project

Example request:

POST /api/v1/contacts HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 642

{
  "projectId" : 39,
  "mainMsisdnColumnName" : "mainMsisdnColumnName",
  "firstNameColumnName" : "firstNameColumnName",
  "lastNameColumnName" : "lastNameColumnName",
  "emailColumnName" : "emailColumnName",
  "companyColumnName" : "companyColumnName",
  "alternativeMsisdnColumnNames" : [ "alternativeMsisdnColumnName" ],
  "details" : {
    "lastNameColumnName" : "Lastname",
    "emailColumnName" : "test@crazycall.com",
    "mainMsisdnColumnName" : "+14153661222",
    "alternativeMsisdnColumnName" : "+48717221111",
    "companyColumnName" : "Company name",
    "firstNameColumnName" : "Firstname",
    "plainColumnName" : "test"
  }
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 304

{
  "id" : 68,
  "projectId" : 39,
  "msisdn" : "+14153661222",
  "firstName" : "Firstname",
  "lastName" : "Lastname",
  "company" : "Company name",
  "createdAt" : "2018-06-19T13:15:30.000Z",
  "lastModificationDate" : "2018-06-19T13:15:30.030Z",
  "status" : "Open",
  "email" : "test@crazycall.com"
}
Request fields
Path Type Description
projectId Number Contact will be added to that project
mainMsisdnColumnName String Name of main msisdn column
firstNameColumnName String Name of first name column
lastNameColumnName String Name of last name column
emailColumnName String Name of email column
companyColumnName String Name of company column
alternativeMsisdnColumnNames Array Names of alternative msisdn columns
details Object Data to be imported
Response results
Path Type Description
id Number ID of the contact
projectId Number ID of project, that the contact belongs to
msisdn String Primary msisdn associated with the contact
firstName String FirstName associated with the contact
lastName String Last name associated with the contact
company String Company associated with the contact
email String Email associated with the contact
createdAt String Date when contact was created
lastModificationDate String Contact’s last modification date
status String Status of contact


Possible errors
Error key Description
PROJECT_ID_EMPTY No project’s id was passed
PROJECT_NOT_EXIST Project with given id does not exist
DETAILS_EMPTY No data was passed
MAIN_MSISDN_EMPTY No main msisdn was passed
MAIN_MSISDN_NOT_EXIST Column with given main msisdn does not exist

Contact history

You can get contact history

Example request:

GET /api/v1/contacts/3/history HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

/api/v1/contacts/{contactId}/history

Parameter Description
contactId Contacts’s id to get
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 408

[ {
  "id" : 14,
  "contactId" : 3,
  "createdAt" : "2018-06-19T13:15:27.496+00:00",
  "type" : "NOTE",
  "name" : "zxbjCzlkhK",
  "surname" : "UGuyWzdShP",
  "recordingAvailable" : false,
  "note" : "test"
}, {
  "id" : 3,
  "contactId" : 3,
  "createdAt" : "2018-06-19T13:15:27.285+00:00",
  "type" : "IMPORT_CONTACT",
  "name" : "zxbjCzlkhK",
  "surname" : "UGuyWzdShP",
  "recordingAvailable" : false
} ]
Response results
Path Type Description
[].id Number Contact event id
[].contactId Number Contact id
[].createdAt String Date when event was created
[].type String Type describing what happened with contact
[].customStatus String Custom status set by agent
[].clientMsisdn String Client phone number
[].historicalCallerId String Number that contact was called from
[].labelCallerId String historicalCallerId label
[].callId Number Id of call connected with event
[].callLength Number Length of call connected with event
[].name String Agent name
[].surname String Agent surname
[].newMsisdn String If number was changed it will be new number added to contact
[].oldMsisdn String If number was changed it will be old number added to contact
[].recordingAvailable Boolean Indicates if call recording is ready to download
[].note String Note added to contact


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Add note

You can add note to contact

/api/v1/contacts/{contactId}/note

Parameter Description
contactId Contacts’s id that this note was created for.
Example request:

POST /api/v1/contacts/26/note HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 21

{
  "note" : "Note"
}
Request fields
Path Type Description
note String Contents of note
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 303

{
  "contactId" : 26,
  "primaryMsisdn" : "+14153661222",
  "alternativeMsisdns" : [ "+14153661222" ],
  "emails" : [ ],
  "status" : "OPEN",
  "lock" : "NO_LOCK",
  "lastModificationDate" : "2018-06-19T13:15:28.235Z",
  "createdAt" : "2018-06-19T13:15:28.202Z",
  "createdBy" : 30,
  "origin" : "API"
}
Response results
Path Type Description
contactId Number Id of the contact
primaryMsisdn String Primary msisdn of the contact
alternativeMsisdns Array Alternative msisdns of the contact (incl. primary)
emails Array List of emails associated with returned contact
status String Contact’s status
lock String Lock type, possible locks: NO_LOCK, IN_QUEUE_APP, CALLING, UPDATE_LOCK
lastModificationDate String Last modification date
createdAt String Contact’s creation date
createdBy Number Id of User who created the contact
origin String Contact’s origin


Possible errors
Error key Description
NOTE_EMPTY No note was passed
USER_NOT_EXIST User with given email does not exist

Get primary msisdn of specific contact

Returns primary msisdn of specific contact.

Example request:

GET /api/v1/contacts/79/primary-msisdn HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 31

{
  "msisdn" : "+14153661222"
}

/api/v1/contacts/{contactId}/primary-msisdn

Parameter Description
contactId Contacts’s id to get
Response results
Path Type Description
msisdn String Current primary msisdn


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Add new primary msisdn

Add a new number to an existing contact and set it as primary number.

Example request:

POST /api/v1/contacts/31/primary-msisdn HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 30

{
  "msisdn" : "+6499519999"
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 30

{
  "msisdn" : "+6499519999"
}

/api/v1/contacts/{contactId}/primary-msisdn

Parameter Description
contactId Contacts’s id to add new main number


You must set new msisdn as request body. Remember that number can’t exist in any contact in the same project. Valid msisdn has format: [optional '+' or '00'][country code][actual number], e.g. all of these are valid 14153661222, +14153661222, 0014153661222

Request fields
Path Type Description
msisdn String Valid phone number which will be contact’s number
Response results
Path Type Description
msisdn String Current primary msisdn


Possible errors
Error key Description
MSISDN_EXISTS_IN_PROJECT Your msisdn already exists for this project
INVALID_MSISDN You typed invalid msisdn
RESOURCE_NOT_FOUND Cannot find contact with given id

Update primary msisdn

If you have many alternative msisdns assigned to one contact you can change the primary msisdn from them.

Example request:

PUT /api/v1/contacts/69/primary-msisdn HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 31

{
  "msisdn" : "+14153661222"
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 31

{
  "msisdn" : "+14153661222"
}

/api/v1/contacts/{contactId}/primary-msisdn

Parameter Description
contactId Contacts’s id to update primary msisdn


You must set new msisdn as request body. Remember that number must exist as alternative msisdn in this contact. Valid msisdn has format: [optional '+' or '00'][country code][actual number], e.g. all of these are valid 14153661222, +14153661222, 0014153661222

Request fields
Path Type Description
msisdn String Existing phone number which will be contact’s number
Response results
Path Type Description
msisdn String Current primary msisdn


Possible errors
Error key Description
MSISDN_NOT_EXISTS_FOR_CONTACT Your msisdn not exist in current contact
INVALID_MSISDN You typed invalid msisdn
RESOURCE_NOT_FOUND Cannot find contact with given id

Get all alternative msisdns of specific contact

Contact can be associated with more than one number, i.e. office, home, mobile. All numbers except primary one are called alternative msisdns. Agent, when calling, can manage and call alternative msisdn. Remember however, that each msisdn can be assigned to at most one contact in a project.

Example request:

GET /api/v1/contacts/14/alternative-msisdns HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 47

[ {
  "id" : 17,
  "msisdn" : "+6499519999"
} ]

/api/v1/contacts/{contactId}/alternative-msisdns

Parameter Description
contactId Contacts’s id to get
Response results
Path Type Description
[].id Number Alternative msisdn ID attached to newly created msisdn entity
[].msisdn String Msisdn that you added


Possible errors
Error key Description
RESOURCE_NOT_FOUND When contact doesn’t exist

Add new alternative msisdn

This API allows you to attach new alternative msisdns to contact.

Example request:

POST /api/v1/contacts/2/alternative-msisdns HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 30

{
  "msisdn" : "+6499519999"
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 42

{
  "id" : 3,
  "msisdn" : "+6499519999"
}

/api/v1/contacts/{contactId}/alternative-msisdns

Parameter Description
contactId Contacts’s id to append alternative msisdn
Request fields
Path Type Description
msisdn String Phone number that will be attached to contact
Response results
Path Type Description
id Number Alternative msisdn ID attached to newly created msisdn entity
msisdn String Msisdn that you added


Possible errors
Error key Description
MSISDN_EXISTS_IN_PROJECT Your msisdn already exists for this project
INVALID_MSISDN You typed invalid msisdn
RESOURCE_NOT_FOUND Cannot find contact with given id

Delete alternative msisdn

This API allows you to remove alternative msisdns from contact. You cannot delete primary msisdn.

Example request:

DELETE /api/v1/contacts/54/alternative-msisdns/59 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 43

{
  "id" : 59,
  "msisdn" : "+6499519999"
}

/api/v1/contacts/{contactId}/alternative-msisdns/{msisdnId}

Parameter Description
contactId Contacts’s id that alternative msisdn belongs to
msisdnId Alternative msisdn ID to be removed
Response results
Path Type Description
id Number Alternative msisdn ID that were removed
msisdn String Msisdn associated with deleted alternative msisdn entity


Possible errors
Error key Description
PRIMARY_MSISDN You cannot delete alternative msisdn that is primary at the same time
RESOURCE_NOT_FOUND Cannot find alternative msisdn with given id

Get script answers for given event

Example request:

GET /api/v1/contacts/events/95/answers HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 257

{
    "Text question": [
        "Some answer"
    ],
    "Multi choice question": [
        "Answer 1",
        "Answer 2"
    ],
    "Date question": [
        "2017-10-24"
    ],
    "Date time question": [
        "2017-12-06T11:12:44.334+01:00"
    ]
}

Get answers to agent questions asked during call. There are events that won’t produce answers (e.g. Failed events, where connection was not established) hence answers are optional.


Possible errors
Error key Description
RESOURCE_NOT_FOUND When event doesn’t exist


As response you will receive object with questions as keys and array with client’s answers as value.

Response results
Path Type Description
[] Array Map containing question-answers pairs for given event id

Phone numbers

Phone number (msisdn) is basic object for calling purposes. You can assign msisdn to project (each project can have different numbers)

Get all msisdns

Returns available msisdns to given client

Example request:

GET /api/v1/msisdns HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 222

[ {
  "id" : 48,
  "msisdn" : "+48717221111",
  "eea" : true,
  "isoCountry" : "pl",
  "label" : "VqZec"
}, {
  "id" : 49,
  "msisdn" : "+14153661222",
  "eea" : false,
  "isoCountry" : "us",
  "label" : "+14153661222"
} ]
Response results
Path Type Description
[].id Number Msisdn’s id
[].msisdn String Actual phone number
[].label String Msisdn’s label to be displayed
[].eea Boolean Is number in European Economic Area
[].isoCountry String Number’s iso country code

Set up call forwarding for incoming calls

You can set up call forwarding to automatically transfer all incoming calls from your CrazyCall number to any other number you specify, i.e. your cellphone.

Example request:

POST /api/v1/inbound/configuration/numbers/27/forward HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 36

{
  "phoneNumber" : "+14153661222"
}

/api/v1/inbound/configuration/numbers/{msisdnId}/forward

Parameter Description
msisdnId Phone number’s id which configuration will be updated
Example response body:


{
  "status" : "success",
  "data" : null
}
Request fields
Path Type Description
phoneNumber String (required) Phone number where calls will be forwarded


Possible errors
Error key Description
PHONE_NUMBER_INVALID When passed phone number in invalid format
MSISDN_NOT_FOUND When there is no phone number with given id
CANNOT_CONFIGURE_CLIENTS_MSISDN When trying to configure client’s phone number

Do Not Call List

Do Not Call List is a list of phone numbers (msisdns) you do not wish to call. Numbers from that list will not be dialed, even when imported as contacts. You can block and unblock numbers from that list.

Get Do Not Call List history

Returns history of phone numbers (msisdns) which have been on the list.

Example request:

GET /api/v1/dnclist?page=1&limit=5&dateFrom=2013-05-03T20%3A30%3A40&dateTo=2019-05-03T20%3A30%3A40&msisdnLike=64&orderColumn=eventDate&direction=DESC HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Request parameters
Parameter Description
page Page number to be returned.
limit Returned page will consist of that many elements.
dateFrom Filter result to only records newer or equal to given date. (e.g. 2013-05-03T20:30:40.100Z)
dateTo Filter result to only records older or equal to given date. (e.g. 2013-05-03T20:30:40.100Z)
msisdnLike Phone number pattern, e.g. “123” matches all numbers containing sequence “123”
orderColumn Order column. Available: msisdn, username, eventDate, status.
direction Sorting direction. Available: ASC, DESC
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 455

{
  "total" : 2,
  "data" : [ {
    "msisdn" : "+16475586333",
    "eventDate" : "2018-06-19T13:15:21.586Z",
    "userId" : 3,
    "status" : "UNBLOCKED",
    "username" : "jfnNsZCtMgpY@wBKFIOqwFrxJ.com",
    "sameMsisdnEventsCount" : 2
  }, {
    "msisdn" : "+6499519999",
    "eventDate" : "2018-06-19T13:15:21.563Z",
    "userId" : 3,
    "status" : "UNBLOCKED",
    "username" : "jfnNsZCtMgpY@wBKFIOqwFrxJ.com",
    "sameMsisdnEventsCount" : 4
  } ]
}
Response results
Path Type Description
total Number Total elements count returned by the query
data Array Array of events
data.[].msisdn String Event phone number
data.[].eventDate String Event date
data.[].userId Number User Id of user who made event
data.[].status String Blacklist record event status
data.[].username String Username of user who made event
data.[].sameMsisdnEventsCount Number Same phone numbers events count


Possible errors
Error key Description
EMPTY_FIELD When page or limit is not present
PAGE_NUMBER_INVALID When page parameter was invalid
LIMIT_INVALID When limit parameter was invalid
WRONG_ORDER_COLUMN When order column is does not match any of msisdn, username, eventDate, status.


Blacklist record status

Status Description
BLOCKED Number has been banned
UNBLOCKED Number has been unlocked

Get number Do Not Call List history

Returns history of a particular number from Do Not Call List

Example request:

GET /api/v1/dnclist/+6499519999 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 332

[ {
  "msisdn" : "+6499519999",
  "eventDate" : "2018-06-19T13:15:21.771Z",
  "userId" : 4,
  "status" : "UNBLOCKED",
  "username" : "yJKWeZaJPkjs@xqZQEsNZevvt.com"
}, {
  "msisdn" : "+6499519999",
  "eventDate" : "2018-06-19T13:15:21.760Z",
  "userId" : 4,
  "status" : "BLOCKED",
  "username" : "yJKWeZaJPkjs@xqZQEsNZevvt.com"
} ]
Response results
Path Type Description
[] Array Array of contacts
[].msisdn String Blacklisted phone number
[].eventDate String Date of event
[].userId Number User Id of user who made event
[].status String Blacklist record event status
[].username String Username of user who made event


Possible errors
Error key Description
MSISDN_NOT_FOUND When phone number is not present in the Do Not Call List.


Blacklist record status

Status Description
BLOCKED Number has been banned
UNBLOCKED Number has been unlocked

Block msisdn

You can block phone numbers (msisdn) to the Do Not Call List. Incorrect numbers will be ignored.

Example request:

POST /api/v1/dnclist/block HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 33

[ "+6499519999", "+16475586333" ]
Request fields
Path Type Description
[] Array Array of msisdns to block
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 235

[ {
  "msisdn" : "+16475586333",
  "eventDate" : "2018-06-19T13:15:21.155Z",
  "userId" : 1,
  "status" : "BLOCKED"
}, {
  "msisdn" : "+6499519999",
  "eventDate" : "2018-06-19T13:15:21.155Z",
  "userId" : 1,
  "status" : "BLOCKED"
} ]
Response results
Path Type Description
[] Array Array of created events
[].msisdn String Event’s phone number
[].eventDate String Date of event
[].userId Number User Id of user who made event
[].status String Blacklist record event status


Blacklist record status

Status Description
BLOCKED Number has been banned
UNBLOCKED Number has been unlocked

Unblock msisdn

You can unblock phone numbers (msisdn) from the Do Not Call List. Incorrect numbers will be ignored.

Example request:

POST /api/v1/dnclist/unblock HTTP/1.1
Content-Type: application/json
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com
Content-Length: 33

[ "+6499519999", "+16475586333" ]
Request fields
Path Type Description
[] Array Array of msisdns to unblock
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 239

[ {
  "msisdn" : "+6499519999",
  "eventDate" : "2018-06-19T13:15:21.466Z",
  "userId" : 2,
  "status" : "UNBLOCKED"
}, {
  "msisdn" : "+16475586333",
  "eventDate" : "2018-06-19T13:15:21.466Z",
  "userId" : 2,
  "status" : "UNBLOCKED"
} ]
Response results
Path Type Description
[] Array Array of created events
[].msisdn String Event’s phone number
[].eventDate String Date of event
[].userId Number User Id of user who made event
[].status String Blacklist record event status


Blacklist record status

Status Description
BLOCKED Number has been banned
UNBLOCKED Number has been unlocked

Scripts

Each project has one specific script. When calling using Call Panel, questions from script are visible to agents, and agents can save answers to those questions.

Get all scripts

Example request:

GET /api/v1/scripts HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 598

[ {
  "id" : 3,
  "createdBy" : "JcrIBlErcN SaImeZrffF",
  "createdById" : 25,
  "modifiedBy" : "JcrIBlErcN SaImeZrffF",
  "modifiedById" : 25,
  "createdAt" : "2018-06-19T13:15:27.000+00:00",
  "lastModified" : "2018-06-19T13:15:27.000+00:00",
  "name" : "ScriptNameModified",
  "projectCount" : 0,
  "default" : false
}, {
  "id" : 1,
  "createdBy" : null,
  "createdById" : null,
  "modifiedBy" : null,
  "modifiedById" : null,
  "createdAt" : "2018-06-19T13:09:51.000+00:00",
  "lastModified" : "2018-06-19T13:09:51.000+00:00",
  "name" : "Default",
  "projectCount" : 0,
  "default" : true
} ]

You can retrieve all scripts saved on your account. Remenber that there always will be one default which you can’t delete in any way.

Response results
Path Type Description
[].id Number Script’s id
[].createdBy String Email of person who created script
[].createdById Number Id of person who created script
[].modifiedBy String Email of person who most recently modified script
[].modifiedById Number Id of person who most recently modified script
[].createdAt String Date when script was created
[].lastModified String Date when script was most recently modified
[].name String Script’s label
[].projectCount Number Number of projects this script is assigned to
[].default Boolean Default script cannot be deleted


Script’s states

State Description
USED Script was already used in Callpanel (modify is limited)
UNUSED Script wasn’t used (you can modify all script’s element)
DELETED Cannot use script

Delete script

Example request:

DELETE /api/v1/scripts/2 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK

You can delete specific script by its id. Remember - you cannot delete default script!

/api/v1/scripts/{scriptId}

Parameter Description
scriptId Id of script to delete


Possible errors
Error key Description
SCRIPT_NOT_EXISTS Cannot find script with given id
ILLEGAL_ACTION_SCRIPT Trying to delete default script

Calls

Call is a domain representation of call done by agent. It has properties describing e.g. length of calling, and agent identification.

Get all calls

You can retrieve all calls made on your account.

Request parameters
Parameter Description
limit (required) Limit number of calls
page (required) Page number
projectId Project identifier
Example request:

GET /api/v1/calls?limit=1&page=1&projectId=&projectId= HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 475

[ {
  "id" : 1297926815034904576,
  "recordingExists" : false,
  "startDate" : "2018-06-19T13:21:13.033Z",
  "finishDate" : "2018-06-19T13:21:13.033Z",
  "answeredDate" : "2018-06-19T13:21:13.033Z",
  "lengthSeconds" : 0,
  "direction" : "OUTBOUND",
  "msisdn" : "",
  "agentName" : null,
  "agentSurname" : null,
  "agentMsisdn" : null,
  "agentMsisdnIsoCountry" : null,
  "agentMsisdnLabel" : null,
  "answered" : true,
  "contactName" : null,
  "contactSurname" : null
} ]

Data will be sorted by finished date.

Response results
Path Type Description
[] Array All finished calls
[].id Number Call’s id
[].recordingExists Boolean Indicates whether call has a recording.
[].startDate String Date and time when call has been started
[].finishDate String Date and time when call has been finished
[].answeredDate String Date and time when call has been answered
[].lengthSeconds Number Duration of the call in seconds
[].direction String Direction of the call
[].msisdn String Actual phone number
[].agentName String Calling agent’s name
[].agentSurname String Calling agent’s surname
[].answered Boolean Indicates whether call has been answered
[].agentMsisdn String Agent phone number
[].agentMsisdnIsoCountry String Agent phone number country code
[].agentMsisdnLabel String Agent phone number label
[].contactName String Contact’s name
[].contactSurname String Contact’s surname


Possible directions

Direction Description
INBOUND Call inbound (to CrazyCall app)
OUTBOUND Call outbound (from CrazyCall app)

Get specific call

You can receive specific call established with your account.

/api/v1/calls/{id}

Parameter Description
id Call’s id to get
Example request:

GET /api/v1/calls/8242371171642036224 HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 471

{
  "id" : 8242371171642036224,
  "recordingExists" : false,
  "startDate" : "2018-06-19T13:21:13.033Z",
  "finishDate" : "2018-06-19T13:21:13.033Z",
  "answeredDate" : "2018-06-19T13:21:13.033Z",
  "lengthSeconds" : 0,
  "direction" : "OUTBOUND",
  "msisdn" : "",
  "agentName" : null,
  "agentSurname" : null,
  "agentMsisdn" : null,
  "agentMsisdnIsoCountry" : null,
  "agentMsisdnLabel" : null,
  "answered" : true,
  "contactName" : null,
  "contactSurname" : null
}
Response results
Path Type Description
id Number Call’s id
recordingExists Boolean Indicates whether call has a recording.
startDate String Date and time when call has been started
finishDate String Date and time when call has been finished
answeredDate String Date and time when call has been answered
lengthSeconds Number Length of the call in seconds
direction String Direction of the call
msisdn String Actual phone number
agentName String Agent’s name
agentSurname String Agent’s surname
answered Boolean Logic value describing if call was answered
agentMsisdn String Agent phone number
agentMsisdnIsoCountry String Agent phone number country code
agentMsisdnLabel String Agent phone number label
contactName String Contact’s name
contactSurname String Contact’s surname


Possible errors
Error key Description
CALL_NOT_FOUND When call with given id is not available


Possible directions

Direction Description
INBOUND Call inbound (to CrazyCall app)
OUTBOUND Call outbound (from CrazyCall app)

Get recording that belongs to call

You can retrieve a call’s recording which is an audio file. Each call between agent and customer is recorded, and is available for download according to plan you have purchased. The file is streamed.

/api/v1/calls/{callId}/recording

Parameter Description
callId Call’s id that belongs to the recording
Example request:

GET /api/v1/calls/-3262428423141226159/recording HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Length: 53
Content-Type: application/octet-stream

The content will be a byte stream from an audio file.


Possible errors
Error key Description
CALL_NOT_FOUND When call with given id is not available
RECORDING_NOT_FOUND When recording is not available for given call id

Finance

Finance represents your current plan’s settings and monetary balance

Get balance

Example request:

GET /api/v1/finance/balance?dateFrom=2018-06-19T13%3A15%3A30.745Z HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 86

{
  "balance" : {
    "monetary" : 10,
    "voice" : 0
  },
  "secondsUsedToday" : 0
}
Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 86

{
  "balance" : {
    "monetary" : 10,
    "voice" : 0
  },
  "secondsUsedToday" : 0
}

You can receive your current balance. It depends on your plan.

Request parameters
Parameter Description
dateFrom (required) Date in ISO date format (e.g. 2018-06-19T13:15:30.745Z)
Response results
Path Type Description
balance Object Represents current balance
balance.monetary Number Current balance (in plan’s currency)
balance.voice Number Free call time from plan (in seconds)
secondsUsedToday Number How many free seconds was used in day given as parameter (+24h)


Possible errors
Error key Description
PARAMETER.NOT_PRESENT When dateFrom was not present
DATE_INVALID Date was passed in invalid format

Get destinations

Example request:

GET /api/v1/finance/plans/destinations HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 8254

{
  "destinations" : {
    "GB_Mobile" : {
      "countryIsoCode" : "gb",
      "description" : "Mobile"
    },
    "US_Local" : {
      "countryIsoCode" : "us",
      "description" : "Local"
    },
    "RO_Mobile" : {
      "countryIsoCode" : "ro",
      "description" : "Mobile"
    },
    "MX_All" : {
      "countryIsoCode" : "mx",
      "description" : "All"
    },
    "AT_Local" : {
      "countryIsoCode" : "at",
      "description" : "Local"
    },
    "BD_All" : {
      "countryIsoCode" : "bd",
      "description" : "All"
    },

    ...

  },
  "destinationGroups" : {
    "basic" : [ "SK_Local", "ZA_Local", "KR_Local", "SE_Mobile", "GB_Mobile", "IS_Local", "IE_Local", "IL_Local",  ...],
    "free" : [ "BR_Local", "CA_Local", "CN_All", "DK_Local", "FR_Local", "DE_Local",  ... ],
    "regular" : [ "BR_Local", "CA_Local", "PT_Mobile", "RE_Local", "RO_Mobile", "SM_Local", "SG_All", "VE_Local",  ...]
  }
}

Get a list of countries eligible to be called for free, subject to your plans’ voice/minutes limit.

Response results
Path Type Description
destinations Object All available destinations
destinations.*.countryIsoCode String ico code for specific type
destinations.*.description String Short description
unlimitedVoiceBalance Object Countries with unlimited calls within given plan
unlimitedVoiceBalance.regular Array Countries with unlimited calls in regular plan
destinationGroups Object Available countries per plan
destinationGroups.free Array Countries in free plan
destinationGroups.basic Array Countries in basic plan
destinationGroups.regular Array Countries in regular plan
destinationGroups.call_forwarding Array Countries in call forwarding plan

Subscription

Example request:

GET /api/v1/finance/subscription HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Example response:

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 382

{
  "plan" : "CGHkehBkUt",
  "planPrice" : 95.0,
  "quantity" : 10,
  "voiceBalanceSeconds" : 30000,
  "discountPercentage" : 0,
  "discountDollars" : 0.0,
  "discountType" : "FOREVER",
  "discountValid" : true,
  "balance" : 20.5,
  "periodStart" : 1528550130808,
  "periodEnd" : 1531142130808,
  "destinationCountriesCount" : 90,
  "trial" : false,
  "subscriptionPrice" : 950.0
}

Receive your current subscription. Remember - when you try to upgrade plan it will be available after old subscription expired.

Response results
Path Type Description
plan String Plan’s name
planPrice Number Basic price for this plan (per user)
quantity Number Amount of money available now
voiceBalanceSeconds Number Time (in seconds) of free calls
discountPercentage Number Available discount’s percentage
discountType String One of FOREVER, ONCE, and REPEATING
discountValid Boolean Applied coupon is still valid
discountDollars Number Available amount of discount
balance Number Current balance
periodStart Number Date (in millis) when subscription started
periodEnd Number Date (in millis) when subscription will end
destinationCountriesCount Number Number of countries for voice balance
trial Boolean Is this subscription a trial
subscriptionPrice Number Total price of this subscription

Reports

Download the reports for your calls and effectiveness.

Example request:

GET /api/v1/reports?dateFrom=2018-06-14&dateUntil=2018-06-19&projectId=1&timezoneOffsetMinutes=-120&reportTypes=DATABASE_DUMP&reportTypes=SUCCESS&reportTypes=BILLINGS&reportTypes=LAST_CONTACT_EVENTS_DUMP HTTP/1.1
x-api-token: your-secret-api-key
Account: your-account-hash.crazycall.com
Host: api.crazycall.com

Request parameters
Parameter Description
dateFrom (required) The date from which reports will be generated (e.g. 2017-12-12)
dateUntil (required) The finish date of generated reports (e.g. 2017-12-12)
projectId (required) Project’s id for which will be generated report
timezoneOffsetMinutes Time offset from UTC (in minutes, can be negative, default 0)
reportTypes (required) Type of reports to generate (see the descriptions below)
Example response:

HTTP/1.1 200 OK
Content-Type: application/zip;charset=UTF-8
Reports-Total: 4
Reports-Success: 2
Reports-Empty: 2
Reports-Empty-Name: SUCCESS
Reports-Empty-Name: BILLINGS
Content-Disposition: attachment; filename="reports_2017-10-26.zip"
Content-Length: 6806

the content will be a file with reports (application/x-ms-excel if only one file is generated, application/zip otherwise)


reportTypes parameter is an array. We will accept both reportTypes=TYPE1&reportType=TYPE2 and reportTypes=TYPE1,TYPE2 formats.

As a response you will receive file with reporting data. If only one report is selected, the file will be in .xlsx format. Otherwise, the compressed .zip file will be download with all selected reports as .xlsx.
If we cannot generate any report (due to lack of data - for example no calls were made in selected date range) there will be an empty response with 0 as value for Reports-Success header.

The response contains Content-Disposition header with report’s filename. It will match this pattern: {REPORT_NAME}_{CURRENT_DATE}.xlsx, (e.g. Effectiveness report_2017-10-26.xlsx) for one report and reports_{CURRENT_DATE}.zip for .zipfile with {REPORT_NAME}.xlsx reports.


Additional headers

Header Description
Reports-Total Number of all downloaded reports
Reports-Empty Number of empty reports (we were unable to generate it due to the lack of data)
Reports-Success Number of downloaded reports with data
Reports-Empty-Name Types of empty reports


Possible errors
Error key Description
DATE_EMPTY Cannot find dateFrom or dateUntil in your request
REPORT_TYPES_EMPTY Cannot find any record type
PROJECT_DOES_NOT_EXIST Cannot find project with given id
REPORT_NOT_IN_BACKWARD_DAYS_RANGE Your plan doesn’t allow to get reports from given date
REPORT_WRONG_ENTERED_DATES Invalid range - dateFrom is after dateUntil
HOURS_OUT_OF_RANGE timezoneOffsetMinutes value is above 1439 (one day in minutes)

Success

Report Type: SUCCESS

With Successes report you can view all calls marked with successes together with the answers provided by agents in the script.

Moreover, this report also contains the imported customer data. The final appearance, name and number of columns in the report depends on the imported file and the script associated with the project.

Regardless of the project, there are 4 constant columns:

Events

Report Type: EVENT

An event in CrazyCall is an action that happens in relation to a given contact. This could be anything, from call attempt to closing with a success status.

Events report summarizes all these actions in one place. For example, the following events can be found:

Additionally, the report contains the imported customer data. The final appearance, name and number of columns in the report will depend on the imported file.

You may notice that your report contains columns with empty values. This can happen if your project included several imports with different file structures, e.g. with varying number of columns or names.

Effectiveness

Report Type: EFFECTIVENESS

Thanks to Effectiveness report you can measure the most important Key Performance Indicators (KPIs) like Contact Rate, Hit Rate, Success Rate, number of called, answered and closed contacts. You can generate this report both for a selected date range.

Here’s how you should understand terms used in the report:


Note: Voicemail is not considered as a contact answered by the customer.

Database dump report

Report Type: DATABASE_DUMP

Database dump report contains all information about numbers you’ve called and their statuses within a selected date range. You can use it to see every action ever taken upon each of your contact, not only the last one.

Database dump report provides the most detailed information about events on a given contact from all the reports available in CrazyCall, so it’s useful when you start reaching out to your leads and clients. It will give you all the key data on all the contacts you’ve called.

The number and names of columns in this report are constant.

This is how to understand terms used in this report:

Last contact events dump

Report Type: LAST_CONTACT_EVENTS_DUMP

Last Contact Events Dump Report presents detailed information on the recent events that happened to a contact. For each contact you’ll see the following details: time of the call, its length, phone number, call status and the name of the agent who handled that call.

This report is very similar to ‘Database Dump Report’, but it focuses only the most recent events that happened to a given contact. Let’s say, a call gets rescheduled at 2 pm. At 4 pm. the same day the same contact is marked with the Save Success status. With the Last Contact Events Dump Report you’ll see the latest event, which in this case is success.

The number and names of columns in this report are constant and here’s how to understand them:

Activation

Report Type: ACTIVATION

Activation report lets you see all successes saved by your agents on a given day or within a selected date range. It also includes all the answers inserted by your users in the call script together with notes added on the contact.

The final appearance, name and number of columns in the report depends on the script associated with the project.

There are 6 constant elements in this report and here’s how to understand them:

Contact statuses

Report Type: CONTACT_STATUSES

This report provides an overview of the current state of your contacts database. Use it to see the number of your clean contacts, e.g. the ones not yet called, together with the ones rescheduled manually or automatically.

The number and names of columns always remain the same and are as following:

Appointment after contact with the customer - is the number of appointments arranged after the call.

Events to be verified

Report Type: TO_VERIFICATION

This report lets you see contacts assigned as ‘not verified’ together with the name of the user who marked them with this status.

Not verified is used when an agent doesn’t choose any status at the end of the call. If you see contacts listed as ‘not verified’ that means that they weren’t scheduled manually or automatically and weren’t closed with a success or custom status. So you’re missing an important piece of information on what happened to these leads or customers.

With ‘Events to be verified Report’ you’ll be able to see which contacts weren’t properly closed. It also displays the date the event took place and the name of the user who didn’t mark them with a status.

Billings

Report Type: BILLINGS

With this report you can see how much time each call takes and costs. It is counted from the moment your contact answers the call until the moment he or she hangs up. The time waiting for the answer, or the time after call are excluded.

Agent worktime

Report Type: AGENT_WORKTIME

Agent work time report lets you know how long your agents were actually calling customers and how long they spent on pause. The work time is counted right after the agent has logged into the Call Panel (or Chrome Extension) and chosen a project till he or she stopped calling and logged out of the Call Panel (or Chrome Extension).

This is how to understand terms used in this report:



To know how long the agent was logged into the Call Panel (or Chrome Extension), you need to sum up the values from the second and third columns.

The final appearance, name and number of columns in the report depends on the number of pauses taken by agent. If you generate the report for a specific data range, each day will appear in a separate tab.

Contacts result

Report Type: CONTACTS_RESULT

This report displays information on how many of your contacts have been called, how many of them answered and how many conversations were finished with a success.

Here’s how to understand this report:

Efficiency

Report Type: EFFICIENCY

Thanks to Efficiency report you can see your agents’ effectiveness on a particular day along with the total effectiveness during the selected date range. The effectiveness counts here as the ratio of successful conversations to the total time spent in Call Panel.

Here’s how to understand the terms used in this report:

Effective talk time

Report Type: EFFECTIVE_TALK_TIME

Effective talk time report shows you how much working time agents spent talking, both with numbers and %. Use it to see the actual time your agents devoted to talking with customers on a particular day or the selected date range.

Here’s how you should understand terms used in the report:

Contact stats history day by day

Report Type: CONTACT_STATS_HISTORY

This report presents information on your contacts on a specific day or within a selected date range. You’ll be able to see a detailed history, including the state of your contacts base at the beginning of that day, how many of them were closed, scheduled for another date or marked as not verified.

The number and names of columns in this report are constant.

Here’s how to understand this report:

Webhooks

Webhooks allow you to configure a URL that will be notified every time an event occurs on your account. When one of the events you subscribe to happens, crazycall will send a json object representing that event through a HTTP POST request to your webhooks URL.

Webhook configuration

To find webhook settings, click on your Account icon in the top right corner, then select For Developers. There, you can find “Webhooks” section. You can either edit your existing webhook configurations, disable them, or click “Add Webhook” at the top of the page to add a new configuration.


There are four sections that you have to fill:

  1. Project - webhooks are created for a project. Select one from the dropdown.
  2. Event types - select at least one of the event types you want to subscribe to. They are described in more detail below. You can choose any number of types.
  3. Webhook name - select a unique name you will identify your webhook by, like “Stats app notification”
  4. URL - provide an address that events should be sent to.

Responding to webhook

We do not expect any response from the endpoint you configure. You can respond with a customary HTTP 200 code, however this is not required. We currently do not support resending events that were failed to be properly delivered.

Event types

This is a list of all the types of events we currently send. We may add more at any time, so you shouldn’t rely on only these types existing in your code.

Here’s a list of dictionaries common to most event types described below.

Contact statuses

status Description
AUTOSCHEDULED Autoscheduled
CLOSED Closed
NOT_VERIFIED Not verified
OPEN Open
SCHEDULED Scheduled


Contact sources

source Description
API Api
WEBHOOK Webhook
INCOMING Incoming call
WIDGET Widget
LEAD Lead generation

  Close contact

Sent when you closed a contact

Example response body:


{
  "id" : 61,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "CLOSE_CONTACT",
  "userName" : "EYjhfk",
  "userSurname" : "bjZkhV",
  "contact" : {
    "id" : 64,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 10,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "BtVavh",
      "lastname" : "ypSFUj",
      "company" : "QYLtUo",
      "email" : "PUXqqayOgAVA@vVuERcrUGhOk.com",
      "detail" : "RncdmB"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always CLOSE_CONTACT)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification

  Conference call

Sent when you created a conference call

Example response body:


{
  "id" : 37,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "CONFERENCE_CALL",
  "callId" : 54,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "conferenceMsisdn" : "+48717221111",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "qWCniCrVrDC",
  "contact" : {
    "id" : 54,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 84,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "YnxmZl",
      "lastname" : "ujmhDU",
      "company" : "RTwCSd",
      "email" : "ujVcRCXMGsju@snaWQkHUmiVl.com",
      "detail" : "pOfgxf"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always CONFERENCE_CALL)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Id of the call that initiated the conference
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Phone number of the contact that initiated the call
crazyCallMsisdn String Phone number assigned to your project when the call happened
conferenceMsisdn String Number with which the conference was established
note String Note added during the conference

  Config change event

Sent when you change the number on one of your contacts.

Example response body:


{
  "id" : 98,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "MSISDN_CONFIG_CHANGE",
  "callId" : 43,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "newMsisdn" : "+14153661222",
  "oldMsisdn" : "+48717221111",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "LURsfWqXWwU",
  "contact" : {
    "id" : 36,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 7,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "uDcjuU",
      "lastname" : "NHaKuc",
      "company" : "LuWwln",
      "email" : "RSBCDgzAFPdF@sASgARsoFDaF.com",
      "detail" : "AdQUUw"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always MSISDN_CONFIG_CHANGE)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number For a change that happened during a call, the relevant call id (optional)
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String For a change that happened during a call, the called contact’s phone number (optional)
crazyCallMsisdn String For a change that happened during a call, phone number assigned to your project when the call happened (optional)
oldMsisdn String Previous number
newMsisdn String Updated msisdn (current for contact)
note String Note added while changing number (optional)

  Contact details change

Sent when you updated custom information about your contact

Example response body:


{
  "id" : 18,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "CONTACT_DETAILS_CHANGE",
  "callId" : 68,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "contact" : {
    "id" : 77,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 79,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "WJQgpP",
      "lastname" : "bGPCBz",
      "company" : "YNtCRt",
      "email" : "WeLtdhkeWGrl@mICOEgTvJZVe.com",
      "detail" : "bRdHWP"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always CONTACT_DETAILS_CHANGE)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number For a change that occurred during a call, the relevant call id (optional)
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String For a change that occurred during a call, the called contact’s phone number (optional)
crazyCallMsisdn String For a change that occurred during a call, phone number assigned to your project when the call happened (optional)

  Delete contact

Sent when you removed a contact

Example response body:


{
  "id" : 17,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "DELETE_CONTACT",
  "userName" : "MqHKed",
  "userSurname" : "BNdrCw",
  "contact" : {
    "id" : 99,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 56,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "RjUaNv",
      "lastname" : "ufoUys",
      "company" : "IXWQRC",
      "email" : "vkNZFpcSPJtS@LRzWjTMuqcyf.com",
      "detail" : "ljLdxO"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always DELETE_CONTACT)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification

  Failed contact

Sent when you attempted a call, but you didn’t reach your contact for whatever reason, like the contact is unavailable or decided to not pickup your call.

Example response body:


{
  "id" : 43,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "FAILED_CONTACT",
  "reason" : "VOICE_MAIL",
  "callId" : 78,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "contact" : {
    "id" : 35,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 83,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "aZjbLZ",
      "lastname" : "THRkga",
      "company" : "qhRLwC",
      "email" : "zoEqCHlXlpAY@PYKVSRJKwDjW.com",
      "detail" : "MtwCWb"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  },
  "scheduleDate" : "2018-06-21T13:21:13.033+00:00"
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always FAILED_CONTACT)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id for a call that was attempted but failed
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened
scheduleDate String Scheduled date of next contact
reason String Failed reason


Failed reasons

Reason Description
VOICE_MAIL Voice mail
BUSY Busy
NOT_ANSWERED Not answered
UNAVAILABLE_MSISDN Unavailable msisdn
NETWORK_ERROR Network error
NO_MSISDN_TO_CALL No msisdn to call
FAILED_CONNECT_AGENT Failed connect agent
INSUFFICIENT_FUNDS Insufficient funds

  Import contact

Sent when you created new contacts through the “Load contacts” wizard in your project

Example response body:


{
  "id" : 98,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "IMPORT_CONTACT",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contact" : {
    "id" : 78,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 21,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "azDIex",
      "lastname" : "ZRfkFp",
      "company" : "OyIuxn",
      "email" : "piifVYZUPIPt@KHEOerevhSKx.com",
      "detail" : "pLKeON"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always IMPORT_CONTACT)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification

  Incoming call

Sent when someone attempted a call to one of the numbers associated with your projects. This event is also sent for failed calls, so whether you actually received the call or weren’t available

Example response body:


{
  "id" : 95,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "INCOMING_CALL_STATUS",
  "customStatus" : "INCOMING_CALL_STATUS.REDIRECT_INCOMING_CALL",
  "callId" : 37,
  "callDirection" : "INBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "redirectMsisdn" : "+48717221111",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "bprJpOVhJDx",
  "answerResults" : {
    "Question1" : [ "Answer1", "Answer2" ],
    "Question2" : [ "Answer1" ],
    "Question3" : [ "2018-06-19T13:21:13.033Z" ]
  },
  "contact" : {
    "id" : 95,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 26,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "VhqgFN",
      "lastname" : "nDqFxs",
      "company" : "OKfnHE",
      "email" : "yzaaSLBnVNrZ@CWlZEOlndlrw.com",
      "detail" : "yuzhmo"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always INCOMING_CALL_STATUS)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id of the call
callDirection String Type of call, always INBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened
redirectMsisdn String Number to redirect to, according to rules setup for this crazyCall number (optional)
customStatus String Status assigned to this call
note String If note was created during a call, the text contents of the note (optional)
answerResults Object Answers to the script

  Not verified

Sent when something unexpected happened during a call. These should be rare. You should review them later.

Example response body:


{
  "id" : 58,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "NOT_VERIFIED",
  "callId" : 41,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "contact" : {
    "id" : 14,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 83,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "IIFYcm",
      "lastname" : "dAiEUl",
      "company" : "vIzxUW",
      "email" : "TQCJPzopbmRb@WWsOuLLRXwQm.com",
      "detail" : "ODahKP"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always NOT_VERIFIED)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id for a call that was attempted but its status and results should be reviewed
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened

  Note

Sent when you created a note during a call. This is separate from regular answers in a script

Example response body:


{
  "id" : 89,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "NOTE",
  "callId" : 60,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "lkbzSFzWCtj",
  "contact" : {
    "id" : 67,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 46,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "OqXHYU",
      "lastname" : "rzoitC",
      "company" : "uufFqn",
      "email" : "poJPIuHVUQWi@ZMALGOZvxcSL.com",
      "detail" : "sAkOxb"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always NOTE)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number For a note that was created during a call, the relevant call id (optional)
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String For a note that was created during a call, the called contact’s phone number (optional)
crazyCallMsisdn String For a note that was created during a call, phone number assigned to your project when the call happened (optional)
note String Actual note

  Open contact

Sent when you opened a contact

Example response body:


{
  "id" : 63,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "OPEN_CONTACT",
  "userName" : "GAWTGn",
  "userSurname" : "QCFuWw",
  "contact" : {
    "id" : 16,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 63,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "FPGHDY",
      "lastname" : "ryldqG",
      "company" : "UMMwgM",
      "email" : "AamIoYXRpifY@RNNKLpAQGCVD.com",
      "detail" : "zgRwHl"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always OPEN_CONTACT)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification

  Refuse event

Sent when you mark a call as refused and you choose a reason for refusal.

Example response body:


{
  "id" : 77,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "REFUSE",
  "callId" : 79,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "answerResults" : {
    "Question1" : [ "Answer1", "Answer2" ],
    "Question2" : [ "Answer1" ],
    "Question3" : [ "2018-06-19T13:21:13.033Z" ]
  },
  "refuseReason" : {
    "id" : 98,
    "name" : "zQOqo",
    "projectId" : 70,
    "type" : "CALL_PANEL"
  },
  "contact" : {
    "id" : 26,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 39,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "PoNPbg",
      "lastname" : "UNkKKj",
      "company" : "WfzKSe",
      "email" : "PWHckNVBKZHa@JbscaXDIcKXe.com",
      "detail" : "MUkUkH"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always REFUSE)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id during which the refusal happened
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened
refuseReason.id Number Refuse reason’s id
refuseReason.name String Refuse reason’s name
refuseReason.projectId Number Id of the project where contact is assigned
refuseReason.type String Type of refuse reason (CALL_PANEL or WIDGET)
answerResults Object Answers to the script

  Schedule event

Sent when you schedule another date during a call.

Example response body:


{
  "id" : 74,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "SCHEDULE",
  "callId" : 57,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "fGYgTcAHEFR",
  "answerResults" : {
    "Question1" : [ "Answer1", "Answer2" ],
    "Question2" : [ "Answer1" ],
    "Question3" : [ "2018-06-19T13:21:13.033Z" ]
  },
  "contact" : {
    "id" : 4,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 79,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "GOxIxo",
      "lastname" : "OedLKf",
      "company" : "IanxsL",
      "email" : "OVsRvTfPteDr@IkxkBdBNSqyW.com",
      "detail" : "SJEVYK"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  },
  "scheduleDate" : "2018-06-21T13:21:13.033+00:00"
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always SCHEDULE)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id during which the scheduling happened
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened
note String Note added while scheduling contact
scheduleDate String Schedule date
answerResults Object Answers to the script

  Success event

Sent when you make a call and mark it a success (for example go through a script and record all answers).

Example response body:


{
  "id" : 44,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "SUCCESS",
  "callId" : 59,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "answerResults" : {
    "Question1" : [ "Answer1", "Answer2" ],
    "Question2" : [ "Answer1" ],
    "Question3" : [ "2018-06-19T13:21:13.033Z" ]
  },
  "contact" : {
    "id" : 41,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 14,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "UmSfGl",
      "lastname" : "BYEhnW",
      "company" : "ptnRsI",
      "email" : "zutzPCNLZPTC@eypfraNsdSiZ.com",
      "detail" : "kHENPa"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always SUCCESS)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Call id during which the success happened
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened
answerResults Object Answers to the script

  Transfer call

Sent when you used the transfer option during a call

Example response body:


{
  "id" : 58,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "TRANSFER_CALL",
  "callId" : 90,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "transferMsisdn" : "+14153661222",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "note" : "CcfBKqhtmAm",
  "contact" : {
    "id" : 27,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 33,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "TbCGRa",
      "lastname" : "WBZxRw",
      "company" : "wizkqt",
      "email" : "YvpjnNYwELIV@glzUcqqXCSEb.com",
      "detail" : "Oertgy"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always TRANSFER_CALL)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Id of the call that was later transferred
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Phone number of the contact that initiated the call that was later transferred
crazyCallMsisdn String Phone number assigned to your project when the call happened
transferMsisdn String Number where call was transferred
note String Note added during a call that was later transferred

  Voice Drop

Sent when you used the voice drop option during a call and you leave predefined message.

Example response body:


{
  "id" : 40,
  "createdAt" : "2018-06-19T13:21:13.033+00:00",
  "type" : "VOICE_MAIL_DROP",
  "callId" : 4,
  "callDirection" : "OUTBOUND",
  "userName" : "Name",
  "userSurname" : "Surname",
  "contactMsisdn" : "+33980091888",
  "crazyCallMsisdn" : "+3225889300",
  "contact" : {
    "id" : 37,
    "createdAt" : "2018-06-19T13:21:13.033+00:00",
    "projectId" : 16,
    "status" : "OPEN",
    "source" : "WIDGET",
    "primaryMsisdn" : "+33980091888",
    "alternativeMsisdns" : [ "+16475586333" ],
    "details" : {
      "firstname" : "xSKlbS",
      "lastname" : "nTtvZO",
      "company" : "pwPUgg",
      "email" : "SunQBkDzPboE@EHgfYaazvFJT.com",
      "detail" : "XjtlQF"
    },
    "lastModificationDate" : "2018-06-19T13:21:13.033+00:00"
  }
}
Response results
Path Type Description
id Number Contact event id
type String Type of event (always VOICE_MAIL_DROP)
createdAt String When event was created
userName String Name of the user who created event
userSurname String Surname of the user who created event
contact.id Number Contact id
contact.createdAt String Contact’s import date
contact.projectId Number Id of the project contact was imported into
contact.status String Current contact’s status
contact.source String Import source (optional)
contact.primaryMsisdn String Primary phone number (optional)
contact.alternativeMsisdns Array List of alternative phone numbers assigned to contact (optional)
contact.details Object Details of the contact
contact.details.firstname String Contact’s firstname
contact.details.lastname String Contact’s lastname
contact.details.company String Contact’s company name
contact.details.email String Contact’s email
contact.details.detail String Custom contact detail
contact.lastModificationDate String Date of the most recent modification
callId Number Id of the call which ended with the voice drop
callDirection String Type of call, can be: INBOUND or OUTBOUND
contactMsisdn String Contact’s phone number
crazyCallMsisdn String Phone number assigned to your project when the call happened