Link Search Menu Expand Document

Leave

/api/v2/group/leave

Post

groups

jwt


Purpose

To allow a user to leave a group that he/she is already a member of.

Body Content [input]

{
    uid: string,
    groupID: string
}

Returns if valid [output]

{
    message: string,
    error: 0
}

What the API does

  • Finds the group being referenced by the groupID passed [404].
  • Ensures that uid corresponds to a record in the members field with a status of accepted [403].
  • Removes the record in the members field corresponding to uid from the group.