Jump to content

REST API Documentation

/core/clubs/{id}/members


Add (or invite) a member to a club

If the member already exists they will be updated. This can be used to ban a member from a club or promote a member to a leader, for instance.

If using an API key, the id parameter is required and will indicate the member being added to the club. If using an OAuth access token and the request is made by a club leader, the id parameter is required. If the user is already a member of the club they can be moved to a different status (such as banned or moderator), and if the user is not a member of the club, they will be invited (and the waiveFee parameter can be passed to bypass any club joining fee). If using an OAuth access token and no id is passed, a request to join will be submitted if necessary, or they will be added to the club (the status parameter is ignored). Finally, if using an OAuth access token and an id parameter is provided, an invitation will be sent to that user.


Parameters

Name Type Description
id int Member (ID) to add to the club
status string Status of the member being added or updated (member, invited, requested, banned, moderator, leader)
waiveFee int If set to 1 and the request is made by a club leader, the join fee will be waived for the member being invited

Exceptions

Code Message Description
1C386/7 INVALID_ID The club does not exist or the authorized user does not have permission to add members to it
1C386/8 INVALID_MEMBER The member to be added could not be found or the member cannot join the club

Response

Name Type Description
owner member object Club owner
members array of member objects Club members
leaders array of member objects Club leaders
moderators array of member objects Club moderators

member object

Name Type Description
id int ID number
name string Username
title string Member title
timezone string Member timezone
formattedName string Username with group formatting
primaryGroup group object Primary group
secondaryGroups array of group objects Secondary groups
email string Email address
joined datetime Registration date
registrationIpAddress string IP address when registered
warningPoints int Number of active warning points
reputationPoints int Number of reputation points
photoUrl string URL to photo (which will be the site's default if they haven't set one)
photoUrlIsDefault bool Indicates if the value of photoUrl is the site's default
coverPhotoUrl string URL to profile cover photo (will be blank if there isn't one)
profileUrl string|null URL to profile
validating bool Whether or not the validating flag is set on the member account
posts int Number of content item submissions member has made
lastActivity datetime|null Last activity date on the site.
lastVisit datetime|null Last distinct visit date on the site.
lastPost datetime|null Latest content submission date.
profileViews int Number of times member's profile has been viewed
birthday string Member birthday in MM/DD/YYYY format (or MM/DD format if no year has been supplied).
customFields array of fieldgroup objects Custom profile fields. For requests using an OAuth Access Token for a particular member, only fields the authorized user can view will be included
rank array of rank objects Rank
achievements_points int Points
allowAdminEmails bool Whether or not this member wants to receive admin emails
completed bool Whether or not the registration is completed

group object

Name Type Description
id int ID number
name string Name
formattedName string Name with formatting

fieldgroup object

Name Type Description
name string Group name
fields array of field objects Fields

field object

Name Type Description
name string Field name
value string Value

rank object

Name Type Description
id int ID number
name string Name
url string Path to the rank icon
points int Points
×
×
  • Create New...