Update a group

This PUT operation updates group information by passing the id in the URL and a JSON request with the updated information. If successful, you receive an HTTP response code of 200 and a JSON response outlining the updated information passed in the JSON request payload.

See HTTP response codes for other response codes.

PUT /sqs/api/groups/<id> + JSON request payload


HEADER INFO

authorisation: HTTP Basic Auth

tenant: <tenantName>

content-type: application/JSON

accept: application/JSON

permissions: SQS_GROUP_CREATE_UPDATE_PERMISSION


URL parameters

Parameter Description

id

The auto-assigned identifier that was given to the group upon creation.

JSON request payload

This sample updates the group name to CherokeeNation.

You must include all of the key:value pairs shown below in order to update a group.
{
  "id": "By5li9cbFR53VLv6fh6z",
  "ownerId": "967178860",
  "name" : "CherokeeNation"
}


JSON response

The JSON response includes the updated information passed in the JSON payload.

{
    "created": "2020-01-20T13:43:01.000+0000",
    "updated": "2020-01-20T13:43:01.000+0000",
    "id": "By5li9cbFR53VLv6fh6z",
    "ownerId": "967178860",
    "name": "CherokeeNation"
}

SQS groups data type descriptions

Field Type Description

id

string

The auto-assigned ID given to the group upon creation.

ownerId

string

The ID given to the owner of the group (the creator). This is typicaly the MSISDN of the subscriber who created the group.

The subscriber’s MSISDN in international format.

name

string

The name of the group. This is currently auto-assigned upon group creation.

created

string

The date and time at which the group was created.

updated

string

The date and time at which the group was updated.

HTTP response codes

Code Description

200

success!

207

Multistatus response

Check out HTTP statuses for more details.
This is not applicable to all operations.

400

malformed request

401

unauthorised; bad username or password

403

forbidden; user does not have appropriate privileges

404

group not found

409

conflict with target resource

This often occurs if the item already exists, such as a plan, group, or name.
This is not applicable to all operations.

412

failed validation; this typically means that a property was not set or a value is out of range.

example
HTTP 412
{
  "errors" : [
        {
          "field" : "name",
          "description" : "name is mandatory"
        }
    ]
}

422

failed processing (after passing validation).

example
HTTP 422
{
    "message": "Subscriber max plan count exceeded",
    "errorCode": 1
}
Example 1. SQS response codes
  • 0 = no error

  • 1 = undefined general error

  • 2 = group owner/name pair is not unique

  • 3 = group owner cannot be a member

  • 4 = total member quota exceeds 100%

  • 5 = group does not exist

  • 6 = maximum group size exceeded

  • 7 = the donor does not exist

  • 8 = the shareable plan does not exist

  • 9 = the shareable plan is not a recurring plan

  • 10 = charging group owner unsupported

  • 11 = the recurring donation for this plan already exists

  • 12 = the recipient does not exist

  • 13 = the donor plan max recipient limit was exceeded

  • 14 = subscriber not found

500

internal error

503

request rejected due to overload