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": "7b536792-ed3c-450c-8852-dfc703743f53"
}

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>d4f0b505-cd7f-4250-8765-02b9349cd852</GroupID>
  <ParentGroupID>7b536792-ed3c-450c-8852-dfc703743f53</ParentGroupID>
</GroupV2>

application/x-www-form-urlencoded

Sample:

Failed to generate the sample for media type 'application/x-www-form-urlencoded'. Cannot use formatter 'System.Web.Http.ModelBinding.JQueryMvcFormUrlEncodedFormatter' to write type 'TwoSms.CustomerPortalRole.API.AddressBooks.GroupV2'.

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": "9f4f1511-bbbb-4fe0-a760-61456090a4de"
    }
  }
}

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>9f4f1511-bbbb-4fe0-a760-61456090a4de</GroupID>
    </Detail>
  </ResponseData>
</ResponseOfGroup>