Create a group
This POST operation creates a new group on the SQS with the owner of that group becoming the donor upon creation. If successful, you receive an HTTP response code of 201 and a JSON response outlining the information passed in the JSON request payload along with an auto-created id.
| See HTTP response codes for other response codes. |
POST /sqs/api/groups + JSON request payload
HEADER INFO
authorisation: HTTP Basic Auth
tenant: <tenantName>
content-type: application/JSON
accept: application/JSON
By default, accept is XML. You must explicitly set accept in your header to application/JSON to receive a JSON response.
|
permissions: SQS_GROUP_CREATE_UPDATE_PERMISSION
JSON request payload
You pass the ownerId and name in the JSON payload.
| The owner ID|name pair must be unique as an owner cannot have two groups with the same name. |
| See group data type descriptions for more details for the fields in the JSON payload. |
{
"ownerId" : "123123",
"name" : "Family"
}
JSON response
The JSON response includes the information passed in the JSON payload with an auto-assigned id.
{
"id" : "AE45F1",
"ownerId" : "123123",
"name" : "Family",
"created" : "2019-02-01 09:59:32",
"updated" : "2019-02-01 09:59:32"
}
SQS groups data type descriptions
| Field | Type | Description | ||
|---|---|---|---|---|
|
string |
The auto-assigned ID given to the group upon creation. |
||
|
string |
The ID given to the owner of the group (the creator). This is typicaly the MSISDN of the subscriber who created the group.
|
||
|
string |
The name of the group. This is currently auto-assigned upon group creation. |
||
|
string |
The date and time at which the group was created.
|
||
|
string |
The date and time at which the group was updated.
|
HTTP response codes
| Code | Description | ||||
|---|---|---|---|---|---|
|
success!
|
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
group not found |
||||
|
conflict with target resource
|
||||
|
failed validation; this typically means that a property was not set or a value is out of range. example
|
||||
|
failed processing (after passing validation). example
Example 1. SQS response codes
|
||||
|
internal error |
||||
|
request rejected due to overload |