Add member to a group
This POST
operation adds a member to a group where the JSON
payload contains which group member to add and defining how much of the group data is to be shared with the member. If successful, you receive an HTTP response code of 201
and a JSON
response outlining the information passed in the JSON request payload.
If you attempt to create a group member that already exists, you will get a 409 response code.
|
POST /sqs/api/groups/<id>/members
+ 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
URL parameters
Parameter | Description |
---|---|
|
The auto-assigned identifier that was given to the group upon creation. |
JSON request payload
You must pass the memberId
and quota
in the JSON
payload.
The percentage of quota shared is expressed as an integer between 0 and 10000000 . So for example, 5% is 5/100 * 10000000 which equals 500000 which would be what you specify in the payload. When sharing with a group, the specified shared quota is the amount given to each member in the group. So, if you specify 10% of 1GB (100MB), each member gets this amount.
|
{
"memberId": "678678",
"quota": 123456
}
JSON response
The JSON
response includes the information passed in the JSON payload as confirmation.
{
"memberId":"678678",
"quota":123456
}
SQS members data type descriptions
Field | Type | Description | ||||
---|---|---|---|---|---|---|
|
string |
The unique ID for the member. This is typically the MSISDN of the subscriber.
|
||||
|
integer |
The quota amount shared with the specified group member. This can be an exact amount or most often, a percentage of the donor plan.
|
HTTP response codes
Code | Description | ||||
---|---|---|---|---|---|
|
success!
|
||||
|
Multistatus response
|
||||
|
malformed request |
||||
|
unauthorised; bad username or password |
||||
|
forbidden; user does not have appropriate privileges |
||||
|
group member 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 |