SMS Module GraphQL APIs

This wiki is to capture the SMS module provided GraphQL APIs.

 

Please find below list of APIs supported by SMS module.

SMS module APIs are useful to create , modify , delete extensions and fetch the values of sms web hooks. 

Create SMS webhook

Creating a sms webhook into Freepbx/PBXact system.

API Name  addSmsWebhook API.

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

webHookBaseurl

Mandatory

String

 

SMS web hook url for which sms data has to be sent

enablewebHook

Mandatory

Boolean

false

Status of the web hook.

dataToBeSentOn

Mandatory

Enum

 

which SMS event should fire the webhook. Accepted values:  "send" , "receive" or "both"

 

 

Query Parameters 

status message

 

API Request 

1. Api to add SMS web hook   GQLAPI:  /admin/api/api/gql   parameters:   mutation {     addSmsWebhook(input: {         webHookBaseurl: "https://web.hook.sh/31fb9b81-3a9e-4e93-a2bd-147761ea82bb"         enablewebHook: true         dataToBeSentOn: both     }) {         status         message     } }

API Response 

{   "data": {     "addSmsWebhook": {       "status": true,       "message": "Webhook added successfully..!!"     }   } }

Update SMS web hook

 

Update SMS webhook updates an existing SMS webhook

API Name  updateSmsWebhook API.

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

String

 

Id which is used to identify the webhook url

webHookBaseurl

Mandatory

String

 

SMS web hook url for which sms data has to be sent

enablewebHook

Mandatory

Boolean

false

Status of the web hook.

dataToBeSentOn

Mandatory

Enum

 

which SMS event should fire the webhook. Accepted values:  "send" , "receive" or "both"

 

 

Query Parameters 

 

API Request 

API Response 

Delete SMS webhook

Delete an sms webhook from Freepbx/PBXACT

API Name  deleteSmsWebhook API.

API Parameters -

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

ID

 

Id which is used to identify the webhook url

 

Query Parameters 

 

API Request 

API Response 

Fetch All SMS webhook data

API Name :  fetchAllSmsWebhook 

API Parameters to query

Query Parameters 

 

API Request 

API Response 

Fetch SMS webhook 

API Name  fetchSmsWebhook API.

API Parameters: 

Name

Required

Type

Default

Description

Name

Required

Type

Default

Description

id

Mandatory

Id

 

ID used to identify webhook

API Parameters to query

Query Parameters 

 

API Request 

API Response 

Return to Documentation Home I Return to Sangoma Support