Skip to main content

 Services

Web services from /about to /webhooks

memberships

/groups/{group}/members [POST]

Description

Create a member and add the member to a group.

Creates a new member in PageSeeder and invites the member to a group.

This service can also be used to register the new Member to a Group.

Member details

Both the firstname and surname are limited to 50 characters. If the first name is not specified, it defaults to Member.

The member-username must be less than 100 characters, unique and cannot contain a ‘@’. The username is required unless an email address is specified.

The email must be less than 100 characters, unique and be a valid Email address. The email address is required unless a username is specified.

Password details

The member-password must be less than 100 characters. When the Password is not specified, the member’s email is used if no confirmation is needed, otherwise, a new password is generated.

Passwords must satisfy a given strength check to be accepted:

  • Regular members must have at least a MEDIUM strength
  • Administrators must use a STRONG password

Other member options

It is possible to create a personal group using the personal-group boolean parameter.

To send a welcome email to the new member, use the welcome-email boolean parameter.

The account can be automatically activated by using the auto-activate boolean parameter. If the member-password is not set, then the member’s status is set-password (not activated) even if auto-activate is true.

Group membership parameters

If a group is specified on the request, the new member is also added to the group. All group membership parameters are optional and default to the group’s default values.

The notification parameter must be one of immediate, essential, daily, weekly or none. Users are able to subsequently change this setting through the user interface in their group registration options.

The role parameter must be one of guest, reviewer, contributor, manager, approver, moderator-and-approver, moderator.

The listed boolean parameter can be used to override the group’s default setting. It affects whether other group members are able to see the member’s user details. Users are able to subsequently change this setting through the user interface in their group registration options.

The invitation parameter can be used to force the group invitation email to be sent to the new member or to prevent that email to be sent. The default behavior follows the value of the project property acceptInvitationRequired.

Additional information specific to the group can also be attached to the user using the details fields field1 to field15.

The assignment of the group specific fields might change in future releases.

Parameters

NameDescriptionRequiredTypeDefault
emailThe new member’s email address (required if no member-username)yesemailNo Email (if username specified)
member-usernameThe new member’s username, defaults to the member's email address (required if no email)yesstringmember’s email
auto-activateWhether to activate the new member automatically (member-password should also be set)nobooleanfalse
field1Custom field #1nostring
field10Custom field #10nostring
field11Custom field #11nostring
field12Custom field #12nostring
field13Custom field #13nostring
field14Custom field #14nostring
field15Custom field #15nostring
field2Custom field #2nostring
field3Custom field #3nostring
field4Custom field #4nostring
field5Custom field #5nostring
field6Custom field #6nostring
field7Custom field #7nostring
field8Custom field #8nostring
field9Custom field #9nostring
firstnameThe new member’s given/other namenostringMember
invitationWhether to create an invitation, otherwise force membershipnobooleandepends on project property
listedWhether the member’s email address is listed in the groupnobooleanfalse
member-passwordThe new member’s password, is generated if unspecifiednostring(generated)
notificationThe member’s notification option in the groupno enumdepends on group flags
personal-groupWhether to create the personal groupnobooleanfalse
roleThe member’s role in the groupno enumdepends on group flags 
surnameThe new members family namenostring4 random digits
welcome-emailWhether to send a welcome email to the new membernobooleantrue
notify-asyncWhether to send emails asynchronously (for slow email servers)nobooleanfalse

Permission

This service requires administrator.

Response

If successful, this service returns the membership that was created as a <membership> element wrapped in <membership-creation> element.

The @welcome-email-failed attribute is only included if PageSeeder was unable to send the welcome email.

<membership-creation [welcome-email-failed="true"]>
  <membership id="[membershipid]" 
              email-listed="[true|false]" 
              notification="[none|essential|immediate|daily|weekly]"
              flags="[flags]"
              status="[invited|normal]"
              role="[role]">
    <member id="[member id]"
            firstname="[first name]"
            surname="[surname]"
            username="[username]"
            email="[email]"
            status="[activated|unactivated|set-password]">
      <fullname>[full name]</fullname>
    </member>
    <group id="[group id]"
           name="[name]"
           flags="[flags]"
           visibility="[visibility]"
           template="[template]">
      <description>[description]</description>
    </group>
  </membership>
</membership-creation>

Error Handling

CodeCause / Description
0x100AThe email is too long
0x100DSpecified role is not valid
0x1001If the username contains the character ‘@’
0x1002If the email address is invalid
0x1003If the specified group is a personal group
0x1004If the username or email are already in use
0x1005If the maximum number of members on the server has been reached
0x1007The firstname or surname is too long
0x1008The email or member-username must be specified
0x1009The member-username is too long
0x1015Password is not strong enough
0x1016Password is equal to username
0x0202Group was not found
Created on , last edited on