Adding many users to groups via API


  • Dave Dyson
    Community Moderator

    Hi Karan, I think you'd need to use the Search Users API endpoint, with the email address as the query, e.g. query="" in order to return the user record for each user, which would include that user's user id. You could do that for each user you want to look up, and collect the user ids for use in the Create Many Group Memberships API endpoint you want to use above.


  • karan sharma
    Since this is the only way to add many users to group how can we also place email id of the user what will be the format?
    -X POST -d '{"group_memberships": [{"user_id": 72, "group_id": 88}, {"user_id": 73, "group_id": 88}]}' \
    -H "Content-Type: application/json" -v -u {email_address}:{password}

Please sign in to leave a comment.

Powered by Zendesk