Create a Group
API to create a group will be in the following format:
curl -X POST \
'<BASE_URL>&method=groups.add&task=save&app=1'
API Parameter Specifications
The API parameter specifications are described in the following sections.
Mandatory Parameters
The mandatory parameters in the HTTP API are tabulated below:
Parameter | Description | Expected Values |
---|---|---|
BASE_URL | BASE URL of your SMS Service | URL |
method | Predefined method | groups.add |
task | Task to be performed for Group | save |
app | Application reference | 1 |
data[name] | Defines the name of group | group name |
Optional Parameter
The Optional parameter in the HTTP API is tabulated below:
Parameter | Description | Expected Values |
---|---|---|
format | Output format should be as specified by this variable | XML/PHP/JSON/JSONP. Default response will be in JSON |
Example Responses
JSON
{
"status": "OK",
"message": "Group added Successfully",
"data": []
}
Error Response
{
"status": "ERROR",
"message": "Group name already exists.",
"data": []
}
Response Data
Field | Description |
---|---|
status | It indicates the success or failure of your request. |
message | It indicates the success or failure message. |
data | All the responses are wrapped inside data |