Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Method parameters:

CreateGroup(int idList, int listGUID, string newGroupName)

...

  • idList: list identifier
  • listGuid: GUID of the list
  • newGroupName: name of the group to be created

 

Info

If a group with the same name already exists in the list, then no new group is created and an error code is returned, otherwise the ID of the created group is returned.



Sample CreateGroup response

Code Block
languagehtml/xml
linenumberstrue
<mailupMessage>
  <mailupBody>
    <ReturnCode>12</ReturnCode>
  </mailupBody>
</mailupMessage>

Error codes 

Error codeDescription
-300unrecognized error
-301the list has not been specified
-302the group name has not been specified
-303the group already exists

Ruby Example

Code Block
# Refer to https://mailup.atlassian.net/wiki/display/mailupapi/MailUp+RubyGem for gem information.
require 'mailup'
m = MailUp::Import.new('username', 'password', 'console_url')
m.create_group(:idList => 123456, :listGuid => 'abc123', :newGroupName => 'Sample Group')
# => <?xml version=\"1.0\" encoding=\"windows-1252\" ?><mailupMessage><mailupBody><ReturnCode>12</ReturnCode></mailupBody></mailupMessage>