POST api/v2/addressbook/groups

This method creates an empty group for the user to add contacts to. The system will check that the name of the group is not already present for that account. This can also be a sub group for any other group that you own.

Request Information

URI Parameters

None.

Body Parameters

Either xml or json request.

TwoSms.CustomerPortalRole.API.AddressBooks.GroupV2
NameDescriptionTypeAdditional information
GroupName

The name of the group.

string

Required

ParentGroupID

SMS+ Parent Group ID

globally unique identifier

None.

Request Formats

application/json, text/json

Sample:
{
  "GroupName": "sample string 1",
  "ParentGroupID": "4dbf8b4c-0b51-4ada-bc6c-879e673b774d"
}

application/xml, text/xml

Sample:
<GroupV2 xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <GroupName>sample string 1</GroupName>
  <GroupID>582e040a-f049-4355-9a2e-3a2c0b782ce6</GroupID>
  <ParentGroupID>4dbf8b4c-0b51-4ada-bc6c-879e673b774d</ParentGroupID>
</GroupV2>

application/x-www-form-urlencoded

Sample:

Sample not available.

Response Information

Resource Description

The group details that have been posted.

TwoSms.CustomerPortalRole.API.Misc.ResponseOfTwoSms.CustomerPortalRole.API.AddressBooks.Group
NameDescriptionTypeAdditional information
Error

TwoSms.CustomerPortalRole.API.Misc.Error

None.

ResponseData

TwoSms.CustomerPortalRole.API.Misc.ResponseDataOfTwoSms.CustomerPortalRole.API.AddressBooks.Group

None.

Response Formats

application/json, text/json

Sample:
{
  "Error": {
    "ErrorCode": "sample string 1",
    "ErrorReason": "sample string 2"
  },
  "ResponseData": {
    "Identification": {
      "UserId": "sample string 1"
    },
    "Result": "sample string 1",
    "Detail": {
      "GroupName": "sample string 1",
      "GroupID": "c3ad5a95-f8ea-45e1-a4c0-e1d36715a5f0"
    }
  }
}

application/xml, text/xml

Sample:
<ResponseOfGroup xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <Error>
    <ErrorCode>sample string 1</ErrorCode>
    <ErrorReason>sample string 2</ErrorReason>
  </Error>
  <ResponseData>
    <Result>sample string 1</Result>
    <Identification>
      <UserId>sample string 1</UserId>
    </Identification>
    <Detail>
      <GroupName>sample string 1</GroupName>
      <GroupID>c3ad5a95-f8ea-45e1-a4c0-e1d36715a5f0</GroupID>
    </Detail>
  </ResponseData>
</ResponseOfGroup>