Broadcast Module GraphQL APIs

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

Required

Type

Default

Description

name

Mandatory

String

 

Name of the campaign

email

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

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be updated

name

Mandatory

String

 

Name of the campaign

email

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 

 

API Request 

 

API Response 

 

Delete Broadcast Campaign

Deleting a campaign from the Freepbx/PBXact system.

API Name: deleteCampaign

API parameters:

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be deleted

 

Query Parameters 

 

 

API Request 

 

API Response 

Fetch All Campaigns

Fetch all campaigns in the Freepbx/PBXact system.

API Name: fetchAllCampaigns

 

Query Parameters 

 

 

API Request 

 

 

API Response 

Start Campaign

Start a campaign in the Freepbx/PBXact system.

API Name: startCampaign

API parameters:

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be started

 

 

Query Parameters 

 

API Request 

 

 

API Response 

Stop Campaign

Stop(complete) a campaign in the Freepbx/PBXact system.

API Name: stopCampaign

API parameters:

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be completed

 

 

Query Parameters 

 

API Request 

 

 

API Response 

 

Activate Campaign

Activate a campaign in the Freepbx/PBXact system.

API Name: activateCampaign

API parameters:

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be activated

 

 

Query Parameters 

 

API Request 

 

 

API Response 

 

Deactivate Campaign

Deactivate a campaign in the Freepbx/PBXact system.

API Name: deActivateCampaign

API parameters:

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

Id of the campaign which is to be deactivated

 

 

Query Parameters 

 

API Request 

 

 

API Response 

Return to Documentation Home I Return to Sangoma Support