Create a widget
Create a new widget
POST https://api.snapcall.io/widget/create
Parameters
Name | Type | Mandatory | Description | Example |
---|---|---|---|---|
api_key | String | Yes | API alphanumeric key | 4fa8198954f011e7babfa860b6053f87 |
api_secret | String | Yes | API alphanumeric secret | abxhr60b6053f874fa81989xxf011e7b |
name | String | Yes | Name of the widget | Snapcall Accueil |
brand | String | Yes | Brand of the product | Seampl |
call_id | Int | Yes | Destination phone number | 0123456789 |
caller_id | Int | No | Presented call number | 0123456789 |
routing | Enum('pstn', etc) | No | If "pstn", call will ring on the "call_id" number | |
service | String | No | Customer service | |
product | String | No | Snapcall watch serie 2 | |
type | Enum('') | No | ||
schedule | Array | No | ||
context | Array | No | ||
msg_widget_invite | String | No | Call invite dialog | Have a question ? Call us for free ! |
msg_widget_ongoing | String | No | Call ongoing dialog | Ongoing call ... |
msg_widget_closed | String | No | Out of schedule dialog | Service closed. Email us at hello@snapcall.io |
msg_widget_rate | String | No | Call rating dialog | Give us your opinion on this call ... |
msg_hosted_title | String | No | HTTPS hosted page title | Have a question ? Call us for free ! |
msg_hosted_invite | String | No | HTTPS hosted page invite dialog | You will be connected with one of our specialists |
opt_closed | Bool | No | Show widget when out of schedule | |
opt_browser | Bool | No | Show widget when incompatible browser | |
opt_os | Bool | No | Show widget when incompatible OS | |
opt_secure | Bool | No | Show widget when page is not HTTPS | |
opt_accessibility | Bool | No | Unable keyboard accessibility | |
opt_log | Bool | No | Log when widget is displayed | |
config | Text | No |
custom button |
{ btnBgColor:'#00000', btnShowClose:true, strInvite:{ en: 'blblablab', fr: 'blalalalal' }, strRate:{ en: 'blblablab', fr: 'blalalalal' }, shouldDock:true, btnPosition:{ top:15, left:15 }, containerId:'id_div', containerStyle:'css' } |
Response
{ "bid": "4fa81f011e7bab6053f87", "queue": "" }
Returns false upon unsuccessful execution.
Update a widget
Update an existing widget
POST https://api.snapcall.io/widget/update
Parameters
Name | Type | Mandatory | Description | Example |
---|---|---|---|---|
api_key | String | Yes | API alphanumeric key | 4fa8198954f011e7babfa860b6053f87 |
api_secret | String | Yes | API alphanumeric secret | abxhr60b6053f874fa81989xxf011e7b |
name | String | Yes | Name of the widget | Snapcall Accueil |
brand | String | Yes | Brand of the product | Seampl |
call_id | Int | Yes | Destination phone number | 0123456789 |
bid_id | String | Yes | Widget ID | 4fa81f011e7bab6053f87 |
caller_id | Int | No | Presented call number. | 0123456789 |
routing | Enum('pstn', etc ...) | No | If "pstn", call will ring on the "call_id" number | |
service | String | No | Customer service | |
product | String | No | Snapcall watch serie 2 | |
type | Enum('') | No | ||
schedule | Array | No | ||
context | Array | No | ||
msg_widget_invite | String | No | Call invite dialog | Have a question ? Call us for free ! |
msg_widget_ongoing | String | No | Call ongoing dialog | Ongoing call ... |
msg_widget_closed | String | No | Out of schedule dialog | Service closed. Email us at hello@snapcall.io |
msg_widget_rate | String | No | Call rating dialog | Give us your opinion on this call ... |
msg_hosted_title | String | No | HTTPS hosted page title | Have a question ? Call us for free ! |
msg_hosted_invite | String | No | HTTPS hosted page invite dialog | You will be connected with one of our specialists |
opt_closed | Bool | No | Show widget when out of schedule | |
opt_browser | Bool | No | Show widget when incompatible browser (Safari and Opera) | |
opt_os | Bool | No | Show widget when incompatible OS | |
opt_secure | Bool | No | Show widget when page is not HTTPS | |
opt_accessibility | Bool | No | Unable keyboard accessibility | |
opt_log | Bool | No | Log when widget is displayed | |
config | Text | No | Custom button | { btnBgColor:'#00000', btnShowClose:true, strInvite:{ en: 'blblablab', fr: 'blalalalal' }, strRate:{ en: 'blblablab', fr: 'blalalalal' }, shouldDock:true, btnPosition:{ top:15, left:15 }, containerId:'id_div', containerStyle:'css' } |
Response
Returns true upon successful execution, false otherwise.
Delete a widget
Delete an existing widget. Note that the widget will not be properly deleted from database, only disabled.
POST https://api.snapcall.io/widget/delete
Parameters
Name | Type | Mandatory | Description | Example |
---|---|---|---|---|
api_key | String | Yes | API alphanumeric key | 4fa8198954f011e7babfa860b6053f87 |
api_secret | String | Yes | API alphanumeric secret | abxhr60b6053f874fa81989xxf011e7b |
bid_id | String | Yes | Widget ID | 4fa81f011e7bab6053f87 |
Response
Returns true upon successful execution, false otherwise.
Read widget
Get an existing widget informations (if widget "active" field is set to 1)
POST https://api.snapcall.io/widget/read
Parameters
Name | Type | Mandatory | Description | Example |
---|---|---|---|---|
api_key | String | Yes | API alphanumeric key | 4fa8198954f011e7babfa860b6053f87 |
api_secret | String | Yes | API alphanumeric secret | abxhr60b6053f874fa81989xxf011e7b |
bid_id | String | Yes | Widget ID | 4fa81f011e7bab6053f87 |
Response
{ "bid_id": "0sJISS3X1wcaj8Dc", "call_id": "0123456789", "caller_id": "100102000048", "name": "Snapcall - Contact", "service": "Snapcall subscription", "brand": "Seampl", "product": "Snapcall widget", "type": "callbar", "schedule": { "Monday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Tuesday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Wednesday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Thursday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Friday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Saturday": {"morning": null, "afternoon": null}, "Sunday": {"morning": null, "afternoon": null} }, "context": { "tags": [], "cookies": [] }, "widget_color_bg": "#0000ff", "widget_color_fg": "#ffffff", "widget_size": "160", "msg_widget_invite": "Need information ? Call us for free !", "msg_widget_ongoing": "Ongoing", "msg_widget_closed": "Service closed", "msg_widget_rate": "Rate this call", "msg_hosted_title": "Call for free", "msg_hosted_invite": "Get in touch with one of our experts", "bg_hosted_base64": null, "opt_closed": "1", "opt_browser": "1", "opt_os": "1", "opt_secure": "1", "opt_accessibility": "1", "opt_log": "1" }
Returns null value in case nothing is found.
List widgets
Get the full list of all the existing widgets (if widget "active" field is set to 1)
POST https://api.snapcall.io/widget/list
Parameters
Name | Type | Mandatory | Description | Example |
---|---|---|---|---|
api_key | String | Yes | API alphanumeric key | 4fa8198954f011e7babfa860b6053f87 |
api_secret | String | Yes | API alphanumeric secret | abxhr60b6053f874fa81989xxf011e7b |
Response
This response is the same as the /widget/read API call except for the "closed" field which calculate whether the widget is in or out of the call schedule. Returns null value in case nothing is found.
[{ "bid_id": "0sJISS3X1wcaj8Dc", "call_id": "0123456789", "caller_id": "100102000048", "name": "Snapcall - Contact", "service": "Snapcall subscription", "brand": "Seampl", "product": "Snapcall widget", "type": "callbar", "schedule": { "Monday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Tuesday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Wednesday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Thursday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Friday": {"morning": ["09:00","12:00"], "afternoon": ["13:00","18:00"]}, "Saturday": {"morning": null, "afternoon": null}, "Sunday": {"morning": null, "afternoon": null} }, "context": { "tags": [], "cookies": [] }, "widget_color_bg": "#0000ff", "widget_color_fg": "#ffffff", "widget_size": "160", "msg_widget_invite": "Need information ? Call us for free !", "msg_widget_ongoing": "Ongoing", "msg_widget_closed": "Service closed", "msg_widget_rate": "Rate this call", "msg_hosted_title": "Call for free", "msg_hosted_invite": "Get in touch with one of our experts", "bg_hosted_base64": null, "opt_closed": "1", "opt_browser": "1", "opt_os": "1", "opt_secure": "1", "opt_accessibility": "1", "opt_log": "1", "closed": "false" },{ ... }]
Comments
0 comments
Article is closed for comments.