WS_MailUpManage.DeleteGroup

Removes a Group from a List.

Method Parameters

  • string DeleteGroup(string accessKey, int listID, int groupID, bool deleteUsers)
    • accessKey: access key obtained using the LoginFromId method
    • listID: ID of the list that the Group belongs to
    • groupID: ID of the Group
    • deleteUsers: flag that determines whether the recipients assigned to the Group will be removed from the system

IMPORTANT: Removing Recipients

Note that there is a flag to indicate whether the recipients contained in the Group should also be removed from the system, or simply unassigned from that Group. Please check examples below.

SOAP Examples

SOAP Request with deleteUsers=false
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://services.mailupnet.it/WS">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:DeleteGroup>
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2s</ws:accessKey>
         <ws:listID>2</ws:listID>
         <ws:groupID>23</ws:groupID>
         <!-- if deleteUsers=false group is deleted but recipients remain subscribed to the specified list -->
         <ws:deleteUsers>false</ws:deleteUsers>
      </ws:DeleteGroup>
   </soapenv:Body>
</soapenv:Envelope>
SOAP Request with deleteUsers=true
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ws="http://services.mailupnet.it/WS">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:DeleteGroup>
         <ws:accessKey>HzAgwRRJaAKBtkgNWpkAuURfV4SxMm6T3HJegRuSkUivKJElNNcmSQe8nqGyoM9S8EyQZb6ZE2s</ws:accessKey>
         <ws:listID>2</ws:listID>
         <ws:groupID>23</ws:groupID>
         <!-- if deleteUsers=true then the group is deleted and the recipients that belong to this group are removed from specified list. If recipients of the group are also subscribed to other lists they remain subscribed to these lists, otherwise (i.e. if recipients are subscribed only to that list) they are completely removed from the system  -->
         <ws:deleteUsers>true</ws:deleteUsers>
      </ws:DeleteGroup>
   </soapenv:Body>
</soapenv:Envelope>



SOAP Response
<DeleteGroupResult>
  <errorCode>0</errorCode>
  <errorDescription></errorDescription>
</DeleteGroupResult>