This wiki is to capture the Broadcast module provided GraphQL APIs.
Please find below list of APIs supported by Broadcast module.
Add Broadcast Campaign
Adding a campaign to the Freepbx/PBXact system.
API Name: addCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
name | Mandatory | String | Name of the campaign | |
Optional | String | Email address to which the report has to be sent | ||
email_settings | Optional | String | never | Settings to specify when the report has to be sent. following are the available options for email_settings never - no report will be sent daily - sends the report daily after end time completion - sends the report after the completion of campaign |
active | Optional | Boolean | false | Set Campaign as active or inactive (true or false). |
dupes | Optional | Boolean | ||
time_start | Optional | String | 08:00 (8AM) | Start time for the campaign in 24 hours format (between 00:00 to 23:59) |
time_finish | Optional | String | 17:00 (5PM) | End time for the campaign in 24 hours format (between 00:00 to 23:59) |
weekday_start | Optional | String | 0 | Day to start campaign accepts number from 0(optional) to 7 (1 - Monday to 7-sunday) |
weekday_finish | Optional | String | 0 | Day to End campaign accepts number from 0(optional) to 7 (1 - Monday to 7-sunday) |
date_start | Optional | String | present date | Date to start the campaign |
date_finish | Optional | String | present date | Date to end the campaign |
destination_person | Optional | String | Where to send calls answered by a live person | |
destination_machine | Optional | String | Where to send Answering Machine calls | |
callerid | Optional | String | caller id to use for this campaign | |
prefix | Optional | String | Prefix to be appended to every number before dialed - useful to force calls out a specific Outbound Route | |
concurrentcalls | Optional | Id | Maximum concurrent calls that this campaign can use, Should be less than the Concurrent Calls available in the general settings | |
active_groups | Mandatory | List of Strings | Groups to include in calls from this campaign |
Query Parameters
message status id |
API Request
mutation{ addCampaign(input:{ name:"campaign1" email:"testgro" email_settings:"never" active:true dupes: true time_start: "24:00" time_finish: "24:00" weekday_start:"10" weekday_finish:"10" date_start:"02-13-2022" date_finish:"02-02-2022" destination_person:"app-pbdirectory,pbdirectory,1" destination_machine:"app-pbdirectory,pbdirectory,1" callerid: "21" prefix: "91" concurrentcalls: "2" active_groups: [ "new test", "grpq" ] }) { message status id } } |
API Response
{ "data": { "addCampaign": { "message": "Campaign created Successfully", "status": true, "id": "20" } } } |
Update Broadcast Campaign
Updating a campaign in the Freepbx/PBXact system.
API Name: updateCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be updated | |
name | Mandatory | String | Name of the campaign | |
Optional | String | Email address to which the report has to be sent | ||
email_settings | Optional | String | never | Settings to specify when the report has to be sent. following are the available options for email_settings never - no report will be sent daily - sends the report daily after end time completion - sends the report after the completion of campaign |
active | Optional | Boolean | false | Set Campaign as active or inactive (true or false). |
dupes | Optional | Boolean | ||
time_start | Optional | String | 08:00 (8AM) | Start time for the campaign in 24 hours format (between 00:00 to 23:59) |
time_finish | Optional | String | 17:00 (5PM) | End time for the campaign in 24 hours format (between 00:00 to 23:59) |
weekday_start | Optional | String | 0 | Day to start campaign accepts number from 0(optional) to 7 (1 - Monday to 7-sunday) |
weekday_finish | Optional | String | 0 | Day to End campaign accepts number from 0(optional) to 7 (1 - Monday to 7-sunday) |
date_start | Optional | String | present date | Date to start the campaign |
date_finish | Optional | String | present date | Date to end the campaign |
destination_person | Optional | String | Where to send calls answered by a live person | |
destination_machine | Optional | String | Where to send Answering Machine calls | |
callerid | Optional | String | caller id to use for this campaign | |
prefix | Optional | String | Prefix to be appended to every number before dialed - useful to force calls out a specific Outbound Route | |
concurrentcalls | Optional | Id | 0 | Maximum concurrent calls that this campaign can use, Should be less than the Concurrent Calls available in the general settings |
active_groups | Mandatory | List of Strings | Groups to include in calls from this campaign |
Query Parameters
message status id |
API Request
mutation{ updateCampaign(input:{ id: 20 name:"campaign1" email:"testgro" email_settings:"never" active:true dupes: true time_start: "24:00" time_finish: "24:00" weekday_start:"10" weekday_finish:"10" date_start:"02-13-2022" date_finish:"02-02-2022" destination_person:"app-pbdirectory,pbdirectory,1" destination_machine:"app-pbdirectory,pbdirectory,1" callerid: "21" prefix: "91" concurrentcalls: "2" active_groups: [ "new test", "grpq" ] }) { message status id } } |
API Response
{ "data": { "updateCampaign": { "message": "Campaign updated Successfully", "status": true, "id": "20" } } } |
Delete Broadcast Campaign
Deleting a campaign from the Freepbx/PBXact system.
API Name: deleteCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be deleted |
Query Parameters
message status |
API Request
mutation{ deleteCampaign(input:{ id:15 }) { message status } } |
API Response
{ "data": { "deleteCampaign": { "message": "Campaign deleted Successfully", "status": true } } } |
Fetch All Campaigns
Fetch all campaigns in the Freepbx/PBXact system.
API Name: fetchAllCampaigns
Query Parameters
message status |
API Request
query{ fetchAllCampaigns{ status message campaigns{ id name email email_settings active dupes time_start time_finish weekday_start weekday_finish date_start date_finish destination_person destination_machine callerid prefix concurrentcalls active_groups } } } |
API Response
{ "data": { "fetchAllCampaigns": { "status": true, "message": "List of campaigns", "campaigns": [ { "id": "1", "name": "campaign1", "email": "", "email_settings": "", "active": false, "dupes": "1", "time_start": "08:00:00", "time_finish": "17:00:00", "weekday_start": "0", "weekday_finish": "0", "date_start": "2022-08-05", "date_finish": "2023-08-05", "destination_person": "", "destination_machine": "", "callerid": "", "prefix": "", "concurrentcalls": "2", "active_groups": [ "new test", "grpq" ] }, { "id": "2", "name": "campaign2", "email": "testgro", "email_settings": "100-101", "active": false, "dupes": "2", "time_start": "00:00:01", "time_finish": "00:00:02", "weekday_start": "1", "weekday_finish": "2", "date_start": "0000-00-00", "date_finish": "0000-00-00", "destination_person": "101-abc", "destination_machine": "324-123", "callerid": "21", "prefix": null, "concurrentcalls": "2", "active_groups": [ "new test" ] }, { "id": "3", "name": "campaign3", "email": "testgro", "email_settings": "100-101", "active": true, "dupes": "2", "time_start": "00:00:01", "time_finish": "00:00:02", "weekday_start": "1", "weekday_finish": "2", "date_start": "0000-00-00", "date_finish": "0000-00-00", "destination_person": "101-abc", "destination_machine": "324-123", "callerid": "21", "prefix": null, "concurrentcalls": "2", "active_groups": [] } ] } } } |
Start Campaign
Start a campaign in the Freepbx/PBXact system.
API Name: startCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be started |
Query Parameters
message status |
API Request
mutation{ startCampaign(input:{ id:12 }) { message status } } |
API Response
{ "data": { "startCampaign": { "message": "Campaign Completed", "status": true } } } |
Stop Campaign
Stop(complete) a campaign in the Freepbx/PBXact system.
API Name: stopCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be completed |
Query Parameters
message status |
API Request
mutation{ stopCampaign(input:{ id:12 }) { message status } } |
API Response
{ "data": { "stopCampaign": { "message": "Campaign Completed", "status": true } } } |
Activate Campaign
Activate a campaign in the Freepbx/PBXact system.
API Name: activateCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be activated |
Query Parameters
message status |
API Request
mutation{ activateCampaign(input:{ id:12 }) { message status } } |
API Response
{ "data": { "activateCampaign": { "message": "Campaign activated succefully", "status": true } } } |
Deactivate Campaign
Deactivate a campaign in the Freepbx/PBXact system.
API Name: deActivateCampaign
API parameters:
Name | Required | Type | Default | Description |
---|---|---|---|---|
id | Mandatory | Id | Id of the campaign which is to be deactivated |
Query Parameters
message status |
API Request
mutation{ deActivateCampaign(input:{ id:12 }) { message status } } |
API Response
{ "data": { "deActivateCampaign": { "message": "Campaign activated succefully", "status": true } } } |