Download OpenAPI specification:
This API allows a developer to access data from a Relatel account and to extend Relatel with new functionality.
All phone numbers include the country calling code, without 00 or + prefix. E.g. a Danish number would be: 4571999999.
Relatel supplies two types of products, a virtual switchboard and mobile subscriptions.
Different features and parts of the API depends on the user and/or company having the right features.
The switch product is our virtual switchboard. It has three different company/customer wide subscription plans, Professional, Contact Center and Unlimited. Also, each employee (except the first free) needs a subscription to enable access to the features in the selected plan.
Just a normal sim-card based mobile subscription, but with great love on top. All mobile subscriptions have the same API features.
The Relatel v2 REST API can be accessed via OAuth 2.0 or with a one-off Access Token which you can create on https://app.relatel.dk/account/authorized_applications. This helps us track the usage of your application as well as providing the best possible security and safety to our users' data. OAuth 2.0 is a modern standard used by most providers, large and small.
To use the Relatel v2 REST API with oAuth 2.0 you need to first register your application. Given that each application is tied to it's own URL you might want to register one for development and one for production.
Please note that a user may at any time destroy their access tokens. You might want to take this into account when you're building your application.
Every request to a user's data is authenticated by an access token. To get one the user must accept that they want to use your app. They do this on our domain. Start by redirecting your user to the following address:
https://app.relatel.dk/api/v2/authorize?client_id=YOUR_APPLICATIONS_ID&response_type=code&redirect_uri=YOUR_APPLICATIONS_REDIRECT_URI
Users will be prompted to login (if they aren't already) and then asked if they want to grant you access to their account. If they agree, they are taken to your redirect_uri with a request token as a parameter.
http://example.com/callback?code=REQUEST_TOKEN
Your app then makes a POST request like this:
https://app.relatel.dk/api/v2/token?client_id=YOUR_APPLICATIONS_ID&client_secret=YOUR_APPLICATIONS_SECRET&grant_type=authorization_code&redirect_uri=YOUR_APPLICATIONS_REDIRECT_URI&code=REQUEST_TOKEN
The response will be JSON:
{ "access_token": "ACCESS_TOKEN" }
{- "chats": [
- {
- "uuid": "45981120-324b-0132-d3ef-14dae9edd21d",
- "state": "ringing",
- "from_name": "John Doe",
- "from_email": "john@doe.dk",
- "endpoint": "ChatReception#1",
- "link": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "answered_by": {
- "name": "Jane Doe",
- "endpoint": "Employee#1"
}, - "ended_at": "2019-08-24T14:15:22Z",
- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}
]
}{- "chat": {
- "uuid": "45981120-324b-0132-d3ef-14dae9edd21d",
- "state": "ringing",
- "from_name": "John Doe",
- "from_email": "john@doe.dk",
- "endpoint": "ChatReception#1",
- "link": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "answered_by": {
- "name": "Jane Doe",
- "endpoint": "Employee#1"
}, - "ended_at": "2019-08-24T14:15:22Z",
- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}
}{- "orders": [
- {
- "id": 1234,
- "type": "Order::ActivateM2M",
- "state": "completed",
- "pending_tasks": false
}, - {
- "id": 2345,
- "type": "Order::DeactivateM2M",
- "state": "completed",
- "pending_tasks": false
}
]
}required | object |
{- "order": {
- "description": "Gylletank 34",
- "product_name": "m2m-small-one",
- "icc_id": "89450123456789012346"
}
}{- "order": {
- "id": 1234,
- "type": "Order::ActivateM2m",
- "state": "completed",
- "icc_id": "89450123456789012346",
- "number": "4571991234",
- "subscription_id": 2345
}
}required | object |
{- "order": {
- "number": "4571991234",
- "recycle_sim": true
}
}{- "order": {
- "id": 1234,
- "type": "Order::DeactivateM2m",
- "state": "completed",
- "icc_id": "89450123456789012345",
- "number": "4571991234",
- "subscription_id": 2345
}
}| id required | integer M2M subscription ID |
{- "id": 4567,
- "description": "Gylletank 34",
- "order_id": 1234,
- "product_name": "m2m-small-one",
- "state": "active",
- "icc_id": "89450123456789012346",
- "ordered_on": "2024-01-10",
- "activated_on": "2024-01-10",
- "cancelled_on": null,
- "contract_expired_on": "2024-01-10",
- "overuse_limit_dkk": 1500
}| id required | integer Subscription ID |
required | object |
{- "subscription": {
- "description": "John's autocamper",
- "overuse_limit_dkk": 100
}
}{- "id": 4567,
- "description": "John's autocamper",
- "order_id": 1234,
- "product_name": "m2m-small-one",
- "state": "active",
- "icc_id": "89450123456789012346",
- "ordered_on": "2024-01-10",
- "activated_on": "2024-01-10",
- "cancelled_on": null,
- "contract_expired_on": "2024-01-10",
- "overuse_limit_dkk": 100
}object | |
| numbers | Array of strings Phonenumbers to filter charges by. |
| subscription_ids | Array of strings Ids of the subscriptions |
subscription_id,subscription_state,phone_number,product_name,icc,type,count,dkk_to_vat,dkk_no_vat,subscription_activated_on,subscription_cancelled_on,formatted_phone_number,description 1234,"active","4571991234","m2m-large","89450123456789012349","sms_roam","123","5.34","0.0","2024-01-05","2024-02-01","71 99 12 34","Tractor 12"
required | object |
{- "order": {
- "number": "4571991234",
- "recycle_sim": true
}
}{- "order": {
- "id": 1234,
- "icc_id": "89450123456789012345",
- "number": "4571991234",
- "subscription_id": 2345
}
}required | object |
{- "order": {
- "number": "4571991234",
- "mm": "m2m-large-one"
}
}{- "order": {
- "id": 1234,
- "type": "Order::CompanyM2mToM2m",
- "state": "completed",
- "number": "4571991234",
- "subscription_id": 2345
}
}Contacts are used to show information on the other party in a call and are shared with the entire company.
| number | string Show contacts with the specified number |
| limit | integer <= 100 Default: 10 Number of contacts to fetch |
| id_gt_or_eq | integer Show contacts where ID is greater than or equal to specified value |
{- "contacts": [
- {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
]
}Create a new contact in the authenticated company
object (Contact) |
{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}| id required | integer Contact ID |
object (Contact) |
{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}| number required | string Contact phone number |
{- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}
}{- "comments": [
- {
- "id": 0,
- "body": "string",
- "employee": {
- "id": 0,
- "name": "string"
}, - "contact_id": 0,
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "recipient": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}
]
}| contact_id required | integer Contact ID |
object |
{- "comment": {
- "employee_id": 0,
- "body": "string",
- "recipient_id": 0
}
}{- "comment": {
- "id": 0,
- "body": "string",
- "employee": {
- "id": 0,
- "name": "string"
}, - "contact_id": 0,
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z",
- "recipient": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}
}{- "employees": [
- {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
]
}{- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}| id required | integer Employee ID |
| employee | object |
{- "employee": { }
}{- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}{- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}| employee | object |
{- "employee": { }
}{- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}
}Sends a Web SMS to the given employee's mobile number on behalf of the authenticated employee. See the Message tag description for sender-name rules, limits, and pricing.
| id required | integer Employee ID |
required | object |
{- "message": {
- "body": "string",
- "endpoint": "string",
- "from_number_hidden": false
}
}{- "sent": 0,
- "failed_numbers": [
- {
- "id": 0,
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "from_name": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "from_number_hidden": true,
- "to_number": "string",
- "to_name": "string",
- "to_number_formatted": "string",
- "endpoint": "string",
- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}, - "direction": "incoming",
- "body": "string",
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}Employee groups are collections of employees that can be used to dial or transfer to multiple employees at once.
object |
{- "employee_group": {
- "name": "string",
- "employee_ids": [
- 0
]
}
}{- "type": "EmployeeGroup",
- "id": 0,
- "name": "string",
- "live_presence": "available",
- "speed_dial": {
- "digit": 0
}, - "employee_ids": [
- 0
], - "endpoint": "EmployeeGroup#1",
- "avatar": "string"
}{- "type": "EmployeeGroup",
- "id": 0,
- "name": "string",
- "live_presence": "available",
- "speed_dial": {
- "digit": 0
}, - "employee_ids": [
- 0
], - "endpoint": "EmployeeGroup#1",
- "avatar": "string"
}| id required | integer Employee group ID |
| employee_group | object |
{- "employee_group": { }
}{- "type": "EmployeeGroup",
- "id": 0,
- "name": "string",
- "live_presence": "available",
- "speed_dial": {
- "digit": 0
}, - "employee_ids": [
- 0
], - "endpoint": "EmployeeGroup#1",
- "avatar": "string"
}| employee_group_id required | integer Employee group ID |
{- "type": "EmployeeGroup",
- "id": 0,
- "name": "string",
- "live_presence": "available",
- "speed_dial": {
- "digit": 0
}, - "employee_ids": [
- 0
], - "endpoint": "EmployeeGroup#1",
- "avatar": "string"
}Sends a Web SMS to every employee in the group, on behalf of the authenticated employee.
sent in the response reflects how many group members were reached.
See the Message tag description for sender-name rules, limits, and pricing.
| employee_group_id required | integer Employee group ID |
required | object |
{- "message": {
- "body": "string",
- "endpoint": "string",
- "from_number_hidden": false
}
}{- "sent": 0,
- "failed_numbers": [
- {
- "id": 0,
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "from_name": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "from_number_hidden": true,
- "to_number": "string",
- "to_name": "string",
- "to_number_formatted": "string",
- "endpoint": "string",
- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}, - "direction": "incoming",
- "body": "string",
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}{- "receptions": [
- {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
]
}{- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}Get call statistics for a given period. You can provide answer targets, and the server will calculate how many calls is within the given targets.
| id required | integer Reception ID |
| answer_target required | integer Target call answer time in seconds |
| from_time required | string <date-time> Start of time interval as ISO8601 timestamp |
| to_time required | string <date-time> End of time interval as ISO8601 timestamp |
| phase | string Enum: "open" "closed" "backup" Comma-separated list of phases to include in statistics |
{- "statistics": {
- "total": 0,
- "answered": 0,
- "missed": 0,
- "average_answer_time": 0,
- "average_duration": 0,
- "within_target": {
- "missed": 0,
- "answered": 0
}
}
}Smileys are the feedback from people who have contacted a reception.
After the call or chat has ended, the caller will receive an SMS or email asking for feedback on how the conversation went. This feedback is called a smiley.
| limit | integer <= 100 Default: 10 Number of smileys to return |
| number | string Filter smileys by caller number |
| rated_at_lt_or_eq | string <date-time> Return smileys where rated_at is less than or equal to this value |
| rated_at_gt_or_eq | string <date-time> Return smileys where rated_at is greater than or equal to this value |
| endpoint | string Filter smileys by endpoint name |
| reception_id | integer Deprecated Filter smileys by reception ID (deprecated) |
| employee_id | integer Filter smileys by employee ID |
| rating | integer Enum: 0 1 Filter smileys by rating |
| commented | boolean Filter smileys that have comments |
{- "smileys": [
- {
- "id": 0,
- "conversation_type": "call",
- "conversation_uuid": "string",
- "rated_at": "2019-08-24T14:15:22Z",
- "sort_value": "2019-08-24T14:15:22Z",
- "rating": 0,
- "net_promoter_score": 0,
- "kind": "negative",
- "comment": "string",
- "number": "string",
- "number_formatted": "string",
- "email": "string",
- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "employee_id": 0,
- "endpoint": "string"
}
]
}| from_time required | string <date-time> Start of time interval as ISO8601 timestamp |
| to_time required | string <date-time> End of time interval as ISO8601 timestamp |
| endpoint | string Filter statistics by endpoint name (optional) |
| reception_id | integer Deprecated Filter statistics by reception ID (optional, deprecated) |
| employee_id | integer Filter statistics by employee ID (optional) |
{- "statistics": {
- "receptions": [
- {
- "id": 0,
- "endpoint": "string",
- "smileys_count": 0,
- "positive_smileys_count": 0,
- "negative_smileys_count": 0,
- "commented_smileys_count": 0,
- "smiley_requests_count": 0,
- "average_rating": 0.1,
- "employees": [
- {
- "id": 0,
- "average_rating": 0.1,
- "smileys_count": 0,
- "positive_smileys_count": 0,
- "negative_smileys_count": 0,
- "commented_smileys_count": 0
}
]
}
]
}
}The Statistics API allows you to get aggregated stats about calls and chats. The data is updated every 1-2 hours, not in real-time like the other APIs.
| endpoint_type required | string Enum: "Reception" "ChatReception" "Employee" Type of statistics to return |
| group_by required | string Enum: "employee_id" "reception_id" "chat_reception_id" "ivr_key" "period_month" "period_week" "period_day" "period_hour" How to group the statistics |
| start required | string <date-time> Start of interval as ISO8601 timestamp |
| end required | string <date-time> End of interval as ISO8601 timestamp |
| endpoint | string Filter by specific endpoints (comma-separated, optional) |
{- "rows": [
- {
- "key": "string",
- "period_month": "2019-08-24T14:15:22Z",
- "period_week": "2019-08-24T14:15:22Z",
- "period_hour": "2019-08-24T14:15:22Z",
- "ivr_key": "string",
- "endpoint": "string",
- "call_count": 0,
- "call_answered_count": 0,
- "call_missed_count": 0,
- "call_closed_count": 0,
- "call_incoming_count": 0,
- "call_outgoing_count": 0,
- "call_answer_time_average": 0,
- "call_duration_average": 0,
- "call_duration_total": 0,
- "call_sla": 0,
- "smiley_count": 0,
- "rating_average": 0
}
]
}| created_at_lt_or_eq | string <date-time> Filter voicemails recorded at or before this timestamp |
| endpoint | string Filter voicemails by endpoint |
| limit | integer <= 100 Default: 10 Number of voicemails to return |
| number | string Filter voicemails by phone number |
{- "voice_mails": [
- {
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "heard": true,
- "sound": {
- "formats": [
- "audio/mpeg"
], - "url": "string"
}, - "duration": 0,
- "from_number": "string",
- "from_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "endpoint_name": "string",
- "endpoint": "Employee#1"
}
]
}{- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "heard": true,
- "sound": {
- "formats": [
- "audio/mpeg"
], - "url": "string"
}, - "duration": 0,
- "from_number": "string",
- "from_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "endpoint_name": "string",
- "endpoint": "Employee#1"
}| id required | integer Voicemail ID |
object |
{- "voice_mail": {
- "heard": true,
- "comment": "string"
}
}{- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "heard": true,
- "sound": {
- "formats": [
- "audio/mpeg"
], - "url": "string"
}, - "duration": 0,
- "from_number": "string",
- "from_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "endpoint_name": "string",
- "endpoint": "Employee#1"
}| started_at_lt_or_eq | string <date-time> Return calls where started_at is less than or equal to this value |
| started_at_gt_or_eq | string <date-time> Return calls where started_at is greater than or equal to this value |
| ended_at_lt_or_eq | string <date-time> Return calls where ended_at is less than or equal to this value |
| ended_at_gt_or_eq | string <date-time> Return calls where ended_at is greater than or equal to this value |
| limit | number Maximum number of calls to return |
| direction | string Enum: "incoming" "outgoing" Filter calls by direction |
| endpoint | string Filter calls by endpoint name |
{- "calls": [
- {
- "call_uuid": "string",
- "company_id": 0,
- "endpoint": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "to_number": "string",
- "to_number_formatted": "string",
- "remote_number": "string",
- "remote_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "remote_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "direction": "incoming",
- "started_at": "2019-08-24T14:15:22Z",
- "ringing_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "sort_value": "2019-08-24T14:15:22Z",
- "answered_by": {
- "id": 0,
- "name": "string",
- "number": "string",
- "endpoint": { }
}, - "ended_at": "2019-08-24T14:15:22Z",
- "status": "ringing",
- "endpoint_name": "string",
- "endpoint_type": "employee",
- "queue_virtual_position": 0,
- "reserving_employee_id": 0,
- "callback_requested": true,
- "callback": true,
- "talk_duration": 0,
- "waiting_time": 0,
- "path": [
- {
- "node_uuid": "string",
- "call_uuid": "string",
- "endpoint": "Employee#1",
- "endpoint_name": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "state": "string",
- "node_type": "ivr_menu_item",
- "parent_node_uuid": "string",
- "web_call": true
}
], - "nodes": [
- {
- "node_uuid": "string",
- "call_uuid": "string",
- "endpoint": "Employee#1",
- "endpoint_name": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "state": "string",
- "node_type": "ivr_menu_item",
- "parent_node_uuid": "string",
- "web_call": true
}
], - "input_data": [
- {
- "name": "string",
- "value": "string"
}
], - "smiley": {
- "id": 0,
- "conversation_type": "call",
- "conversation_uuid": "string",
- "rated_at": "2019-08-24T14:15:22Z",
- "sort_value": "2019-08-24T14:15:22Z",
- "rating": 0,
- "net_promoter_score": 0,
- "kind": "negative",
- "comment": "string",
- "number": "string",
- "number_formatted": "string",
- "email": "string",
- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "employee_id": 0,
- "endpoint": "string"
}, - "recording": {
- "id": 0,
- "started_at": "2019-08-24T14:15:22Z",
- "duration": 0,
- "expire_at": "2019-08-24T14:15:22Z",
- "expired": true,
- "sound": {
- "formats": [
- "string"
], - "url": "string"
}, - "accepted": true
}, - "voice_mail": {
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "heard": true,
- "sound": {
- "formats": [
- "audio/mpeg"
], - "url": "string"
}, - "duration": 0,
- "from_number": "string",
- "from_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "endpoint_name": "string",
- "endpoint": "Employee#1"
}
}
]
}{- "call": {
- "call_uuid": "string",
- "company_id": 0,
- "endpoint": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "to_number": "string",
- "to_number_formatted": "string",
- "remote_number": "string",
- "remote_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "remote_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "direction": "incoming",
- "started_at": "2019-08-24T14:15:22Z",
- "ringing_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "sort_value": "2019-08-24T14:15:22Z",
- "answered_by": {
- "id": 0,
- "name": "string",
- "number": "string",
- "endpoint": { }
}, - "ended_at": "2019-08-24T14:15:22Z",
- "status": "ringing",
- "endpoint_name": "string",
- "endpoint_type": "employee",
- "queue_virtual_position": 0,
- "reserving_employee_id": 0,
- "callback_requested": true,
- "callback": true,
- "talk_duration": 0,
- "waiting_time": 0,
- "path": [
- {
- "node_uuid": "string",
- "call_uuid": "string",
- "endpoint": "Employee#1",
- "endpoint_name": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "state": "string",
- "node_type": "ivr_menu_item",
- "parent_node_uuid": "string",
- "web_call": true
}
], - "nodes": [
- {
- "node_uuid": "string",
- "call_uuid": "string",
- "endpoint": "Employee#1",
- "endpoint_name": "string",
- "started_at": "2019-08-24T14:15:22Z",
- "answered_at": "2019-08-24T14:15:22Z",
- "ended_at": "2019-08-24T14:15:22Z",
- "state": "string",
- "node_type": "ivr_menu_item",
- "parent_node_uuid": "string",
- "web_call": true
}
], - "input_data": [
- {
- "name": "string",
- "value": "string"
}
], - "smiley": {
- "id": 0,
- "conversation_type": "call",
- "conversation_uuid": "string",
- "rated_at": "2019-08-24T14:15:22Z",
- "sort_value": "2019-08-24T14:15:22Z",
- "rating": 0,
- "net_promoter_score": 0,
- "kind": "negative",
- "comment": "string",
- "number": "string",
- "number_formatted": "string",
- "email": "string",
- "contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "employee_id": 0,
- "endpoint": "string"
}, - "recording": {
- "id": 0,
- "started_at": "2019-08-24T14:15:22Z",
- "duration": 0,
- "expire_at": "2019-08-24T14:15:22Z",
- "expired": true,
- "sound": {
- "formats": [
- "string"
], - "url": "string"
}, - "accepted": true
}, - "voice_mail": {
- "id": 0,
- "created_at": "2019-08-24T14:15:22Z",
- "heard": true,
- "sound": {
- "formats": [
- "audio/mpeg"
], - "url": "string"
}, - "duration": 0,
- "from_number": "string",
- "from_number_formatted": "string",
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "endpoint_name": "string",
- "endpoint": "Employee#1"
}
}
}CAUTION: When using this API, please be aware that an actual call will be made every time the endpoint is called. Once the authenticated employee's phone is answered, a call will be made to the specified recipient.
| to_number | string The number you want to dial. Should be prepended with country code. |
| restrict_to | string Enum: "" "web_call" "mobile" Can be empty, "web_call", or "mobile". If present, only rings on that device. |
| cloak_reception_id | string (Optional) If present, the phone number associated with this reception is used as the from-number. See the Reception documentation. |
{- "to_number": 4571999999,
- "restrict_to": "",
- "cloak_reception_id": "string"
}{- "message": "Call initiated successfully"
}Send SMS programmatically through the Relatel SMS gateway. Three endpoints are available:
POST /messages — send to one or more arbitrary phone numbers via to_numbers.POST /employees/{id}/message — send to a specific employee's mobile number.POST /employee_groups/{id}/message — send to every member of an employee group.All three send on behalf of the authenticated employee and consume the company's Web SMS allowance.
Web SMS requires an active Switch subscription that includes a web_smses allowance — see the price list for the included monthly amount per plan and the per-message rate for sends beyond it. International rates differ from domestic rates. The feature is not available during trial.
Each SMS segment counts as one unit against the allowance. Messages longer than the standard SMS length are split into multiple segments per GSM concatenation rules and consume the corresponding number of units.
The sender shown on the recipient's device is either the authenticated employee's mobile number, or — when the message is sent on behalf of a Reception (endpoint: "Reception#<id>") with from_number_hidden: true — the reception's short brand name.
Short brand names must be approved before they can be used as sender. Names matching well-known brands (banks, public authorities, payment providers, etc.) are auto-rejected; names matching the company or debtor name are fast-tracked. Until a name is approved, sends from that reception with from_number_hidden: true are rejected with HTTP 400.
rate_limit_reached.overuse_full.| created_at_lt_or_eq | string <date-time> Filter messages created before this timestamp |
| created_at_gt_or_eq | string <date-time> Filter messages created after this timestamp |
| endpoint | string Filter messages by endpoint |
{- "messages": [
- {
- "id": 0,
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "from_name": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "from_number_hidden": true,
- "to_number": "string",
- "to_name": "string",
- "to_number_formatted": "string",
- "endpoint": "string",
- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}, - "direction": "incoming",
- "body": "string",
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}Sends a Web SMS to each recipient in to_numbers on behalf of the authenticated employee.
See the Message tag description for sender-name rules, limits, and pricing.
required | object |
| to_numbers required | Array of strings One or more recipient phone numbers, including country calling code, without |
{- "message": {
- "body": "string",
- "endpoint": "string",
- "from_number_hidden": false
}, - "to_numbers": [
- "4571000000",
- "4571000001"
]
}{- "sent": 0,
- "failed_numbers": [
- {
- "id": 0,
- "from_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "to_contact": {
- "id": 0,
- "number": "string",
- "number_formatted": "string",
- "name": "string",
- "email": "string",
- "comments_count": 0,
- "flagged": true,
- "tags": [
- "string"
], - "activity_id": 0,
- "activity_at": "2019-08-24T14:15:22Z"
}, - "from_name": "string",
- "from_number": "string",
- "from_number_formatted": "string",
- "from_number_hidden": true,
- "to_number": "string",
- "to_name": "string",
- "to_number_formatted": "string",
- "endpoint": "string",
- "employee": {
- "type": "Employee",
- "id": 0,
- "endpoint": "Employee#1",
- "name": "string",
- "email": "string",
- "number": "string",
- "number_formatted": "string",
- "do_not_disturb": true,
- "do_not_disturb_label": "string",
- "do_not_disturb_emoji": "string",
- "do_not_disturb_ended_at": "2019-08-24T14:15:22Z",
- "dnd_timeout_at": "2019-08-24T14:15:22Z",
- "dnd_reception_action": true,
- "dnd_message": {
- "id": 0,
- "text": "string",
- "emoji": "string",
- "reception_action_id": 0
}, - "live_presence": "available",
- "live_presence_updated_at": "2019-08-24T14:15:22Z",
- "locale": "string",
- "speed_dial": {
- "digit": 0
}, - "has_switch": true,
- "cloak_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}, - "cloak_tracking_enabled": true,
- "employee_group_ids": [
- 0
], - "country_code": "string",
- "in_trial": true,
- "company_id": 0,
- "features": "mobile",
- "admin": true,
- "is_admin": true,
- "admin_abilities": {
- "property1": true,
- "property2": true
}, - "subscription_ids": [
- 0
], - "avatar": "string",
- "visible": true,
- "mobile_product_title": "string",
- "shadow_reception": {
- "id": 0,
- "name": "string",
- "phone_number": {
- "number": "string"
}, - "brand_name": "string",
- "short_brand_name": "string",
- "number": "string",
- "number_formatted": "string",
- "endpoint": "Reception#1",
- "company_id": 0,
- "is_smiley_enabled": true,
- "is_smiley_nps_enabled": true,
- "is_open": true,
- "is_shadow": true,
- "has_main_sms": true,
- "is_cloakable": true
}
}, - "direction": "incoming",
- "body": "string",
- "sort_value": "2019-08-24T14:15:22Z",
- "created_at": "2019-08-24T14:15:22Z"
}
]
}